From e57e32fc43da31917912eebb4e47d4e50df1a9e9 Mon Sep 17 00:00:00 2001
From: shiyj1101 <1098226878@qq.com>
Date: 星期四, 05 八月 2021 22:56:15 +0800
Subject: [PATCH] 完善格式化功能

---
 service-user/src/main/java/com/java110/user/api/OwnerApi.java |   80 +++++++++++++++++++++++++++++++++++++--
 1 files changed, 75 insertions(+), 5 deletions(-)

diff --git a/service-user/src/main/java/com/java110/user/api/OwnerApi.java b/service-user/src/main/java/com/java110/user/api/OwnerApi.java
old mode 100644
new mode 100755
index 30c44b9..29a68b2
--- a/service-user/src/main/java/com/java110/user/api/OwnerApi.java
+++ b/service-user/src/main/java/com/java110/user/api/OwnerApi.java
@@ -1,14 +1,13 @@
 package com.java110.user.api;
 
 import com.alibaba.fastjson.JSONObject;
-import com.java110.user.bmo.owner.IQueryTenants;
-import com.java110.user.bmo.owner.IVisitorRecord;
+import com.java110.dto.owner.OwnerDto;
+import com.java110.po.owner.OwnerPo;
+import com.java110.user.bmo.owner.*;
 import com.java110.utils.util.Assert;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 @RestController
 @RequestMapping(value = "/ownerApi")
@@ -20,6 +19,16 @@
     @Autowired
     private IVisitorRecord visitorRecordImpl;
 
+    @Autowired
+    private IChangeOwnerPhone changeOwnerPhoneImpl;
+
+
+    @Autowired
+    private IComprehensiveQuery comprehensiveQueryImpl;
+
+    @Autowired
+    private IQueryShopsHireLog queryShopsHireLogImpl;
+
     @RequestMapping(value = "/tenants")
     public ResponseEntity<String> tenants(@RequestBody JSONObject reqJson) {
         Assert.hasKeyAndValue(reqJson, "code", "灏忓尯缂栫爜涓嶈兘涓虹┖");
@@ -31,4 +40,65 @@
         Assert.hasKeyAndValue(reqJson, "code", "灏忓尯缂栫爜涓嶈兘涓虹┖");
         return visitorRecordImpl.query(reqJson);
     }
+
+    /**
+     * 鍙樻洿 涓氫富鎵嬫満鍙�
+     *
+     * @param reqJson
+     * @return
+     * @service /ownerApi/changeOwnerPhone
+     * @path /app/ownerApi/changeOwnerPhoto
+     */
+    @RequestMapping(value = "/changeOwnerPhone", method = RequestMethod.POST)
+    public ResponseEntity<String> changeOwnerPhone(@RequestBody JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "link", "璇锋眰鎶ユ枃涓湭鍖呭惈鎵嬫満鍙�");
+        Assert.hasKeyAndValue(reqJson, "userId", "璇锋眰鎶ユ枃涓湭鍖呭惈鐢ㄦ埛ID");
+        Assert.hasKeyAndValue(reqJson, "memberId", "璇锋眰鎶ユ枃涓湭鍖呭惈涓氫富淇℃伅");
+        Assert.hasKeyAndValue(reqJson, "communityId", "璇锋眰鎶ユ枃涓湭鍖呭惈灏忓尯淇℃伅");
+        OwnerPo ownerPo = new OwnerPo();
+        ownerPo.setLink(reqJson.getString("link"));
+        ownerPo.setMemberId(reqJson.getString("memberId"));
+        ownerPo.setCommunityId(reqJson.getString("communityId"));
+        ownerPo.setUserId(reqJson.getString("userId"));
+
+        return changeOwnerPhoneImpl.change(ownerPo);
+    }
+
+    /**
+     * 缁煎悎鏌ヨ
+     *
+     * @param communityId 灏忓尯ID
+     * @return
+     * @service /ownerApi/comprehensiveQuery
+     * @path /app/ownerApi/comprehensiveQuery
+     */
+    @RequestMapping(value = "/comprehensiveQuery", method = RequestMethod.GET)
+    public ResponseEntity<String> comprehensiveQuery(@RequestParam(value = "communityId") String communityId,
+                                                     @RequestParam(value = "searchValue") String searchValue,
+                                                     @RequestParam(value = "searchType") String searchType,
+                                                     @RequestHeader(value = "user-id") String userId,
+                                                     @RequestHeader(value = "store-id") String storeId) {
+        return comprehensiveQueryImpl.query(communityId, searchValue, searchType, userId,storeId);
+    }
+
+    /**
+     * 寰俊鍒犻櫎娑堟伅妯℃澘
+     *
+     * @param communityId 灏忓尯ID
+     * @return
+     * @serviceCode /ownerApi/queryShopsHireLog
+     * @path /app/ownerApi/queryShopsHireLog
+     */
+    @RequestMapping(value = "/queryShopsHireLog", method = RequestMethod.GET)
+    public ResponseEntity<String> queryShopsHireLog(@RequestParam(value = "communityId") String communityId,
+                                                    @RequestParam(value = "roomId") String roomId,
+                                                    @RequestParam(value = "page") int page,
+                                                    @RequestParam(value = "row") int row) {
+        OwnerDto ownerDto = new OwnerDto();
+        ownerDto.setPage(page);
+        ownerDto.setRow(row);
+        ownerDto.setCommunityId(communityId);
+        ownerDto.setRoomId(roomId);
+        return queryShopsHireLogImpl.query(ownerDto);
+    }
 }

--
Gitblit v1.8.0