release- 门票抽奖要带上演出时间的赋予

release-2024-04-25
huangyw 6 days ago
parent 19c79a8c5c
commit d6f2a83d43

@ -36,4 +36,7 @@ public class DrawDTO implements Serializable {
@ApiModelProperty(value = "抽奖id") @ApiModelProperty(value = "抽奖id")
String lotteryId; String lotteryId;
@ApiModelProperty(value = "抽奖时间")
String showTime;
} }

@ -457,6 +457,10 @@ public class LotteryService {
.userId(userLoginDto.getUserId()) .userId(userLoginDto.getUserId())
.taskPointId(TaskPointIdConstants.LOTTERY) .taskPointId(TaskPointIdConstants.LOTTERY)
.build(); .build();
if (Objects.equals(PointEnums.LOTTERY_TICKET.getCode(), lottery.getType()) && regionId != null) {
LotteryRegion byLotteryIdAndRegionId = lotteryRegionDao.findByLotteryIdAndRegionId(id, regionId);
drawDTO.setShowTime(byLotteryIdAndRegionId.getShowTime());
}
rabbitTemplate.convertAndSend("draw", drawDTO); rabbitTemplate.convertAndSend("draw", drawDTO);
} }

@ -264,6 +264,7 @@ public class UserPointLogService {
.createUser(drawDTO.getUserId()) .createUser(drawDTO.getUserId())
.updateUser(drawDTO.getUserId()) .updateUser(drawDTO.getUserId())
.popup(PointEnums.NOT_POPUP.getCode()) .popup(PointEnums.NOT_POPUP.getCode())
.showTime(drawDTO.getShowTime())
.build(); .build();
lotteryUserDao.save(lotteryUser); lotteryUserDao.save(lotteryUser);

Loading…
Cancel
Save