package com.yiqi.order.service.impl;

import java.util.List;
        import com.yiqi.common.utils.DateUtils;
import com.yiqi.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yiqi.order.mapper.OrderClothAddressMapper;
import com.yiqi.order.domain.OrderClothAddress;
import com.yiqi.order.service.IOrderClothAddressService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 客户取衣订单地址Service业务层处理
 *
 * @author douya
 * @date 2024-08-15
 */
@Service
public class OrderClothAddressServiceImpl extends ServiceImpl<OrderClothAddressMapper,OrderClothAddress> implements IOrderClothAddressService {

    //<editor-folder desc="基础韩素">
    /**
     * 查询客户取衣订单地址
     *
     * @param id 客户取衣订单地址主键
     * @return 客户取衣订单地址
     */
    @Override
    public OrderClothAddress selectOrderClothAddressById(Long id) {
        return baseMapper.selectOrderClothAddressById(id);
    }

    @Override
    public OrderClothAddress getByorderSn(String orderSn) {
        if (orderSn != null) {
            return baseMapper.getByorderSn(orderSn);
        }
        return null;
    }


    /**
     * 查询客户取衣订单地址列表
     *
     * @param orderClothAddress 客户取衣订单地址
     * @return 客户取衣订单地址
     */
    @Override
    public List<OrderClothAddress> selectOrderClothAddressList(OrderClothAddress orderClothAddress) {
        return baseMapper.selectOrderClothAddressList(orderClothAddress);
    }

    /**
     * 新增客户取衣订单地址
     *
     * @param orderClothAddress 客户取衣订单地址
     * @return 结果
     */
    @Override
    public int insertOrderClothAddress(OrderClothAddress orderClothAddress) {
                orderClothAddress.setCreateTime(DateUtils.getNowDate());
            return baseMapper.insertOrderClothAddress(orderClothAddress);
    }

    /**
     * 修改客户取衣订单地址
     *
     * @param orderClothAddress 客户取衣订单地址
     * @return 结果
     */
    @Override
    public int updateOrderClothAddress(OrderClothAddress orderClothAddress) {
                orderClothAddress.setUpdateTime(DateUtils.getNowDate());
        return baseMapper.updateOrderClothAddress(orderClothAddress);
    }

    /**
     * 批量删除客户取衣订单地址
     *
     * @param ids 需要删除的客户取衣订单地址主键
     * @return 结果
     */
    @Override
    public int deleteOrderClothAddressByIds(Long[] ids) {
        return baseMapper.deleteOrderClothAddressByIds(ids);
    }

    /**
     * 删除客户取衣订单地址信息
     *
     * @param id 客户取衣订单地址主键
     * @return 结果
     */
    @Override
    public int deleteOrderClothAddressById(Long id) {
        return baseMapper.deleteOrderClothAddressById(id);
    }


    //</editor-folder>

}
