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.OrderClothItemCouponRelationMapper;
import com.yiqi.order.domain.OrderClothItemCouponRelation;
import com.yiqi.order.service.IOrderClothItemCouponRelationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 洗衣订单衣服优惠情况Service业务层处理
 *
 * @author xiaohei
 * @date 2023-11-07
 */
@Service
public class OrderClothItemCouponRelationServiceImpl extends ServiceImpl<OrderClothItemCouponRelationMapper,OrderClothItemCouponRelation> implements IOrderClothItemCouponRelationService {

    /**
     * 查询洗衣订单衣服优惠情况
     *
     * @param id 洗衣订单衣服优惠情况主键
     * @return 洗衣订单衣服优惠情况
     */
    @Override
    public OrderClothItemCouponRelation selectOrderClothItemCouponRelationById(Long id) {
        return baseMapper.selectOrderClothItemCouponRelationById(id);
    }

    /**
     * 查询洗衣订单衣服优惠情况列表
     *
     * @param orderClothItemCouponRelation 洗衣订单衣服优惠情况
     * @return 洗衣订单衣服优惠情况
     */
    @Override
    public List<OrderClothItemCouponRelation> selectOrderClothItemCouponRelationList(OrderClothItemCouponRelation orderClothItemCouponRelation) {
        return baseMapper.selectOrderClothItemCouponRelationList(orderClothItemCouponRelation);
    }

    /**
     * 新增洗衣订单衣服优惠情况
     *
     * @param orderClothItemCouponRelation 洗衣订单衣服优惠情况
     * @return 结果
     */
    @Override
    public int insertOrderClothItemCouponRelation(OrderClothItemCouponRelation orderClothItemCouponRelation) {
        orderClothItemCouponRelation.setCreateTime(DateUtils.getNowDate());
        return baseMapper.insertOrderClothItemCouponRelation(orderClothItemCouponRelation);
    }

    /**
     * 修改洗衣订单衣服优惠情况
     *
     * @param orderClothItemCouponRelation 洗衣订单衣服优惠情况
     * @return 结果
     */
    @Override
    public int updateOrderClothItemCouponRelation(OrderClothItemCouponRelation orderClothItemCouponRelation) {
        orderClothItemCouponRelation.setUpdateTime(DateUtils.getNowDate());
        return baseMapper.updateOrderClothItemCouponRelation(orderClothItemCouponRelation);
    }

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

    /**
     * 删除洗衣订单衣服优惠情况信息
     *
     * @param id 洗衣订单衣服优惠情况主键
     * @return 结果
     */
    @Override
    public int deleteOrderClothItemCouponRelationById(Long id) {
        return baseMapper.deleteOrderClothItemCouponRelationById(id);
    }



}
