From 83a1aa3133ce9c35fb428d0cdf4a84adda4ba3ac Mon Sep 17 00:00:00 2001
From: kongdeqiang <123456>
Date: 星期三, 24 四月 2024 16:33:42 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/main/java/com/boying/controller/ParkController.java |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/boying/controller/ParkController.java b/src/main/java/com/boying/controller/ParkController.java
index de69d43..0a9ec02 100644
--- a/src/main/java/com/boying/controller/ParkController.java
+++ b/src/main/java/com/boying/controller/ParkController.java
@@ -5,8 +5,10 @@
 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;
@@ -35,6 +37,7 @@
     private final ParkService parkService;
     private final UserService userService;
     private final RedisJsonUtil redisJsonUtil;
+    private final EnterParkService enterParkService;
 
     @PostMapping("/findPage")
     public Object findPage(Page page) {
@@ -155,4 +158,22 @@
         }
     }
 
+
+    @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);
+    }
+
 }

--
Gitblit v1.9.1