| | |
| | | userCoupon.setEndTime(endTime);
|
| | | userCoupon.setCreateTime(new Date());
|
| | | userCoupon.setUpdateTime(new Date());
|
| | | // 插入数据库
|
| | | insertSelective(userCoupon);
|
| | | userSystemCouponMapper.insertSelective(userCoupon);
|
| | | |
| | | if(coupon.getType() == CouponTypeEnum.freeCoupon) {
|
| | | userSystemCouponActivateService.addActivateRecord(userCoupon.getId());
|
| | | }
|
| | |
|
| | | executor.execute(new Runnable() {
|
| | | @Override
|
| | |
| | |
|
| | | Order order = orderService.findOrderByOrderIdAndType(orderNo, sourceType);
|
| | | if (order == null)
|
| | | return;
|
| | | throw new UserSystemCouponException(1, "该订单不存在");
|
| | |
|
| | | /* 奖金计算 以及相关红包信息处理 */
|
| | |
|
| | |
| | | }, null);
|
| | | System.out.println(result);
|
| | | } catch (Exception e) {
|
| | | throw new Exception();
|
| | | e.printStackTrace();
|
| | | throw e;
|
| | | }
|
| | | }
|
| | | }
|