|
@@ -113,11 +113,11 @@ public class UserTicketController extends BaseApiController {
|
|
|
@ApiOperation(value = "查看盲票幸运数字" , notes = "根据盲票组ID,获取盲票幸运数字")
|
|
|
public AjaxResult queryLuckyNum(@RequestBody TicketParam param) {
|
|
|
Long userId = SecurityUtils.getLoginUser().getUserId();
|
|
|
- if (StringUtils.isBlank(param.getTicketId())) {
|
|
|
- return AjaxResult.error("参数异常,盲票ID缺失");
|
|
|
+ if (StringUtils.isBlank(param.getSerialNo())) {
|
|
|
+ return AjaxResult.error("参数异常,盲票序列号缺失");
|
|
|
}
|
|
|
|
|
|
- Ticket ticket = ticketService.getById(param.getTicketId());
|
|
|
+ Ticket ticket = ticketService.getOne(new LambdaQueryWrapper<Ticket>().eq(Ticket::getSerialNo, param.getSerialNo()));
|
|
|
if (null == ticket) {
|
|
|
return AjaxResult.error("参数异常,盲票不存在");
|
|
|
}
|
|
@@ -128,7 +128,7 @@ public class UserTicketController extends BaseApiController {
|
|
|
|
|
|
// 已付款的盲票,需要校验当前用户是否有权限查看
|
|
|
if (ticket.getStatus() == TicketStatusEnum.ACTIVATED) {
|
|
|
- UserTicketOrderItem orderItem = userTicketOrderItemService.queryFinishedOrderItem(userId, param.getTicketId());
|
|
|
+ UserTicketOrderItem orderItem = userTicketOrderItemService.queryFinishedOrderItem(userId, ticket.getTicketId());
|
|
|
if (null == orderItem) {
|
|
|
return AjaxResult.error(ErrorCodeEnum.ERROR_CODE_1018);
|
|
|
}
|
|
@@ -158,11 +158,11 @@ public class UserTicketController extends BaseApiController {
|
|
|
@ApiOperation(value = "查看兑奖奖品" , notes = "根据盲票ID,查看兑奖奖品")
|
|
|
public AjaxResult queryHitPrizeList(@RequestBody TicketParam param) {
|
|
|
Long userId = SecurityUtils.getLoginUser().getUserId();
|
|
|
- if (StringUtils.isBlank(param.getTicketId())) {
|
|
|
+ if (StringUtils.isBlank(param.getSerialNo())) {
|
|
|
return AjaxResult.error("参数异常,盲票ID缺失");
|
|
|
}
|
|
|
|
|
|
- Ticket ticket = ticketService.getById(param.getTicketId());
|
|
|
+ Ticket ticket = ticketService.getOne(new LambdaQueryWrapper<Ticket>().eq(Ticket::getSerialNo, param.getSerialNo()));
|
|
|
if (null == ticket) {
|
|
|
return AjaxResult.error("参数异常,盲票不存在");
|
|
|
}
|
|
@@ -184,12 +184,12 @@ public class UserTicketController extends BaseApiController {
|
|
|
@ApiOperation(value = "兑奖" , notes = "选择奖品兑奖")
|
|
|
public AjaxResult cashPrize(@RequestBody TicketParam param) {
|
|
|
Long userId = SecurityUtils.getLoginUser().getUserId();
|
|
|
- if (StringUtils.isBlank(param.getTicketId()) || StringUtils.isBlank(param.getAwardsId())
|
|
|
+ if (StringUtils.isBlank(param.getSerialNo()) || StringUtils.isBlank(param.getAwardsId())
|
|
|
|| StringUtils.isBlank(param.getPrizeId())) {
|
|
|
return AjaxResult.error("参数缺失");
|
|
|
}
|
|
|
|
|
|
- Ticket ticket = ticketService.getById(param.getTicketId());
|
|
|
+ Ticket ticket = ticketService.getOne(new LambdaQueryWrapper<Ticket>().eq(Ticket::getSerialNo, param.getSerialNo()));
|
|
|
if (null == ticket) {
|
|
|
return AjaxResult.error("参数异常,盲票不存在");
|
|
|
}
|