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 94895ab..487db06 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 @@ -561,6 +561,27 @@ public class LotteryService { long participateNum = getParticipateNumByLotteryId(lottery.getId()); // 设置抽奖人数 lottery.setParticipateNum(participateNum); + + QLotteryRegion qLotteryRegion = QLotteryRegion.lotteryRegion; + QRegion qRegion = QRegion.region; + + List lotteryRegionList = jpaQueryFactory + .select(Projections.bean(LotteryRegionDetailVO.class, + qLotteryRegion.id, + qLotteryRegion.regionId, + qLotteryRegion.lotteryId, + qLotteryRegion.num, + qRegion.name, + qRegion.code, + qLotteryRegion.showTime + )) + .from(qLotteryRegion) + .innerJoin(qRegion) + .on(qLotteryRegion.regionId.eq(qRegion.id)) + .where(qLotteryRegion.lotteryId.eq(lottery.getId())) + .fetch(); + + lottery.setLotteryRegionList(lotteryRegionList); } }); return lotteryPageResult; diff --git a/luoo_user/src/main/java/com/luoo/user/vo/point/LotteryAPPVO.java b/luoo_user/src/main/java/com/luoo/user/vo/point/LotteryAPPVO.java index 6f53220..ec54ec1 100644 --- a/luoo_user/src/main/java/com/luoo/user/vo/point/LotteryAPPVO.java +++ b/luoo_user/src/main/java/com/luoo/user/vo/point/LotteryAPPVO.java @@ -88,6 +88,8 @@ public class LotteryAPPVO implements Serializable { private BigDecimal price; @ApiModelProperty(value = "发布时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime publishTime; @Transient @@ -98,6 +100,7 @@ public class LotteryAPPVO implements Serializable { @ApiModelProperty(value = "参与人数") private Long participateNum; + private List lotteryRegionList; public LotteryAPPVO() {