|
@@ -483,21 +483,17 @@ public class TicketBoxMgrController extends BaseApiController {
|
|
|
@ApiOperation(value = "线下盲票组停售", notes = "线下盲票组停售")
|
|
|
@PostMapping("/stop")
|
|
|
@PreAuthorize("@ss.hasPermi('business:ticket:stop')")
|
|
|
- public AjaxResult stop(@RequestBody TicketBox param) {
|
|
|
- if(StringUtils.isBlank(param.getBoxId()) || param.getStatus() == null || param.getType() == null){
|
|
|
+ public AjaxResult stop(@RequestBody TicketBoxParam param) {
|
|
|
+ if(StringUtils.isBlank(param.getBoxId())){
|
|
|
return AjaxResult.error("参数缺失");
|
|
|
}
|
|
|
TicketBox ticketBox = ticketBoxService.getById(param.getBoxId());
|
|
|
- if(param.getStatus() == TicketBoxStatusEnum.PUT_ON && param.getType() == TicketTypeEnum.OFFLINE){
|
|
|
- if(ticketBox.getStatus() == TicketBoxStatusEnum.PUT_ON && ticketBox.getType() == TicketTypeEnum.OFFLINE){
|
|
|
- ticketBoxService.update(new LambdaUpdateWrapper<TicketBox>()
|
|
|
- .set(TicketBox::getStatus, TicketBoxStatusEnum.STOP)
|
|
|
- .eq(TicketBox::getBoxId, ticketBox.getBoxId()));
|
|
|
- }else {
|
|
|
- return AjaxResult.error("当前不是已上架的线下盲票,不能进行停售操作");
|
|
|
- }
|
|
|
- }else{
|
|
|
- return AjaxResult.error("当前盲票状态及类型参数有误,不能进行停售操作");
|
|
|
+ if(ticketBox.getStatus() == TicketBoxStatusEnum.PUT_ON && ticketBox.getType() == TicketTypeEnum.OFFLINE){
|
|
|
+ ticketBoxService.update(new LambdaUpdateWrapper<TicketBox>()
|
|
|
+ .set(TicketBox::getStatus, TicketBoxStatusEnum.STOP)
|
|
|
+ .eq(TicketBox::getBoxId, ticketBox.getBoxId()));
|
|
|
+ }else {
|
|
|
+ return AjaxResult.error("当前不是已上架的线下盲票,不能进行停售操作");
|
|
|
}
|
|
|
return AjaxResult.success("操作成功");
|
|
|
}
|