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.OrderClothCouponRelationMapper;
import com.yiqi.order.domain.OrderClothCouponRelation;
import com.yiqi.order.service.IOrderClothCouponRelationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 洗衣订单优惠券使用情况Service业务层处理
 *
 * @author xiaohei
 * @date 2023-11-07
 */
@Service
public class OrderClothCouponRelationServiceImpl extends ServiceImpl<OrderClothCouponRelationMapper,OrderClothCouponRelation> implements IOrderClothCouponRelationService {

    /**
     * 查询洗衣订单优惠券使用情况
     *
     * @param id 洗衣订单优惠券使用情况主键
     * @return 洗衣订单优惠券使用情况
     */
    @Override
    public OrderClothCouponRelation selectOrderClothCouponRelationById(Long id) {
        return baseMapper.selectOrderClothCouponRelationById(id);
    }

    /**
     * 查询洗衣订单优惠券使用情况列表
     *
     * @param orderClothCouponRelation 洗衣订单优惠券使用情况
     * @return 洗衣订单优惠券使用情况
     */
    @Override
    public List<OrderClothCouponRelation> selectOrderClothCouponRelationList(OrderClothCouponRelation orderClothCouponRelation) {
        return baseMapper.selectOrderClothCouponRelationList(orderClothCouponRelation);
    }

    /**
     * 新增洗衣订单优惠券使用情况
     *
     * @param orderClothCouponRelation 洗衣订单优惠券使用情况
     * @return 结果
     */
    @Override
    public int insertOrderClothCouponRelation(OrderClothCouponRelation orderClothCouponRelation) {
        orderClothCouponRelation.setCreateTime(DateUtils.getNowDate());
        return baseMapper.insertOrderClothCouponRelation(orderClothCouponRelation);
    }

    /**
     * 修改洗衣订单优惠券使用情况
     *
     * @param orderClothCouponRelation 洗衣订单优惠券使用情况
     * @return 结果
     */
    @Override
    public int updateOrderClothCouponRelation(OrderClothCouponRelation orderClothCouponRelation) {
        orderClothCouponRelation.setUpdateTime(DateUtils.getNowDate());
        return baseMapper.updateOrderClothCouponRelation(orderClothCouponRelation);
    }

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

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



}
