|
@@ -299,6 +299,30 @@ public class UserTicketController extends BaseApiController {
|
|
|
}
|
|
|
|
|
|
ticketBoxVO.setTicketAwardsLabelList(ticketAwardsLabelVOS);
|
|
|
+
|
|
|
+
|
|
|
+ // 轮播图的十个奖品
|
|
|
+ StringBuilder sb = new StringBuilder("FIELD(t1.awards_label,'");
|
|
|
+ int i = 0;
|
|
|
+ for (AwardsLabelEnum awardsLabelEnum : AwardsLabelEnum.values()) {
|
|
|
+ i++;
|
|
|
+ if (i == AwardsLabelEnum.values().length) {
|
|
|
+ sb.append(awardsLabelEnum.getValue()).append("'");
|
|
|
+ }else {
|
|
|
+ sb.append(awardsLabelEnum.getValue()).append("','");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ sb.append(")");
|
|
|
+
|
|
|
+ List<TicketAwardsPrizeVO> ticketAwardsPrizeVOS = ticketAwardsPrizeService.listPrizeVO(new QueryWrapper<TicketAwardsPrize>()
|
|
|
+ .eq("t1.box_id", ticketBox.getBoxId())
|
|
|
+ .eq("t2.is_deleted", 0)
|
|
|
+ .orderByAsc(sb.toString())
|
|
|
+ .orderByAsc("t1.sort")
|
|
|
+ .orderByDesc("t2.sort_weight")
|
|
|
+ .orderByDesc("t2.value")
|
|
|
+ .last("limit 10"));
|
|
|
+ ticketBoxVO.setPrizeList(ticketAwardsPrizeVOS);
|
|
|
return AjaxResult.success(ticketBoxVO);
|
|
|
}
|
|
|
|