|
@@ -3,16 +3,13 @@ package com.java110.user.api;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.java110.po.owner.OwnerPo;
|
|
import com.java110.po.owner.OwnerPo;
|
|
|
import com.java110.user.bmo.owner.IChangeOwnerPhone;
|
|
import com.java110.user.bmo.owner.IChangeOwnerPhone;
|
|
|
|
|
+import com.java110.user.bmo.owner.IComprehensiveQuery;
|
|
|
import com.java110.user.bmo.owner.IQueryTenants;
|
|
import com.java110.user.bmo.owner.IQueryTenants;
|
|
|
import com.java110.user.bmo.owner.IVisitorRecord;
|
|
import com.java110.user.bmo.owner.IVisitorRecord;
|
|
|
import com.java110.utils.util.Assert;
|
|
import com.java110.utils.util.Assert;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.http.HttpMethod;
|
|
|
|
|
import org.springframework.http.ResponseEntity;
|
|
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.RequestMethod;
|
|
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
@RestController
|
|
@RestController
|
|
|
@RequestMapping(value = "/ownerApi")
|
|
@RequestMapping(value = "/ownerApi")
|
|
@@ -27,6 +24,10 @@ public class OwnerApi {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private IChangeOwnerPhone changeOwnerPhoneImpl;
|
|
private IChangeOwnerPhone changeOwnerPhoneImpl;
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private IComprehensiveQuery comprehensiveQueryImpl;
|
|
|
|
|
+
|
|
|
@RequestMapping(value = "/tenants")
|
|
@RequestMapping(value = "/tenants")
|
|
|
public ResponseEntity<String> tenants(@RequestBody JSONObject reqJson) {
|
|
public ResponseEntity<String> tenants(@RequestBody JSONObject reqJson) {
|
|
|
Assert.hasKeyAndValue(reqJson, "code", "小区编码不能为空");
|
|
Assert.hasKeyAndValue(reqJson, "code", "小区编码不能为空");
|
|
@@ -49,10 +50,10 @@ public class OwnerApi {
|
|
|
*/
|
|
*/
|
|
|
@RequestMapping(value = "/changeOwnerPhone", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/changeOwnerPhone", method = RequestMethod.POST)
|
|
|
public ResponseEntity<String> changeOwnerPhone(@RequestBody JSONObject reqJson) {
|
|
public ResponseEntity<String> changeOwnerPhone(@RequestBody JSONObject reqJson) {
|
|
|
- Assert.hasKeyAndValue(reqJson,"link","请求报文中未包含手机号");
|
|
|
|
|
- Assert.hasKeyAndValue(reqJson,"userId","请求报文中未包含用户ID");
|
|
|
|
|
- Assert.hasKeyAndValue(reqJson,"memberId","请求报文中未包含业主信息");
|
|
|
|
|
- Assert.hasKeyAndValue(reqJson,"communityId","请求报文中未包含小区信息");
|
|
|
|
|
|
|
+ Assert.hasKeyAndValue(reqJson, "link", "请求报文中未包含手机号");
|
|
|
|
|
+ Assert.hasKeyAndValue(reqJson, "userId", "请求报文中未包含用户ID");
|
|
|
|
|
+ Assert.hasKeyAndValue(reqJson, "memberId", "请求报文中未包含业主信息");
|
|
|
|
|
+ Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含小区信息");
|
|
|
OwnerPo ownerPo = new OwnerPo();
|
|
OwnerPo ownerPo = new OwnerPo();
|
|
|
ownerPo.setLink(reqJson.getString("link"));
|
|
ownerPo.setLink(reqJson.getString("link"));
|
|
|
ownerPo.setMemberId(reqJson.getString("memberId"));
|
|
ownerPo.setMemberId(reqJson.getString("memberId"));
|
|
@@ -61,4 +62,19 @@ public class OwnerApi {
|
|
|
|
|
|
|
|
return changeOwnerPhoneImpl.change(ownerPo);
|
|
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) {
|
|
|
|
|
+ return comprehensiveQueryImpl.query(communityId, searchValue, searchType);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|