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.OrderClothAdjunctMapper;
import com.yiqi.order.domain.OrderClothAdjunct;
import com.yiqi.order.service.IOrderClothAdjunctService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 订单衣服附件Service业务层处理
 *
 * @author xiaohei
 * @date 2023-10-06
 */
@Service
public class OrderClothAdjunctServiceImpl extends ServiceImpl<OrderClothAdjunctMapper,OrderClothAdjunct> implements IOrderClothAdjunctService {

    /**
     * 查询订单衣服附件
     *
     * @param id 订单衣服附件主键
     * @return 订单衣服附件
     */
    @Override
    public OrderClothAdjunct selectOrderClothAdjunctById(Long id) {
        return baseMapper.selectOrderClothAdjunctById(id);
    }

    /**
     * 查询订单衣服附件列表
     *
     * @param orderClothAdjunct 订单衣服附件
     * @return 订单衣服附件
     */
    @Override
    public List<OrderClothAdjunct> selectOrderClothAdjunctList(OrderClothAdjunct orderClothAdjunct) {
        return baseMapper.selectOrderClothAdjunctList(orderClothAdjunct);
    }

    /**
     * 新增订单衣服附件
     *
     * @param orderClothAdjunct 订单衣服附件
     * @return 结果
     */
    @Override
    public int insertOrderClothAdjunct(OrderClothAdjunct orderClothAdjunct) {
        orderClothAdjunct.setCreateTime(DateUtils.getNowDate());
        return baseMapper.insertOrderClothAdjunct(orderClothAdjunct);
    }

    /**
     * 修改订单衣服附件
     *
     * @param orderClothAdjunct 订单衣服附件
     * @return 结果
     */
    @Override
    public int updateOrderClothAdjunct(OrderClothAdjunct orderClothAdjunct) {
        orderClothAdjunct.setUpdateTime(DateUtils.getNowDate());
        return baseMapper.updateOrderClothAdjunct(orderClothAdjunct);
    }

    /**
     * 批量删除订单衣服附件
     *
     * @param ids 需要删除的订单衣服附件主键
     * @return 结果
     */
    @Override
    public int deleteOrderClothAdjunctByIds(Long[] ids) {
        return baseMapper.deleteOrderClothAdjunctByIds(ids);
    }

    /**
     * 删除订单衣服附件信息
     *
     * @param id 订单衣服附件主键
     * @return 结果
     */
    @Override
    public int deleteOrderClothAdjunctById(Long id) {
        return baseMapper.deleteOrderClothAdjunctById(id);
    }



}
