release: lottery list 也显示地区属性

release-2024-04-25
huangyw 1 month ago
parent 1ee3ad721f
commit 2658bedf84

@ -561,6 +561,27 @@ public class LotteryService {
long participateNum = getParticipateNumByLotteryId(lottery.getId());
// 设置抽奖人数
lottery.setParticipateNum(participateNum);
QLotteryRegion qLotteryRegion = QLotteryRegion.lotteryRegion;
QRegion qRegion = QRegion.region;
List<LotteryRegionDetailVO> 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;

@ -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<LotteryRegionDetailVO> lotteryRegionList;
public LotteryAPPVO() {

Loading…
Cancel
Save