魏熙美 6 年 前
コミット
7cb3c7dc05

+ 31
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/common/perproties/LoginCodePerproties.java ファイルの表示

@@ -0,0 +1,31 @@
1
+package com.community.huiju.common.perproties;
2
+
3
+import lombok.AllArgsConstructor;
4
+import lombok.Data;
5
+import lombok.NoArgsConstructor;
6
+import org.springframework.boot.context.properties.ConfigurationProperties;
7
+import org.springframework.stereotype.Component;
8
+
9
+import java.util.Map;
10
+
11
+/**
12
+ * 登陆的状态跳转url配置
13
+ * @author weiximei
14
+ */
15
+@ConfigurationProperties(prefix = "login-code-perproties")
16
+@Component
17
+@Data
18
+@AllArgsConstructor
19
+@NoArgsConstructor
20
+public class LoginCodePerproties {
21
+
22
+    private Map<String, String> loginCode;
23
+
24
+    public Map<String, String> getLoginCode() {
25
+        return loginCode;
26
+    }
27
+
28
+    public void setLoginCode(Map<String, String> loginCode) {
29
+        this.loginCode = loginCode;
30
+    }
31
+}

+ 38
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/LoginCodeController.java ファイルの表示

@@ -0,0 +1,38 @@
1
+package com.community.huiju.controller;
2
+
3
+import com.community.commom.mode.ResponseBean;
4
+import com.community.huiju.common.perproties.LoginCodePerproties;
5
+import com.google.common.collect.Maps;
6
+import io.swagger.annotations.Api;
7
+import org.springframework.beans.factory.annotation.Autowired;
8
+import org.springframework.cloud.context.config.annotation.RefreshScope;
9
+import org.springframework.web.bind.annotation.RequestMapping;
10
+import org.springframework.web.bind.annotation.RequestMethod;
11
+import org.springframework.web.bind.annotation.RequestParam;
12
+import org.springframework.web.bind.annotation.RestController;
13
+
14
+import java.util.Map;
15
+
16
+/**
17
+ * @author weiximei
18
+ */
19
+@RestController
20
+@RefreshScope
21
+@RequestMapping("/")
22
+@Api(value = "根据code获取url API", description = "根据code获取url API")
23
+public class LoginCodeController {
24
+
25
+    @Autowired
26
+    private LoginCodePerproties loginCodePerproties;
27
+
28
+    @RequestMapping(value = "/url", method = RequestMethod.GET)
29
+    public ResponseBean getUrl(@RequestParam String code) {
30
+        ResponseBean responseBean = new ResponseBean();
31
+        String url = loginCodePerproties.getLoginCode().get(code);
32
+        Map<String, String> map = Maps.newHashMap();
33
+        map.put("url", url);
34
+        responseBean.addSuccess(map);
35
+        return responseBean;
36
+    }
37
+
38
+}

+ 2
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoImpl.java ファイルの表示

@@ -97,8 +97,8 @@ public class BuildingOwnerInfoImpl implements IBuildingOwnerInfo {
97 97
     public ResponseBean hasBuild(UserElement userElement,  Integer phaseId, Integer buildingId, Integer unitId, Integer levelId, Integer roomNoId) {
98 98
         ResponseBean responseBean = new ResponseBean();
99 99
         // 1.检验该用户关联有没有这个 户号
100
-        TaUserVerify taUserVerify = taUserVerifyMapper.selectCommunityAndAddress(userElement.getId(),userElement.getCommunityId(), phaseId, buildingId, unitId, levelId, roomNoId);
101
-        if (null != taUserVerify) {
100
+        List<TaUserVerify> taUserVerify = taUserVerifyMapper.selectCommunityAndAddress(userElement.getId(),userElement.getCommunityId(), phaseId, buildingId, unitId, levelId, roomNoId, 1);
101
+        if (null != taUserVerify && taUserVerify.size() > 0) {
102 102
             responseBean.addError("您已关联此房产,无法再次关联!");
103 103
             return responseBean;
104 104
         }

+ 11
- 0
CODE/smart-community/app-api/src/main/resources/application.yml ファイルの表示

@@ -29,3 +29,14 @@ welcome:
29 29
   communityId: 83
30 30
   url: http://127.0.0.1:8823/push/face
31 31
 
32
+# 登陆的状态跳转url配置
33
+login-code-perproties:
34
+  login-code:
35
+    1000: url # 无关联房产
36
+    1001: url # 关联一个审核通过的房产
37
+    1002: url # 关联一个待审核房产
38
+    1003: url # 关联一个审核未通过房产
39
+    1004: url  # 有多个关联房产
40
+    1005: url # 该房产,暂无审核通过的业主!
41
+    1006: url # 无关联账号!
42
+    1007: url # 未注册!