mirror of
https://github.com/weizhiqiang1995/erp-pro.git
synced 2024-12-26 01:22:54 +08:00
feat: 发放优惠券时,storeId存在,则给shop_coupon_store增加一条信息
This commit is contained in:
parent
33d3b2e0d1
commit
3bcba67746
1 changed files with 7 additions and 0 deletions
|
@ -28,6 +28,7 @@ import com.skyeye.coupon.enums.PromotionDiscountType;
|
|||
import com.skyeye.coupon.enums.PromotionMaterialScope;
|
||||
import com.skyeye.coupon.service.CouponMaterialService;
|
||||
import com.skyeye.coupon.service.CouponService;
|
||||
import com.skyeye.coupon.service.CouponStoreService;
|
||||
import com.skyeye.coupon.service.CouponUseService;
|
||||
import com.skyeye.eve.rest.quartz.SysQuartzMation;
|
||||
import com.skyeye.eve.service.IQuartzService;
|
||||
|
@ -65,6 +66,9 @@ public class CouponServiceImpl extends SkyeyeBusinessServiceImpl<CouponDao, Coup
|
|||
@Autowired
|
||||
private IQuartzService iQuartzService;
|
||||
|
||||
@Autowired
|
||||
private CouponStoreService couponStoreService;
|
||||
|
||||
@Override
|
||||
public void validatorEntity(Coupon coupon) {
|
||||
// 模板新增
|
||||
|
@ -121,6 +125,9 @@ public class CouponServiceImpl extends SkyeyeBusinessServiceImpl<CouponDao, Coup
|
|||
|
||||
@Override
|
||||
public void createPostpose(Coupon entity, String userId) {
|
||||
if (StrUtil.isNotEmpty(entity.getStoreId())) {// 优惠券关联门店
|
||||
couponStoreService.createEntity(entity.getStoreId(), entity.getId());
|
||||
}
|
||||
if (StrUtil.isNotEmpty(entity.getTemplateId())) {// 优惠券
|
||||
if (Objects.equals(entity.getValidityType(), CouponValidityType.DATE.getKey())) {
|
||||
startUpTaskQuartz(entity.getId(), entity.getName(), entity.getValidEndTime());
|
||||
|
|
Loading…
Reference in a new issue