From e52ddfe8caf7d0027950033a5aff2a1fd3482e9d Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期三, 01 六月 2022 17:50:25 +0800
Subject: [PATCH] 优化装修 跟踪记录 回显

---
 service-user/src/main/java/com/java110/user/api/RentingAppointmentApi.java |   34 +++++++++++++++++++++++++++++-----
 1 files changed, 29 insertions(+), 5 deletions(-)

diff --git a/service-user/src/main/java/com/java110/user/api/RentingAppointmentApi.java b/service-user/src/main/java/com/java110/user/api/RentingAppointmentApi.java
old mode 100644
new mode 100755
index 3f39414..a7f696d
--- a/service-user/src/main/java/com/java110/user/api/RentingAppointmentApi.java
+++ b/service-user/src/main/java/com/java110/user/api/RentingAppointmentApi.java
@@ -2,11 +2,9 @@
 
 import com.alibaba.fastjson.JSONObject;
 import com.java110.dto.rentingAppointment.RentingAppointmentDto;
+import com.java110.dto.store.StoreDto;
 import com.java110.po.rentingAppointment.RentingAppointmentPo;
-import com.java110.user.bmo.rentingAppointment.IDeleteRentingAppointmentBMO;
-import com.java110.user.bmo.rentingAppointment.IGetRentingAppointmentBMO;
-import com.java110.user.bmo.rentingAppointment.ISaveRentingAppointmentBMO;
-import com.java110.user.bmo.rentingAppointment.IUpdateRentingAppointmentBMO;
+import com.java110.user.bmo.rentingAppointment.*;
 import com.java110.utils.util.Assert;
 import com.java110.utils.util.BeanConvertUtil;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -31,6 +29,9 @@
 
     @Autowired
     private IGetRentingAppointmentBMO getRentingAppointmentBMOImpl;
+
+    @Autowired
+    private IConfirmRentingBMO confirmRentingBMOImpl;
 
     /**
      * 寰俊淇濆瓨娑堟伅妯℃澘
@@ -115,10 +116,33 @@
         RentingAppointmentDto rentingAppointmentDto = new RentingAppointmentDto();
         rentingAppointmentDto.setPage(page);
         rentingAppointmentDto.setRow(row);
-        rentingAppointmentDto.setStoreId(storeId);
+        if (!StoreDto.STORE_ADMIN.equals(storeId)) {
+            rentingAppointmentDto.setStoreId(storeId);
+        }
         rentingAppointmentDto.setState(state);
         rentingAppointmentDto.setTenantName(tenantName);
         rentingAppointmentDto.setTenantTel(tenantTel);
         return getRentingAppointmentBMOImpl.get(rentingAppointmentDto);
     }
+
+
+    /**
+     * 纭绉熸埧
+     *
+     * @param reqJson
+     * @return
+     * @serviceCode /rentingAppointment/confirmRenting
+     * @path /app/rentingAppointment/confirmRenting
+     */
+    @RequestMapping(value = "/confirmRenting", method = RequestMethod.POST)
+    public ResponseEntity<String> confirmRenting(@RequestBody JSONObject reqJson) {
+
+        Assert.hasKeyAndValue(reqJson, "appointmentId", "appointmentId涓嶈兘涓虹┖");
+        Assert.hasKeyAndValue(reqJson, "rentingId", "rentingId涓嶈兘涓虹┖");
+
+        RentingAppointmentPo rentingAppointmentPo = BeanConvertUtil.covertBean(reqJson, RentingAppointmentPo.class);
+        return confirmRentingBMOImpl.confirm(rentingAppointmentPo);
+    }
+
+
 }

--
Gitblit v1.8.0