| | |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.boying.common.R; |
| | | import com.boying.entity.EnterPark; |
| | | import com.boying.entity.Park; |
| | | import com.boying.entity.User; |
| | | import com.boying.service.EnterParkService; |
| | | import com.boying.service.ParkService; |
| | | import com.boying.service.UserService; |
| | | import com.boying.util.RedisJsonUtil; |
| | |
| | | private final ParkService parkService; |
| | | private final UserService userService; |
| | | private final RedisJsonUtil redisJsonUtil; |
| | | private final EnterParkService enterParkService; |
| | | |
| | | @PostMapping("/findPage") |
| | | public Object findPage(Page page) { |
| | |
| | | } |
| | | } |
| | | |
| | | @PostMapping("/getParkCar") |
| | | public Object getParkCar(Page page, Integer parkId,String carNo) { |
| | | QueryWrapper<EnterPark> enterParkQueryWrapper = new QueryWrapper<>(); |
| | | enterParkQueryWrapper.lambda() |
| | | .eq(parkId != null,EnterPark::getParkId,parkId) |
| | | .like(StringUtils.isNotBlank(carNo),EnterPark::getCarNo,carNo) |
| | | .orderByDesc(EnterPark::getCreateTime); |
| | | Page<EnterPark> page1 = enterParkService.page(page, enterParkQueryWrapper); |
| | | for (EnterPark record : page1.getRecords()) { |
| | | record.setParkName(parkService.getById(record.getParkId()).getName()); |
| | | if(record.getImgId() != null){ |
| | | record.setImgPath("/ffzf/fileinfo/showImgById/"+record.getImgId()); |
| | | } |
| | | } |
| | | return R.ok(page1); |
| | | } |
| | | |
| | | |
| | | } |