| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.context.annotation.Lazy;
|
| | | import org.springframework.core.task.TaskExecutor;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | |
| | | @Resource
|
| | | private UserOtherMsgNotificationService userOtherMsgNotificationService;
|
| | |
|
| | | @Lazy
|
| | | @Resource
|
| | | private IntegralGetService integralGetService;
|
| | |
|
| | |
| | | if (systemCoupon == null)
|
| | | throw new TokenRecordException(1, "该券不存在");
|
| | |
|
| | | BigDecimal percent = null;
|
| | | String amount = systemCoupon.getAmount();
|
| | | if (!StringUtil.isNullOrEmpty(amount)) |
| | | percent = new BigDecimal(amount);
|
| | | |
| | | try {
|
| | | userSystemCouponService.insertUserCoupon(uid, CouponTypeEnum.rebatePercentCoupon.name(),
|
| | | UserSystemCoupon.SOURCE_GIVE, percent);
|
| | | UserSystemCoupon.SOURCE_GIVE, systemCoupon.getPercent());
|
| | | } catch (Exception e) {
|
| | | LogHelper.errorDetailInfo(e);
|
| | | throw new TokenRecordException(1, "领取失败");
|