|
|
|
@ -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;
|
|
|
|
|