| | |
| | | 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;
|
| | | import com.yeshi.fanli.exception.push.PushCouponException;
|
| | | import com.yeshi.fanli.exception.push.PushException;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.service.inter.push.PushCouponRecordService;
|
| | | import com.yeshi.fanli.service.inter.push.PushCouponService;
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional
|
| | | @Transactional(rollbackFor=Exception.class)
|
| | | public void save(PushCoupon record) throws PushCouponException,Exception {
|
| | | if (record == null) {
|
| | | throw new PushCouponException(1, "参数不正确");
|
| | |
| | | pushCouponRecord.setCreateTime(new Date());
|
| | |
|
| | | // 插入领取记录
|
| | | pushCouponRecordService.insertSelective(pushCouponRecord);
|
| | | //pushCouponRecordService.insertSelective(pushCouponRecord);
|
| | | // 直接发送券
|
| | | userSystemCouponService.randomRewardCoupon(amount, uid, UserSystemCoupon.SOURCE_SYSTEM_PUSH);
|
| | | //userSystemCouponService.randomRewardCoupon(amount, uid, UserSystemCoupon.SOURCE_SYSTEM_PUSH);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional
|
| | | @Transactional(rollbackFor=Exception.class)
|
| | | public void executePush(Long id) throws Exception, PushCouponException, PushException {
|
| | |
|
| | | PushCoupon pushCoupon = selectByPrimaryKey(id);
|