| | |
| | | public Object findPage(Page page, TicketBlack ticket){ |
| | | QueryWrapper<TicketBlack> wrapper = new QueryWrapper<>(); |
| | | wrapper.lambda() |
| | | .eq(TicketBlack::getBlackType,0) |
| | | .like(StringUtils.isNotBlank(ticket.getCarNo()),TicketBlack::getCarNo,ticket.getCarNo()) |
| | | .eq(ticket.getIsActive() != null,TicketBlack::getIsActive,ticket.getIsActive()) |
| | | .orderByDesc(TicketBlack::getCreateTime); |
| | |
| | | public Object delete(Long id){ |
| | | TicketBlack ticket =ticketBlackService.getById(id); |
| | | if(ticket!=null){ |
| | | if(ticket.getViolationCount() >0 ){ |
| | | return R.failed("请先解决违章"); |
| | | } |
| | | ticketBlackService.removeById(ticket); |
| | | return R.ok("操作成功"); |
| | | } |