| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.modular.system.model.TCoupon; |
| | | import com.stylefeng.guns.modular.system.dao.TCouponMapper; |
| | | import com.stylefeng.guns.modular.system.service.ITCouponService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.apache.poi.hdf.extractor.TC; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TCouponServiceImpl extends ServiceImpl<TCouponMapper, TCoupon> implements ITCouponService { |
| | | |
| | | @Autowired |
| | | private TCouponMapper tCouponMapper; |
| | | |
| | | @Override |
| | | public Boolean isExit(TCoupon tCoupon) { |
| | | |
| | | Integer count = tCouponMapper.selectCount(new EntityWrapper<TCoupon>().eq("coupon_name", tCoupon.getCouponName()) |
| | | .eq("coupon_type",tCoupon.getCouponType())); |
| | | |
| | | if(Objects.nonNull(tCoupon.getId())){ |
| | | // 修改 |
| | | }else { |
| | | // 新增 |
| | | return count>0; |
| | | } |
| | | return null; |
| | | } |
| | | } |