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.OrderClothCraftMapper;
import com.yiqi.order.domain.OrderClothCraft;
import com.yiqi.order.service.IOrderClothCraftService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 洗衣订单衣服工艺Service业务层处理
 *
 * @author xiaohei
 * @date 2023-10-06
 */
@Service
public class OrderClothCraftServiceImpl extends ServiceImpl<OrderClothCraftMapper,OrderClothCraft> implements IOrderClothCraftService {

    /**
     * 查询洗衣订单衣服工艺
     *
     * @param id 洗衣订单衣服工艺主键
     * @return 洗衣订单衣服工艺
     */
    @Override
    public OrderClothCraft selectOrderClothCraftById(Long id) {
        return baseMapper.selectOrderClothCraftById(id);
    }

    /**
     * 查询洗衣订单衣服工艺列表
     *
     * @param orderClothCraft 洗衣订单衣服工艺
     * @return 洗衣订单衣服工艺
     */
    @Override
    public List<OrderClothCraft> selectOrderClothCraftList(OrderClothCraft orderClothCraft) {
        return baseMapper.selectOrderClothCraftList(orderClothCraft);
    }

    /**
     * 新增洗衣订单衣服工艺
     *
     * @param orderClothCraft 洗衣订单衣服工艺
     * @return 结果
     */
    @Override
    public int insertOrderClothCraft(OrderClothCraft orderClothCraft) {
        orderClothCraft.setCreateTime(DateUtils.getNowDate());
        return baseMapper.insertOrderClothCraft(orderClothCraft);
    }

    /**
     * 修改洗衣订单衣服工艺
     *
     * @param orderClothCraft 洗衣订单衣服工艺
     * @return 结果
     */
    @Override
    public int updateOrderClothCraft(OrderClothCraft orderClothCraft) {
        orderClothCraft.setUpdateTime(DateUtils.getNowDate());
        return baseMapper.updateOrderClothCraft(orderClothCraft);
    }

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

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



}
