| | |
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.push.PushCouponMapper;
|
| | | import com.yeshi.fanli.entity.bus.user.UserSystemCoupon;
|
| | | import com.yeshi.fanli.entity.push.PushCoupon;
|
| | | import com.yeshi.fanli.entity.push.PushCouponRecord;
|
| | | import com.yeshi.fanli.exception.PushException;
|
| | |
| | | // 插入领取记录
|
| | | pushCouponRecordService.insertSelective(pushCouponRecord);
|
| | | // 直接发送券
|
| | | userSystemCouponService.randomRewardCouponForPush(amount, uid);
|
| | | userSystemCouponService.randomRewardCoupon(amount, uid, UserSystemCoupon.SOURCE_SYSTEM_PUSH);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | // 福利免单券
|
| | | coupon = systemCouponService.getCouponByType(couponType);
|
| | | } else if (couponType.equals(CouponTypeEnum.rebatePercentCoupon.name())) {
|
| | | // 奖励券10%
|
| | | coupon = systemCouponService.getCouponByTypeAndPercent(couponType,new BigDecimal(10));
|
| | | // 随机奖励券
|
| | | randomRewardCoupon(1, uid, source);
|
| | | return;
|
| | | }
|
| | |
|
| | | if (coupon == null) {
|
| | |
| | | */
|
| | | public void randomRewardCoupon(int num, Long uid, String source) throws Exception;
|
| | |
|
| | | /**
|
| | | * 后端直接发送券
|
| | | * @param record
|
| | | * @param uid
|
| | | */
|
| | | public void randomRewardCouponForPush(Integer amount , Long uid) throws Exception;
|
| | | |
| | | }
|