|
@@ -7,6 +7,7 @@ import com.qs.mp.admin.domain.Ticket;
|
|
|
import com.qs.mp.admin.domain.TicketAwards;
|
|
|
import com.qs.mp.admin.domain.TicketAwardsPrize;
|
|
|
import com.qs.mp.admin.domain.dto.TicketDrawNumDTO;
|
|
|
+import com.qs.mp.admin.domain.vo.TicketListVO;
|
|
|
import com.qs.mp.admin.service.*;
|
|
|
import com.qs.mp.common.core.domain.AjaxResult;
|
|
|
import com.qs.mp.common.enums.*;
|
|
@@ -127,17 +128,22 @@ public class UserHitPrizeServiceImpl extends ServiceImpl<UserHitPrizeMapper, Use
|
|
|
List<TicketAwardsPrize> ticketAwardsPrizeList = ticketAwardsPrizeService.list(new LambdaQueryWrapper<TicketAwardsPrize>()
|
|
|
.eq(TicketAwardsPrize::getBoxId, param.getBoxId()));
|
|
|
|
|
|
- List<TicketAwardsPrize> params = new ArrayList<>();
|
|
|
+ List<List<TicketAwardsPrize>> params = new ArrayList<>();
|
|
|
int index = 0;
|
|
|
- for (int i = 0; i < 48; i++) {
|
|
|
- TicketAwardsPrize ticketAwardsPrize = new TicketAwardsPrize();
|
|
|
- BeanUtils.copyProperties(ticketAwardsPrizeList.get(index),ticketAwardsPrize);
|
|
|
- params.add(ticketAwardsPrize);
|
|
|
- if (index == ticketAwardsPrizeList.size() - 1) {
|
|
|
- index = 0;
|
|
|
- continue;
|
|
|
+ for (int i = 0; i < 16; i++) {
|
|
|
+ List<TicketAwardsPrize> list = new ArrayList<>();
|
|
|
+ for (int j = 0; j < 3; j++) {
|
|
|
+ TicketAwardsPrize ticketAwardsPrize = new TicketAwardsPrize();
|
|
|
+ BeanUtils.copyProperties(ticketAwardsPrizeList.get(index),ticketAwardsPrize);
|
|
|
+ list.add(ticketAwardsPrize);
|
|
|
+ if (index == ticketAwardsPrizeList.size() - 1) {
|
|
|
+ index = 0;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ index++;
|
|
|
}
|
|
|
- index++;
|
|
|
+ params.add(list);
|
|
|
+
|
|
|
}
|
|
|
userHitPrizeDetailVO.setTicketAwardsPrizeList(params);
|
|
|
if (param.getIsTry() == 1) {
|
|
@@ -156,7 +162,10 @@ public class UserHitPrizeServiceImpl extends ServiceImpl<UserHitPrizeMapper, Use
|
|
|
userHitPrizeDetailVO.setRefId(ticketAwardsPrize.getRefId());
|
|
|
}else {
|
|
|
|
|
|
- Ticket ticket = ticketService.getById(param.getTicketId());
|
|
|
+ TicketListVO ticketListVO = userTicketOrderItemService.queryTicketVO(userId,
|
|
|
+ param.getOrderId());
|
|
|
+
|
|
|
+ Ticket ticket = ticketService.getById(ticketListVO.getTicketId());
|
|
|
if (null == ticket) {
|
|
|
throw new ServiceException("参数异常,盲票不存在");
|
|
|
}
|