|
@@ -228,11 +228,13 @@ public class UserTicketOrderController extends BaseApiController {
|
|
|
if (TicketBoxStatusEnum.STOP.getValue().equals(ticketBox.getStatus().getValue())) {
|
|
|
return AjaxResult.error("盲票已停售!");
|
|
|
}
|
|
|
- //免费的盲票当个用户只能领取一次
|
|
|
- int orderCount = userTicketOrderService.count(
|
|
|
- new LambdaQueryWrapper<UserTicketOrder>().eq(UserTicketOrder::getUserId, userId).eq(UserTicketOrder::getBoxId, orderSettleVO.getBoxId()));
|
|
|
- if (orderCount > 0) {
|
|
|
- return AjaxResult.error("用户已领取盲票!");
|
|
|
+ //免费的盲票每个用户只能领取一次
|
|
|
+ if (orderSettleVO.getPayAmt() == 0){
|
|
|
+ int orderCount = userTicketOrderService.count(
|
|
|
+ new LambdaQueryWrapper<UserTicketOrder>().eq(UserTicketOrder::getUserId, userId).eq(UserTicketOrder::getBoxId, orderSettleVO.getBoxId()));
|
|
|
+ if (orderCount > 0) {
|
|
|
+ return AjaxResult.error("您已领取过盲票!");
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
String orderId = userTicketOrderService.submitOrder(userId, orderSettleVO, userShareVO);
|