From ef6a20003f5847c31a0bf3226f29cb051b875613 Mon Sep 17 00:00:00 2001
From: kongdeqiang <kongdeqiang960204@163.com>
Date: 星期二, 06 六月 2023 09:15:42 +0800
Subject: [PATCH] 提交更新

---
 src/main/java/com/boying/controller/phone/YCPayController.java |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/main/java/com/boying/controller/phone/YCPayController.java b/src/main/java/com/boying/controller/phone/YCPayController.java
index a4f7935..f92ccb6 100644
--- a/src/main/java/com/boying/controller/phone/YCPayController.java
+++ b/src/main/java/com/boying/controller/phone/YCPayController.java
@@ -261,14 +261,17 @@
         orderRecord.setType(1);
         orderRecord.setTicketStatus(0);
         orderRecord.setPayCode(outPark.getPayCode());
-        orderRecordService.saveOrUpdate(orderRecord);
         if(outPark.getImgId() != null){
             orderRecord.setImgOutId(outPark.getImgId());
         }
-        EnterPark enterPark = enterParkService.getByCarNoAndDate(outPark.getCarNo(), outPark.getParkId(), outPark.getEnterTime());
-        if(enterPark != null && enterPark.getImgId() != null){
-            orderRecord.setImgInId(enterPark.getImgId());
+        List<EnterPark> byCarNo = enterParkService.findByCarNo(outPark.getCarNo(),outPark.getParkId());
+        if(byCarNo.size() >0){
+            EnterPark enterPark = byCarNo.get(0);
+            if(enterPark != null && enterPark.getImgId() != null){
+                orderRecord.setImgInId(enterPark.getImgId());
+            }
         }
+        orderRecordService.saveOrUpdate(orderRecord);
     }
 
     //鎻掑叆鎵ф硶璁㈠崟璁板綍

--
Gitblit v1.9.1