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.OrderClothTypeMapper;
import com.yiqi.order.domain.OrderClothType;
import com.yiqi.order.service.IOrderClothTypeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 洗衣订单衣服类型Service业务层处理
 *
 * @author xiaohei
 * @date 2023-10-06
 */
@Service
public class OrderClothTypeServiceImpl extends ServiceImpl<OrderClothTypeMapper,OrderClothType> implements IOrderClothTypeService {

    /**
     * 查询洗衣订单衣服类型
     *
     * @param id 洗衣订单衣服类型主键
     * @return 洗衣订单衣服类型
     */
    @Override
    public OrderClothType selectOrderClothTypeById(Long id) {
        return baseMapper.selectOrderClothTypeById(id);
    }

    /**
     * 查询洗衣订单衣服类型列表
     *
     * @param orderClothType 洗衣订单衣服类型
     * @return 洗衣订单衣服类型
     */
    @Override
    public List<OrderClothType> selectOrderClothTypeList(OrderClothType orderClothType) {
        return baseMapper.selectOrderClothTypeList(orderClothType);
    }

    /**
     * 新增洗衣订单衣服类型
     *
     * @param orderClothType 洗衣订单衣服类型
     * @return 结果
     */
    @Override
    public int insertOrderClothType(OrderClothType orderClothType) {
        orderClothType.setCreateTime(DateUtils.getNowDate());
        return baseMapper.insertOrderClothType(orderClothType);
    }

    /**
     * 修改洗衣订单衣服类型
     *
     * @param orderClothType 洗衣订单衣服类型
     * @return 结果
     */
    @Override
    public int updateOrderClothType(OrderClothType orderClothType) {
        orderClothType.setUpdateTime(DateUtils.getNowDate());
        return baseMapper.updateOrderClothType(orderClothType);
    }

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

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



}
