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.OrderClothColorMapper;
import com.yiqi.order.domain.OrderClothColor;
import com.yiqi.order.service.IOrderClothColorService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 洗衣订单衣服颜色Service业务层处理
 *
 * @author ruoyi
 * @date 2023-10-06
 */
@Service
public class OrderClothColorServiceImpl extends ServiceImpl<OrderClothColorMapper,OrderClothColor> implements IOrderClothColorService {

    /**
     * 查询洗衣订单衣服颜色
     *
     * @param id 洗衣订单衣服颜色主键
     * @return 洗衣订单衣服颜色
     */
    @Override
    public OrderClothColor selectOrderClothColorById(Long id) {
        return baseMapper.selectOrderClothColorById(id);
    }

    /**
     * 查询洗衣订单衣服颜色列表
     *
     * @param orderClothColor 洗衣订单衣服颜色
     * @return 洗衣订单衣服颜色
     */
    @Override
    public List<OrderClothColor> selectOrderClothColorList(OrderClothColor orderClothColor) {
        return baseMapper.selectOrderClothColorList(orderClothColor);
    }

    /**
     * 新增洗衣订单衣服颜色
     *
     * @param orderClothColor 洗衣订单衣服颜色
     * @return 结果
     */
    @Override
    public int insertOrderClothColor(OrderClothColor orderClothColor) {
        orderClothColor.setCreateTime(DateUtils.getNowDate());
        return baseMapper.insertOrderClothColor(orderClothColor);
    }

    /**
     * 修改洗衣订单衣服颜色
     *
     * @param orderClothColor 洗衣订单衣服颜色
     * @return 结果
     */
    @Override
    public int updateOrderClothColor(OrderClothColor orderClothColor) {
        orderClothColor.setUpdateTime(DateUtils.getNowDate());
        return baseMapper.updateOrderClothColor(orderClothColor);
    }

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

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



}
