diff --git a/luoo_user/src/main/java/com/luoo/user/service/LotteryService.java b/luoo_user/src/main/java/com/luoo/user/service/LotteryService.java index 8684c6a..6f259fc 100644 --- a/luoo_user/src/main/java/com/luoo/user/service/LotteryService.java +++ b/luoo_user/src/main/java/com/luoo/user/service/LotteryService.java @@ -55,6 +55,8 @@ public class LotteryService { public static final String POINTS_WILL_BE_RETURNED = "抽奖返积分"; + public static final String LOTTERY_POINTS_TYPE = "积分抽奖"; + private final LotteryDao lotteryDao; private final JwtUtil jwtUtil; @@ -299,6 +301,17 @@ public class LotteryService { lotteryUserDao.save(lotteryUser); + UserPointLog userPointLog = UserPointLog.builder() + .id(String.valueOf(idWorker.nextId())) + .type(PointEnums.TASK_POINT_TYPE_REDUCE.getCode()) + .createUser(lotteryUser.getUserId()) + .taskPointId(null) + .description(LOTTERY_POINTS_TYPE) + .userId(lotteryUser.getUserId()) + .score(lottery.getPoint()) + .build(); + rabbitTemplate.convertAndSend("pointLog", userPointLog); + } /**