release: 积分抽奖扣除分数

release-2024-08-08
huangyw 6 months ago
parent e4bdceb143
commit dba6eb7df0

@ -55,6 +55,8 @@ public class LotteryService {
public static final String POINTS_WILL_BE_RETURNED = "抽奖返积分"; public static final String POINTS_WILL_BE_RETURNED = "抽奖返积分";
public static final String LOTTERY_POINTS_TYPE = "积分抽奖";
private final LotteryDao lotteryDao; private final LotteryDao lotteryDao;
private final JwtUtil jwtUtil; private final JwtUtil jwtUtil;
@ -299,6 +301,17 @@ public class LotteryService {
lotteryUserDao.save(lotteryUser); 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);
} }
/** /**

Loading…
Cancel
Save