From d6f2a83d4312a87ab7c933a00c895b9f37c6168b Mon Sep 17 00:00:00 2001 From: huangyw <1207046171@qq.com> Date: Sun, 17 Nov 2024 13:24:02 +0800 Subject: [PATCH] =?UTF-8?q?release-=20=E9=97=A8=E7=A5=A8=E6=8A=BD=E5=A5=96?= =?UTF-8?q?=E8=A6=81=E5=B8=A6=E4=B8=8A=E6=BC=94=E5=87=BA=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E7=9A=84=E8=B5=8B=E4=BA=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- luoo_user/src/main/java/com/luoo/user/dto/point/DrawDTO.java | 3 +++ .../src/main/java/com/luoo/user/service/LotteryService.java | 4 ++++ .../main/java/com/luoo/user/service/UserPointLogService.java | 1 + 3 files changed, 8 insertions(+) diff --git a/luoo_user/src/main/java/com/luoo/user/dto/point/DrawDTO.java b/luoo_user/src/main/java/com/luoo/user/dto/point/DrawDTO.java index a662b88..92a8311 100644 --- a/luoo_user/src/main/java/com/luoo/user/dto/point/DrawDTO.java +++ b/luoo_user/src/main/java/com/luoo/user/dto/point/DrawDTO.java @@ -36,4 +36,7 @@ public class DrawDTO implements Serializable { @ApiModelProperty(value = "抽奖id") String lotteryId; + + @ApiModelProperty(value = "抽奖时间") + String showTime; } \ No newline at end of file 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 5adde7f..89a1c10 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 @@ -457,6 +457,10 @@ public class LotteryService { .userId(userLoginDto.getUserId()) .taskPointId(TaskPointIdConstants.LOTTERY) .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); } diff --git a/luoo_user/src/main/java/com/luoo/user/service/UserPointLogService.java b/luoo_user/src/main/java/com/luoo/user/service/UserPointLogService.java index 65c330d..fdf4749 100644 --- a/luoo_user/src/main/java/com/luoo/user/service/UserPointLogService.java +++ b/luoo_user/src/main/java/com/luoo/user/service/UserPointLogService.java @@ -264,6 +264,7 @@ public class UserPointLogService { .createUser(drawDTO.getUserId()) .updateUser(drawDTO.getUserId()) .popup(PointEnums.NOT_POPUP.getCode()) + .showTime(drawDTO.getShowTime()) .build(); lotteryUserDao.save(lotteryUser);