diff --git a/luoo_user/src/main/java/com/luoo/user/dao/LotteryUserDao.java b/luoo_user/src/main/java/com/luoo/user/dao/LotteryUserDao.java index cde78fe..81f79e8 100644 --- a/luoo_user/src/main/java/com/luoo/user/dao/LotteryUserDao.java +++ b/luoo_user/src/main/java/com/luoo/user/dao/LotteryUserDao.java @@ -15,6 +15,6 @@ public interface LotteryUserDao extends JpaRepository, public LotteryUser findByLotteryIdAndUserId(String lotteryId, String userId); - public List findByLotteryIdAndRegionId(String lotteryId, Integer regionId); + public List findByLotteryIdAndRegionIdAndShowTime(String lotteryId, Integer regionId, String showTime); } diff --git a/luoo_user/src/main/java/com/luoo/user/pojo/LotteryUser.java b/luoo_user/src/main/java/com/luoo/user/pojo/LotteryUser.java index a6e14c9..198b3ee 100644 --- a/luoo_user/src/main/java/com/luoo/user/pojo/LotteryUser.java +++ b/luoo_user/src/main/java/com/luoo/user/pojo/LotteryUser.java @@ -89,4 +89,8 @@ public class LotteryUser implements Serializable { @ApiModelProperty(value = "是否已弹出弹框 0-默认状态,未弹出 1-已弹出") private Integer popup; + @Column(name = "show_time") + @ApiModelProperty(value = "演出时间") + private String showTime; + } \ No newline at end of file diff --git a/luoo_user/src/main/java/com/luoo/user/service/DrawLotteryService.java b/luoo_user/src/main/java/com/luoo/user/service/DrawLotteryService.java index 23f4596..4d414b9 100644 --- a/luoo_user/src/main/java/com/luoo/user/service/DrawLotteryService.java +++ b/luoo_user/src/main/java/com/luoo/user/service/DrawLotteryService.java @@ -79,8 +79,8 @@ public class DrawLotteryService { lotteryRegionList.forEach(lotteryRegion -> { Integer num = lotteryRegion.getNum(); if (num > 0) { - List lotteryUserList = lotteryUserDao.findByLotteryIdAndRegionId(id, - lotteryRegion.getRegionId()); + List lotteryUserList = lotteryUserDao.findByLotteryIdAndRegionIdAndShowTime(id, + lotteryRegion.getRegionId(), lotteryRegion.getShowTime()); lotteryFunc(token, lotteryUserList, num); 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 487db06..682cfd4 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 @@ -703,7 +703,8 @@ public class LotteryService { avatarWithPrefix.as("avatar"), qLotteryUser.popup.as("popup"), qRegion.name.as("regionName"), - qRegion.code.as("regionCode") + qRegion.code.as("regionCode"), + qLotteryUser.showTime.as("showTime") )) .from(qLotteryUser) .leftJoin(qUserInfo) diff --git a/luoo_user/src/main/java/com/luoo/user/vo/point/LotteryUserAPPVO.java b/luoo_user/src/main/java/com/luoo/user/vo/point/LotteryUserAPPVO.java index 6d9cb4e..3dcd8ae 100644 --- a/luoo_user/src/main/java/com/luoo/user/vo/point/LotteryUserAPPVO.java +++ b/luoo_user/src/main/java/com/luoo/user/vo/point/LotteryUserAPPVO.java @@ -70,6 +70,9 @@ public class LotteryUserAPPVO implements Serializable { @ApiModelProperty(value = "区域编码") private String regionCode; + @ApiModelProperty(value = "演出时间") + private String showTime; + public LotteryUserAPPVO() { } @@ -87,7 +90,7 @@ public class LotteryUserAPPVO implements Serializable { this.avatar = avatar; } - public LotteryUserAPPVO(String id, String lotteryId, String userId, Integer regionId, Integer result, LocalDateTime createTime, LocalDateTime updateTime, String createUser, String updateUser, String nickName, String avatar, Integer popup, String regionName, String regionCode) { + public LotteryUserAPPVO(String id, String lotteryId, String userId, Integer regionId, Integer result, LocalDateTime createTime, LocalDateTime updateTime, String createUser, String updateUser, String nickName, String avatar, Integer popup, String regionName, String regionCode, String showTime) { this.id = id; this.lotteryId = lotteryId; this.userId = userId; @@ -102,5 +105,6 @@ public class LotteryUserAPPVO implements Serializable { this.popup = popup; this.regionName = regionName; this.regionCode = regionCode; + this.showTime = showTime; } } diff --git a/luoo_user/src/main/resources/sql/20240904.sql b/luoo_user/src/main/resources/sql/20240904.sql index 634109b..2d5efa7 100644 --- a/luoo_user/src/main/resources/sql/20240904.sql +++ b/luoo_user/src/main/resources/sql/20240904.sql @@ -32,3 +32,8 @@ alter table tb_lottery_user alter table tb_lottery_region add show_time varchar(50) null comment '演出时间'; +alter table tb_lottery_user + add show_time varchar(50) null comment '演出时间'; + + +