package com.pj.project.tb_discount;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pj.project.tb_business.TbBusinessMapper;
import com.pj.project.tb_business_car.TbBusinessCar;
import com.pj.project.tb_business_car.TbBusinessCarMapper;
import com.pj.utils.so.SoMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.pj.utils.sg.*;
import org.springframework.transaction.annotation.Transactional;

/**
 * Service: tb_discount -- 折扣管理
 *
 * @author qzy
 */
@Service
@Transactional
public class TbDiscountService extends ServiceImpl<TbDiscountMapper, TbDiscount> implements IService<TbDiscount> {

    /**
     * 底层 Mapper 对象
     */
    @Autowired
    TbDiscountMapper tbDiscountMapper;

    /**
     * 增
     */
    int add(TbDiscount t) {
        return tbDiscountMapper.add(t);
    }

    /**
     * 删
     */
    int delete(Long id) {
        return tbDiscountMapper.delete(id);
    }

    /**
     * 改
     */
    int update(TbDiscount t) {
        return tbDiscountMapper.update(t);
    }


    /**
     * 查集合 - 根据条件（参数为空时代表忽略指定条件）
     */
    public List<TbDiscount> getList(SoMap so) {
        return tbDiscountMapper.getList(so);
    }


}
