Commit 785f52da by 吕明尚

修改优惠卷配置判断

parent d0813127
...@@ -134,7 +134,14 @@ public class SCouponServiceImpl extends ServiceImpl<SCouponMapper, SCoupon> impl ...@@ -134,7 +134,14 @@ public class SCouponServiceImpl extends ServiceImpl<SCouponMapper, SCoupon> impl
@Override @Override
public int updateSCoupon(SCoupon sCoupon) { public int updateSCoupon(SCoupon sCoupon) {
sCoupon.setUpdateTime(DateUtils.getNowDate()); sCoupon.setUpdateTime(DateUtils.getNowDate());
SCoupon sCouponList = sCouponMapper.selectByDealgroupId(sCoupon.getDealgroupId()); SCoupon sCouponList = new SCoupon();
if (sCoupon.getPlatformType().equals(PlatformTypeEnum.MEITUAN.getCode())) {
sCouponList = sCouponMapper.selectByDealgroupId(sCoupon.getDealgroupId());
} else if (sCoupon.getPlatformType().equals(PlatformTypeEnum.TIKTOK.getCode())) {
LambdaQueryWrapper<SCoupon> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SCoupon::getTiktokSkuId, sCoupon.getTiktokSkuId());
sCouponList = sCouponMapper.selectOne(wrapper);
}
if (ObjectUtils.isEmpty(sCouponList) || sCouponList.getId().equals(sCoupon.getId())) { if (ObjectUtils.isEmpty(sCouponList) || sCouponList.getId().equals(sCoupon.getId())) {
return sCouponMapper.updateSCoupon(sCoupon); return sCouponMapper.updateSCoupon(sCoupon);
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment