Bläddra i källkod

修改 实体

魏熙美 6 år sedan
förälder
incheckning
b31c1a87ea
15 ändrade filer med 337 tillägg och 357 borttagningar
  1. 22
    22
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/IBuildingOwnerInfoController.java
  2. 6
    6
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaUserMapper.java
  3. 6
    6
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaUserVerifyMapper.java
  4. 0
    11
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBuildingMapper.java
  5. 5
    12
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBuildingOwnerInfoMapper.java
  6. 81
    99
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaUserVerify.java
  7. 20
    30
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpBuilding.java
  8. 4
    4
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/IBuildingOwnerInfo.java
  9. 6
    6
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoImpl.java
  10. 15
    10
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java
  11. 2
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserVerifyServicelmpl.java
  12. 5
    5
      CODE/smart-community/app-api/src/main/resources/mapper/TaUserMapper.xml
  13. 123
    70
      CODE/smart-community/app-api/src/main/resources/mapper/TaUserVerifyMapper.xml
  14. 40
    72
      CODE/smart-community/app-api/src/main/resources/mapper/TpBuildingMapper.xml
  15. 2
    2
      CODE/smart-community/app-api/src/main/resources/mapper/TpBuildingOwnerInfoMapper.xml

+ 22
- 22
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/IBuildingOwnerInfoController.java Visa fil

@@ -35,21 +35,21 @@ public class IBuildingOwnerInfoController extends BaseController {
35 35
     @ApiOperation(value = "根据 小区/期/楼栋/单元/楼层/户号", notes = "根据 小区/期/楼栋/单元/楼层/户号")
36 36
     @ApiImplicitParams({
37 37
             @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "communityId", value = "小区"),
38
-            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "phase", value = "期"),
39
-            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "building", value = "楼栋"),
40
-            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "unit", value = "单元"),
41
-            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "level", value = "楼层"),
42
-            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "roomNo", value = "户号"),
38
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "phaseId", value = "期"),
39
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "buildingId", value = "楼栋"),
40
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "unitId", value = "单元"),
41
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "levelId", value = "楼层"),
42
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "roomNoId", value = "户号"),
43 43
     })
44 44
     public ResponseBean selectByAddress(@RequestParam("communityId") Integer communityId,
45
-                                        @RequestParam(value = "phase", required = false) String phase,
46
-                                        @RequestParam(value = "building",required = false) String building,
47
-                                        @RequestParam(value = "unit", required = false) String unit,
48
-                                        @RequestParam(value = "level", required = false) String level,
49
-                                        @RequestParam(value = "roomNo", required = false) String roomNo) {
45
+                                        @RequestParam(value = "phaseId", required = false) Integer phaseId,
46
+                                        @RequestParam(value = "buildingId",required = false) Integer buildingId,
47
+                                        @RequestParam(value = "unitId", required = false) Integer unitId,
48
+                                        @RequestParam(value = "levelId", required = false) Integer levelId,
49
+                                        @RequestParam(value = "roomNoId", required = false) Integer roomNoId) {
50 50
 
51 51
         ResponseBean responseBean = new ResponseBean();
52
-        responseBean = iBuildingOwnerInfo.selectBuildList(communityId, phase, building, unit, level, roomNo);
52
+        responseBean = iBuildingOwnerInfo.selectBuildList(communityId, phaseId, buildingId, unitId, levelId, roomNoId);
53 53
         return responseBean;
54 54
 
55 55
     }
@@ -57,23 +57,23 @@ public class IBuildingOwnerInfoController extends BaseController {
57 57
     @RequestMapping(value = "/building/has", method = RequestMethod.GET)
58 58
     @ApiOperation(value = "根据 小区、期、楼栋、单元、楼层、户号", notes = "根据 小区、期、楼栋、单元、楼层、户号")
59 59
     @ApiImplicitParams({
60
-            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "phase", value = "期"),
61
-            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "building", value = "楼栋"),
62
-            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "unit", value = "单元"),
63
-            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "level", value = "楼层"),
64
-            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "roomNo", value = "户号"),
60
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "phaseId", value = "期"),
61
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "buildingId", value = "楼栋"),
62
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "unitId", value = "单元"),
63
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "levelId", value = "楼层"),
64
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "roomNoId", value = "户号"),
65 65
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token")
66 66
     })
67
-    public ResponseBean hasBuilding(@RequestParam(value = "phase", required = false) String phase,
68
-                                   @RequestParam(value = "building",required = false) String building,
69
-                                   @RequestParam(value = "unit", required = false) String unit,
70
-                                   @RequestParam(value = "level", required = false) String level,
71
-                                   @RequestParam(value = "roomNo", required = false) String roomNo,
67
+    public ResponseBean hasBuilding(@RequestParam(value = "phaseId", required = false) Integer phaseId,
68
+                                   @RequestParam(value = "buildingId",required = false) Integer buildingId,
69
+                                   @RequestParam(value = "unitId", required = false) Integer unitId,
70
+                                   @RequestParam(value = "levelId", required = false) Integer levelId,
71
+                                   @RequestParam(value = "roomNoId", required = false) Integer roomNoId,
72 72
                                    HttpSession session){
73 73
 
74 74
         ResponseBean responseBean = new ResponseBean();
75 75
         UserElement userElement = getUserElement(session);
76
-        responseBean = iBuildingOwnerInfo.hasBuild(userElement, phase, building, unit, level, roomNo);
76
+        responseBean = iBuildingOwnerInfo.hasBuild(userElement, phaseId, buildingId, unitId, levelId, roomNoId);
77 77
         return responseBean;
78 78
     }
79 79
 

+ 6
- 6
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaUserMapper.java Visa fil

@@ -45,14 +45,14 @@ public interface TaUserMapper {
45 45
     /**
46 46
      * 查询房屋成员列表
47 47
      * @param communityId
48
-     * @param phase
49
-     * @param building
50
-     * @param unit
51
-     * @param level
52
-     * @param roomNo
48
+     * @param phaseId
49
+     * @param buildingId
50
+     * @param unitId
51
+     * @param levelId
52
+     * @param roomNoId
53 53
      * @return
54 54
      */
55
-    List<TaUser> selectHouseUserList(@Param("communityId") Integer communityId, @Param("phase") String phase, @Param("building") String building, @Param("unit") String unit, @Param("level") String level, @Param("roomNo") String roomNo, @Param("userId") Integer userId);
55
+    List<TaUser> selectHouseUserList(@Param("communityId") Integer communityId, @Param("phaseId") Integer phaseId, @Param("buildingId") Integer buildingId, @Param("unitId") Integer unitId, @Param("levelId") Integer levelId, @Param("roomNoId") Integer roomNoId, @Param("userId") Integer userId);
56 56
 
57 57
     /**
58 58
      * 判断当前用户的关联关系

+ 6
- 6
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaUserVerifyMapper.java Visa fil

@@ -31,12 +31,12 @@ public interface TaUserVerifyMapper {
31 31
     /**
32 32
      * 根据 用户id、小区id 、 小区、期、栋、单元、楼层、户号 进行条件查询
33 33
      * @param communityId
34
-     * @param phase
35
-     * @param building
36
-     * @param unit
37
-     * @param level
38
-     * @param roomNo
34
+     * @param phaseId
35
+     * @param buildingId
36
+     * @param unitId
37
+     * @param levelId
38
+     * @param roomNoId
39 39
      * @return
40 40
      */
41
-    TaUserVerify selectCommunityAndAddress(Integer userId,Integer communityId,String phase,String building, String unit,String level,String roomNo);
41
+    TaUserVerify selectCommunityAndAddress(Integer userId,Integer communityId,Integer phaseId,Integer buildingId, Integer unitId,Integer levelId,Integer roomNoId);
42 42
 }

+ 0
- 11
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBuildingMapper.java Visa fil

@@ -20,17 +20,6 @@ public interface TpBuildingMapper {
20 20
 
21 21
     int updateByPrimaryKey(TpBuilding record);
22 22
 
23
-    /**
24
-     * 根据 小区/期/栋/单元/楼层/户号 进行条件查询
25
-     * @param communityId
26
-     * @param phaseId
27
-     * @param buildingId
28
-     * @param unitId
29
-     * @param levelId
30
-     * @param roomNo
31
-     * @return
32
-     */
33
-    List<TpBuilding> selectByAddress(Integer communityId,Integer phaseId,Integer buildingId, Integer unitId,Integer levelId,String roomNo);
34 23
 
35 24
 
36 25
 }

+ 5
- 12
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBuildingOwnerInfoMapper.java Visa fil

@@ -31,13 +31,6 @@ public interface TpBuildingOwnerInfoMapper {
31 31
     //根据手机号查询当前信息
32 32
     TpBuildingOwnerInfo selectOwnerTel(@Param("ownerTel")String ownerTel);
33 33
 
34
-
35
-    /**
36
-     * 查询当前房产所在的小区
37
-     * @return
38
-     */
39
-//    List<TpBuildingOwnerInfo> buildingownerinfoList(@Param("name") String name,@Param("phone") String phone);
40
-
41 34
     /*
42 35
      * 根据 小区,期,楼栋,单元,楼层,户号
43 36
      * @param communityId
@@ -50,10 +43,10 @@ public interface TpBuildingOwnerInfoMapper {
50 43
      */
51 44
     @ResultMap("BaseResultMap")
52 45
     @Select("select * from tp_building_owner_info where community_id=#{communityId}" +
53
-            " and phase=#{phase} and building=#{building} and unit=#{unit}" +
54
-            " and level=#{level} and room_no=#{roomNo} and verify_status=1")
55
-    TpBuildingOwnerInfo selectCommunityIdAndAddress(@Param("communityId") Integer communityId, @Param("phase") String phase,
56
-                                                    @Param("building") String building, @Param("unit") String unit,
57
-                                                    @Param("level") String level, @Param("roomNo") String roomNo);
46
+            " and phase_id=#{phaseId} and building_id=#{buildingId} and unit_id=#{unitId}" +
47
+            " and level_id=#{levelId} and room_no_id=#{roomNoId} and verify_status=1")
48
+    TpBuildingOwnerInfo selectCommunityIdAndAddress(@Param("communityId") Integer communityId, @Param("phaseId") Integer phaseId,
49
+                                                    @Param("buildingId") Integer building, @Param("unitId") Integer unitId,
50
+                                                    @Param("levelId") Integer level, @Param("roomNoId") Integer roomNoId);
58 51
 
59 52
 }

+ 81
- 99
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaUserVerify.java Visa fil

@@ -11,56 +11,30 @@ public class TaUserVerify {
11 11
 
12 12
     private Integer roleId;
13 13
 
14
-    private String phase;
14
+    private Integer phaseId;
15 15
 
16
-    private String building;
16
+    private String phaseName;
17 17
 
18
-    private String unit;
18
+    private Integer buildingId;
19 19
 
20
-    private String level;
20
+    private String buildingName;
21 21
 
22
-    private String roomNo;
22
+    private Integer unitId;
23 23
 
24
-    private String verifyStatus;
25
-
26
-    private Date createDate;
24
+    private String unitName;
27 25
 
28
-    /**
29
-     * 期
30
-     */
31
-    private  String phaseName;
32
-
33
-    /**
34
-     * 栋
35
-     */
36
-    private  String buildingName;
26
+    private Integer levelId;
37 27
 
38
-    /**
39
-     * 单元
40
-     */
41
-    private  String unitName;
28
+    private String levelName;
42 29
 
43
-    /**
44
-     * 楼层
45
-     */
46
-    private  String levelName;
30
+    private Integer roomNoId;
47 31
 
48
-    /**
49
-     * 房间号
50
-     */
51
-    private  String roomNoName;
32
+    private String roomNoName;
52 33
 
53
-    public String getPhaseName() {
54
-        return phaseName;
55
-    }
34
+    private String verifyStatus;
56 35
 
57
-    public void setPhaseName(String phaseName) {
58
-        this.phaseName = phaseName;
59
-    }
36
+    private Date createDate;
60 37
 
61
-    /**
62
-     * 审核人姓名
63
-     */
64 38
     private String verifyName;
65 39
 
66 40
     //  ------------------
@@ -118,44 +92,84 @@ public class TaUserVerify {
118 92
         this.roleId = roleId;
119 93
     }
120 94
 
121
-    public String getPhase() {
122
-        return phase;
95
+    public Integer getPhaseId() {
96
+        return phaseId;
97
+    }
98
+
99
+    public void setPhaseId(Integer phaseId) {
100
+        this.phaseId = phaseId;
101
+    }
102
+
103
+    public String getPhaseName() {
104
+        return phaseName;
105
+    }
106
+
107
+    public void setPhaseName(String phaseName) {
108
+        this.phaseName = phaseName;
109
+    }
110
+
111
+    public Integer getBuildingId() {
112
+        return buildingId;
113
+    }
114
+
115
+    public void setBuildingId(Integer buildingId) {
116
+        this.buildingId = buildingId;
117
+    }
118
+
119
+    public String getBuildingName() {
120
+        return buildingName;
123 121
     }
124 122
 
125
-    public void setPhase(String phase) {
126
-        this.phase = phase == null ? null : phase.trim();
123
+    public void setBuildingName(String buildingName) {
124
+        this.buildingName = buildingName;
125
+    }
126
+
127
+    public Integer getUnitId() {
128
+        return unitId;
129
+    }
130
+
131
+    public void setUnitId(Integer unitId) {
132
+        this.unitId = unitId;
133
+    }
134
+
135
+    public String getUnitName() {
136
+        return unitName;
137
+    }
138
+
139
+    public void setUnitName(String unitName) {
140
+        this.unitName = unitName;
127 141
     }
128 142
 
129
-    public String getBuilding() {
130
-        return building;
143
+    public Integer getLevelId() {
144
+        return levelId;
131 145
     }
132 146
 
133
-    public void setBuilding(String building) {
134
-        this.building = building == null ? null : building.trim();
147
+    public void setLevelId(Integer levelId) {
148
+        this.levelId = levelId;
135 149
     }
136 150
 
137
-    public String getUnit() {
138
-        return unit;
151
+    public String getLevelName() {
152
+        return levelName;
139 153
     }
140 154
 
141
-    public void setUnit(String unit) {
142
-        this.unit = unit == null ? null : unit.trim();
155
+    public void setLevelName(String levelName) {
156
+        this.levelName = levelName;
143 157
     }
144 158
 
145
-    public String getLevel() {
146
-        return level;
159
+    public Integer getRoomNoId() {
160
+        return roomNoId;
147 161
     }
148 162
 
149
-    public void setLevel(String level) {
150
-        this.level = level == null ? null : level.trim();
163
+    public void setRoomNoId(Integer roomNoId) {
164
+        this.roomNoId = roomNoId;
151 165
     }
152 166
 
153
-    public String getRoomNo() {
154
-        return roomNo;
167
+    public String getRoomNoName() {
168
+        return roomNoName;
155 169
     }
156 170
 
157
-    public void setRoomNo(String roomNo) {
158
-        this.roomNo = roomNo == null ? null : roomNo.trim();
171
+    public void setRoomNoName(String roomNoName) {
172
+        this.roomNoName = roomNoName;
159 173
     }
160 174
 
161 175
     public String getVerifyStatus() {
@@ -163,7 +177,7 @@ public class TaUserVerify {
163 177
     }
164 178
 
165 179
     public void setVerifyStatus(String verifyStatus) {
166
-        this.verifyStatus = verifyStatus == null ? null : verifyStatus.trim();
180
+        this.verifyStatus = verifyStatus;
167 181
     }
168 182
 
169 183
     public Date getCreateDate() {
@@ -174,6 +188,14 @@ public class TaUserVerify {
174 188
         this.createDate = createDate;
175 189
     }
176 190
 
191
+    public String getVerifyName() {
192
+        return verifyName;
193
+    }
194
+
195
+    public void setVerifyName(String verifyName) {
196
+        this.verifyName = verifyName;
197
+    }
198
+
177 199
     public String getRoleName() {
178 200
         return roleName;
179 201
     }
@@ -190,14 +212,6 @@ public class TaUserVerify {
190 212
         this.ownerName = ownerName;
191 213
     }
192 214
 
193
-    public String getVerifyName() {
194
-        return verifyName;
195
-    }
196
-
197
-    public void setVerifyName(String verifyName) {
198
-        this.verifyName = verifyName;
199
-    }
200
-
201 215
     public String getCommunityName() {
202 216
         return communityName;
203 217
     }
@@ -213,36 +227,4 @@ public class TaUserVerify {
213 227
     public void setCommunityAddress(String communityAddress) {
214 228
         this.communityAddress = communityAddress;
215 229
     }
216
-
217
-    public String getBuildingName() {
218
-        return buildingName;
219
-    }
220
-
221
-    public String getUnitName() {
222
-        return unitName;
223
-    }
224
-
225
-    public String getLevelName() {
226
-        return levelName;
227
-    }
228
-
229
-    public String getRoomNoName() {
230
-        return roomNoName;
231
-    }
232
-
233
-    public void setBuildingName(String buildingName) {
234
-        this.buildingName = buildingName;
235
-    }
236
-
237
-    public void setUnitName(String unitName) {
238
-        this.unitName = unitName;
239
-    }
240
-
241
-    public void setLevelName(String levelName) {
242
-        this.levelName = levelName;
243
-    }
244
-
245
-    public void setRoomNoName(String roomNoName) {
246
-        this.roomNoName = roomNoName;
247
-    }
248 230
 }

+ 20
- 30
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpBuilding.java Visa fil

@@ -7,15 +7,13 @@ public class TpBuilding {
7 7
 
8 8
     private Integer communityId;
9 9
 
10
-    private String phase;
10
+    private Integer phaseId;
11 11
 
12
-    private String building;
12
+    private String phaseName;
13 13
 
14
-    private String unit;
14
+    private String name;
15 15
 
16
-    private String level;
17
-
18
-    private String roomNo;
16
+    private String sort;
19 17
 
20 18
     private Date createDate;
21 19
 
@@ -35,44 +33,36 @@ public class TpBuilding {
35 33
         this.communityId = communityId;
36 34
     }
37 35
 
38
-    public String getPhase() {
39
-        return phase;
40
-    }
41
-
42
-    public void setPhase(String phase) {
43
-        this.phase = phase == null ? null : phase.trim();
44
-    }
45
-
46
-    public String getBuilding() {
47
-        return building;
36
+    public Integer getPhaseId() {
37
+        return phaseId;
48 38
     }
49 39
 
50
-    public void setBuilding(String building) {
51
-        this.building = building == null ? null : building.trim();
40
+    public void setPhaseId(Integer phaseId) {
41
+        this.phaseId = phaseId;
52 42
     }
53 43
 
54
-    public String getUnit() {
55
-        return unit;
44
+    public String getPhaseName() {
45
+        return phaseName;
56 46
     }
57 47
 
58
-    public void setUnit(String unit) {
59
-        this.unit = unit == null ? null : unit.trim();
48
+    public void setPhaseName(String phaseName) {
49
+        this.phaseName = phaseName;
60 50
     }
61 51
 
62
-    public String getLevel() {
63
-        return level;
52
+    public String getName() {
53
+        return name;
64 54
     }
65 55
 
66
-    public void setLevel(String level) {
67
-        this.level = level == null ? null : level.trim();
56
+    public void setName(String name) {
57
+        this.name = name;
68 58
     }
69 59
 
70
-    public String getRoomNo() {
71
-        return roomNo;
60
+    public String getSort() {
61
+        return sort;
72 62
     }
73 63
 
74
-    public void setRoomNo(String roomNo) {
75
-        this.roomNo = roomNo == null ? null : roomNo.trim();
64
+    public void setSort(String sort) {
65
+        this.sort = sort;
76 66
     }
77 67
 
78 68
     public Date getCreateDate() {

+ 4
- 4
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/IBuildingOwnerInfo.java Visa fil

@@ -19,10 +19,10 @@ public interface IBuildingOwnerInfo {
19 19
      * @param buildingId
20 20
      * @param unitId
21 21
      * @param levelId
22
-     * @param roomNo
22
+     * @param roomNoId
23 23
      * @return
24 24
      */
25
-    ResponseBean selectBuildList(Integer communityId, Integer phaseId, Integer buildingId, Integer unitId, Integer levelId, String roomNo);
25
+    ResponseBean selectBuildList(Integer communityId, Integer phaseId, Integer buildingId, Integer unitId, Integer levelId, Integer roomNoId);
26 26
 
27 27
     /**
28 28
      * 根据 小区/期/楼栋/单元/楼层/户号
@@ -30,9 +30,9 @@ public interface IBuildingOwnerInfo {
30 30
      * @param buildingId
31 31
      * @param unitId
32 32
      * @param levelId
33
-     * @param roomNo
33
+     * @param roomNoId
34 34
      * @return
35 35
      */
36
-    ResponseBean hasBuild(UserElement userElement,Integer phaseId, Integer buildingId, Integer unitId, Integer levelId, String roomNo);
36
+    ResponseBean hasBuild(UserElement userElement,Integer phaseId, Integer buildingId, Integer unitId, Integer levelId, Integer roomNoId);
37 37
 
38 38
 }

+ 6
- 6
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoImpl.java Visa fil

@@ -39,19 +39,19 @@ public class BuildingOwnerInfoImpl implements IBuildingOwnerInfo {
39 39
     private TaUserVerifyMapper taUserVerifyMapper;
40 40
 
41 41
     @Override
42
-    public ResponseBean selectBuildList(Integer communityId, Integer phaseId, Integer buildingId, Integer unitId, Integer levelId, String roomNo) {
42
+    public ResponseBean selectBuildList(Integer communityId, Integer phaseId, Integer buildingId, Integer unitId, Integer levelId, Integer roomNoId) {
43 43
         ResponseBean responseBean = new ResponseBean();
44 44
 
45
-        List<TpBuilding> buildingList = tpBuildingMapper.selectByAddress(communityId, phaseId, buildingId, unitId, levelId, roomNo);
46
-        responseBean.addSuccess(buildingList);
45
+
46
+        responseBean.addSuccess(null);
47 47
         return responseBean;
48 48
     }
49 49
 
50 50
     @Override
51
-    public ResponseBean hasBuild(UserElement userElement,  Integer phaseId, Integer buildingId, Integer unitId, Integer levelId, String roomNo) {
51
+    public ResponseBean hasBuild(UserElement userElement,  Integer phaseId, Integer buildingId, Integer unitId, Integer levelId, Integer roomNoId) {
52 52
         ResponseBean responseBean = new ResponseBean();
53 53
         // 1.检验该用户关联有没有这个 户号
54
-        TaUserVerify taUserVerify = taUserVerifyMapper.selectCommunityAndAddress(userElement.getId(),userElement.getCommunityId(), phaseId, buildingId, unitId, levelId, roomNo);
54
+        TaUserVerify taUserVerify = taUserVerifyMapper.selectCommunityAndAddress(userElement.getId(),userElement.getCommunityId(), phaseId, buildingId, unitId, levelId, roomNoId);
55 55
         if (null != taUserVerify) {
56 56
             responseBean.addError("您已关联此房产,无法再次关联!");
57 57
             return responseBean;
@@ -61,7 +61,7 @@ public class BuildingOwnerInfoImpl implements IBuildingOwnerInfo {
61 61
 
62 62
         // TODO 楼栋资料库查询有变动
63 63
         // 2.检验这个户号是否关联了 户主
64
-        TpBuildingOwnerInfo tpBuildingOwnerInfo = tpBuildingOwnerInfoMapper.selectCommunityIdAndAddress(userElement.getCommunityId(), phase, building, unit, level, roomNo);
64
+        TpBuildingOwnerInfo tpBuildingOwnerInfo = tpBuildingOwnerInfoMapper.selectCommunityIdAndAddress(userElement.getCommunityId(), phaseId, buildingId, unitId, levelId, roomNoId);
65 65
         if (null != tpBuildingOwnerInfo) {
66 66
             result.put("ownerName",tpBuildingOwnerInfo.getOwnerName());
67 67
             result.put("roleName", "OWNER");

+ 15
- 10
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java Visa fil

@@ -338,7 +338,7 @@ public class TaUserServiceImpl implements ITaUserService {
338 338
         // 2. 根据 期、楼栋、单元、楼层、户号、小区id,查询 审核表 得到审核记录
339 339
 
340 340
         TaUserVerify userVerify = taUserVerifyMapper.selectByPrimaryKey(userElement.getUserVerifyId());
341
-        List<TaUser> userList = taUserMapper.selectHouseUserList(userElement.getCommunityId(), userVerify.getPhase(), userVerify.getBuilding(), userVerify.getUnit(), userVerify.getLevel(), userVerify.getRoomNo(), userElement.getId());
341
+        List<TaUser> userList = taUserMapper.selectHouseUserList(userElement.getCommunityId(), userVerify.getPhaseId(), userVerify.getBuildingId(), userVerify.getUnitId(), userVerify.getLevelId(), userVerify.getRoomNoId(), userElement.getId());
342 342
 
343 343
         responseBean.addSuccess(userList);
344 344
         return responseBean;
@@ -470,11 +470,16 @@ public class TaUserServiceImpl implements ITaUserService {
470 470
         userVerify.setCommunityId(userElement.getCommunityId());
471 471
         userVerify.setRoleId(sysRole.getId());
472 472
         userVerify.setUserId(user.getId());
473
-        userVerify.setPhase(userElementUserVerify.getPhase());
474
-        userVerify.setBuilding(userElementUserVerify.getBuilding());
475
-        userVerify.setUnit(userElementUserVerify.getUnit());
476
-        userVerify.setLevel(userElementUserVerify.getLevel());
477
-        userVerify.setRoomNo(userElementUserVerify.getRoomNo());
473
+        userVerify.setPhaseId(userElementUserVerify.getPhaseId());
474
+        userVerify.setPhaseName(userElementUserVerify.getPhaseName());
475
+        userVerify.setBuildingId(userElementUserVerify.getBuildingId());
476
+        userVerify.setBuildingName(userElementUserVerify.getBuildingName());
477
+        userVerify.setUnitId(userElementUserVerify.getUnitId());
478
+        userVerify.setUnitName(userElementUserVerify.getUnitName());
479
+        userVerify.setLevelId(userElementUserVerify.getLevelId());
480
+        userVerify.setLevelName(userElementUserVerify.getLevelName());
481
+        userVerify.setRoomNoId(userElementUserVerify.getRoomNoId());
482
+        userVerify.setRoomNoName(userElementUserVerify.getRoomNoName());
478 483
 
479 484
         taUserVerifyMapper.insertSelective(userVerify);
480 485
 
@@ -843,7 +848,7 @@ public class TaUserServiceImpl implements ITaUserService {
843 848
 
844 849
         // 根据 审核id 查询 出审核的数据,里面有角色id
845 850
         TaUserVerify userVerify = taUserVerifyMapper.selectByPrimaryKey(user.getUserVerifyId());
846
-        userVO.setAddressBuilding(userVerify.getPhase() + userVerify.getBuilding() + userVerify.getUnit() + userVerify.getLevel() + userVerify.getRoomNo());
851
+        userVO.setAddressBuilding(userVerify.getPhaseName() + userVerify.getBuildingName() + userVerify.getUnitName() + userVerify.getLevelName() + userVerify.getRoomNoName());
847 852
 
848 853
         // 角色
849 854
         TaSysRole taSysRole = taSysRoleMapper.selectByPrimaryKey(userVerify.getRoleId());
@@ -865,7 +870,7 @@ public class TaUserServiceImpl implements ITaUserService {
865 870
          */
866 871
 
867 872
         // TODO 楼栋资料库查询有变动
868
-        TpBuildingOwnerInfo tpBuildingOwnerInfo = tpBuildingOwnerInfoMapper.selectCommunityIdAndAddress(user.getCommunityId(), userVerify.getPhase(), userVerify.getBuilding(), userVerify.getUnit(), userVerify.getLevel(), userVerify.getRoomNo());
873
+        TpBuildingOwnerInfo tpBuildingOwnerInfo = tpBuildingOwnerInfoMapper.selectCommunityIdAndAddress(user.getCommunityId(), userVerify.getPhaseId(), userVerify.getBuildingId(), userVerify.getUnitId(), userVerify.getLevelId(), userVerify.getRoomNoId());
869 874
 
870 875
         if (null != tpBuildingOwnerInfo) {
871 876
             //查询当前人业主或租客的信息
@@ -966,7 +971,7 @@ public class TaUserServiceImpl implements ITaUserService {
966 971
             // 设置 userVO 信息
967 972
             setUserVoProperties(userVerify.getCommunityId(), taUserVO);
968 973
 
969
-            taUserVO.setAddressBuilding(userVerify.getPhase() + userVerify.getBuilding() + userVerify.getUnit() + userVerify.getLevel() + userVerify.getRoomNo());
974
+            taUserVO.setAddressBuilding(userVerify.getPhaseName() + userVerify.getBuildingName() + userVerify.getUnitName() + userVerify.getLevelName() + userVerify.getRoomNoName());
970 975
             TaSysRole taSysRole = taSysRoleMapper.selectByPrimaryKey(userVerify.getRoleId());
971 976
             taUserVO.setRole(taSysRole.getRoleName());
972 977
 
@@ -1002,7 +1007,7 @@ public class TaUserServiceImpl implements ITaUserService {
1002 1007
 
1003 1008
         // TODO 楼栋资料库查询有变动
1004 1009
         // 查询出要被删除的房产的 楼栋资料信息
1005
-        TpBuildingOwnerInfo buildingOwnerInfo = tpBuildingOwnerInfoMapper.selectCommunityIdAndAddress(userElement.getCommunityId(), userVerify.getPhase(), userVerify.getBuilding(), userVerify.getUnit(), userVerify.getLevel(), userVerify.getRoomNo());
1010
+        TpBuildingOwnerInfo buildingOwnerInfo = tpBuildingOwnerInfoMapper.selectCommunityIdAndAddress(userElement.getCommunityId(), userVerify.getPhaseId(), userVerify.getBuildingId(), userVerify.getUnitId(), userVerify.getLevelId(), userVerify.getRoomNoId());
1006 1011
         TaUser currentUser = hasUserPhone(buildingOwnerInfo.getOwnerTel());
1007 1012
 
1008 1013
         // 如果业主删除房屋成员(也就是删除房产审核),房产的业主id 和 当前登录的业主的id,相等的时候才允许删除(相等才能表示是这个业主的房产)

+ 2
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserVerifyServicelmpl.java Visa fil

@@ -52,7 +52,7 @@ public class TaUserVerifyServicelmpl implements TaUserVerifyServicel {
52 52
 
53 53
             // TODO 楼栋资料库查询有变动
54 54
             // 开始查询 业主
55
-            TpBuildingOwnerInfo tpBuildingOwnerInfo = tpBuildingOwnerInfoMapper.selectCommunityIdAndAddress(taUserVerify.getCommunityId(), taUserVerify.getPhase(), taUserVerify.getBuilding(), taUserVerify.getUnit(), taUserVerify.getLevel(), taUserVerify.getRoomNo());
55
+            TpBuildingOwnerInfo tpBuildingOwnerInfo = tpBuildingOwnerInfoMapper.selectCommunityIdAndAddress(taUserVerify.getCommunityId(), taUserVerify.getPhaseId(), taUserVerify.getBuildingId(), taUserVerify.getUnitId(), taUserVerify.getLevelId(), taUserVerify.getRoomNoId());
56 56
             taUserVerify.setOwnerName(tpBuildingOwnerInfo.getOwnerName());
57 57
         }
58 58
 
@@ -169,7 +169,7 @@ public class TaUserVerifyServicelmpl implements TaUserVerifyServicel {
169 169
             responseBean.addError("该审核不存在!");
170 170
             return responseBean;
171 171
         }
172
-        List<TaUser> userList = taUserMapper.selectHouseUserList(userElement.getCommunityId(), userVerify.getPhase(), userVerify.getBuilding(), userVerify.getUnit(), userVerify.getLevel(), userVerify.getRoomNo(), userElement.getId());
172
+        List<TaUser> userList = taUserMapper.selectHouseUserList(userElement.getCommunityId(), userVerify.getPhaseId(), userVerify.getBuildingId(), userVerify.getUnitId(), userVerify.getLevelId(), userVerify.getRoomNoId(), userElement.getId());
173 173
         boolean bool = userList.stream().anyMatch(e -> e.getId().intValue() == userVerify.getId().intValue());
174 174
         if (bool) {
175 175
             userVerify.setVerifyStatus(userVerifyStatus);

+ 5
- 5
CODE/smart-community/app-api/src/main/resources/mapper/TaUserMapper.xml Visa fil

@@ -364,11 +364,11 @@
364 364
     INNER JOIN ta_sys_role tsr ON tuv.role_id = tsr.id
365 365
     WHERE
366 366
 	tuv.community_id = #{communityId}
367
-	AND tuv.phase = #{phase}
368
-	AND tuv.building = #{building}
369
-	AND tuv.unit = #{unit}
370
-	AND tuv.`level` = #{level}
371
-	AND tuv.room_no = #{roomNo}
367
+	AND tuv.phase_id = #{phaseId}
368
+	AND tuv.building_id = #{buildingId}
369
+	AND tuv.unit_id = #{unitId}
370
+	AND tuv.`level_id` = #{levelId}
371
+	AND tuv.room_no_id = #{roomNoId}
372 372
 	AND tuv.user_id != #{userId}
373 373
   </select>
374 374
 

+ 123
- 70
CODE/smart-community/app-api/src/main/resources/mapper/TaUserVerifyMapper.xml Visa fil

@@ -6,26 +6,27 @@
6 6
     <result column="user_id" property="userId" jdbcType="INTEGER" />
7 7
     <result column="community_id" property="communityId" jdbcType="INTEGER" />
8 8
     <result column="role_id" property="roleId" jdbcType="INTEGER" />
9
-    <result column="phase" property="phase" jdbcType="VARCHAR" />
10
-    <result column="building" property="building" jdbcType="VARCHAR" />
11
-    <result column="unit" property="unit" jdbcType="VARCHAR" />
12
-    <result column="level" property="level" jdbcType="VARCHAR" />
13
-    <result column="room_no" property="roomNo" jdbcType="VARCHAR" />
9
+    <result column="phase_id" property="phaseId" jdbcType="INTEGER" />
10
+    <result column="phase_name" property="phaseName" jdbcType="VARCHAR" />
11
+    <result column="building_id" property="buildingId" jdbcType="INTEGER" />
12
+    <result column="building_name" property="buildingName" jdbcType="VARCHAR" />
13
+    <result column="unit_id" property="unitId" jdbcType="INTEGER" />
14
+    <result column="unit_name" property="unitName" jdbcType="VARCHAR" />
15
+    <result column="level_id" property="levelId" jdbcType="INTEGER" />
16
+    <result column="level_name" property="levelName" jdbcType="VARCHAR" />
17
+    <result column="room_no_id" property="roomNoId" jdbcType="INTEGER" />
18
+    <result column="room_no_name" property="roomNoName" jdbcType="VARCHAR" />
14 19
     <result column="verify_status" property="verifyStatus" jdbcType="VARCHAR" />
15 20
     <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
16
-    <result column="verify_name" property="verifyName"/>
17
-    <result column="phase_name" property="phaseName"/>
18
-    <result column="building_name" property="buildingName"/>
19
-    <result column="unit_name" property="unitName"/>
20
-    <result column="level_name" property="levelName"/>
21
-    <result column="room_no_name" property="roomNoName"/>
21
+    <result column="verify_name" property="verifyName" jdbcType="VARCHAR" />
22 22
   </resultMap>
23 23
   <sql id="Base_Column_List" >
24
-    id, user_id, community_id, role_id, phase, building, unit, level, room_no, verify_status, 
25
-     create_date, verify_name, phase_name, building_name, unit_name, room_no_name,level_name
24
+    id, user_id, community_id, role_id, phase_id, phase_name, building_id, building_name,
25
+    unit_id, unit_name, level_id, level_name, room_no_id, room_no_name, verify_status,
26
+    create_date, verify_name
26 27
   </sql>
27 28
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
28
-    select 
29
+    select
29 30
     <include refid="Base_Column_List" />
30 31
     from ta_user_verify
31 32
     where id = #{id,jdbcType=INTEGER}
@@ -35,16 +36,18 @@
35 36
     where id = #{id,jdbcType=INTEGER}
36 37
   </delete>
37 38
   <insert id="insert" parameterType="com.community.huiju.model.TaUserVerify" >
38
-    insert into ta_user_verify (id, user_id, community_id, 
39
-      role_id, phase, building, 
40
-      unit, level, room_no, 
41
-      verify_status,
39
+    insert into ta_user_verify (id, user_id, community_id,
40
+      role_id, phase_id, phase_name,
41
+      building_id, building_name, unit_id,
42
+      unit_name, level_id, level_name,
43
+      room_no_id, room_no_name, verify_status,
42 44
       create_date, verify_name)
43
-    values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, 
44
-      #{roleId,jdbcType=INTEGER}, #{phase,jdbcType=VARCHAR}, #{building,jdbcType=VARCHAR}, 
45
-      #{unit,jdbcType=VARCHAR}, #{level,jdbcType=VARCHAR}, #{roomNo,jdbcType=VARCHAR}, 
46
-      #{verifyStatus,jdbcType=VARCHAR},
47
-      #{createDate,jdbcType=TIMESTAMP}, #{verifyName})
45
+    values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER},
46
+      #{roleId,jdbcType=INTEGER}, #{phaseId,jdbcType=INTEGER}, #{phaseName,jdbcType=VARCHAR},
47
+      #{buildingId,jdbcType=INTEGER}, #{buildingName,jdbcType=VARCHAR}, #{unitId,jdbcType=INTEGER},
48
+      #{unitName,jdbcType=VARCHAR}, #{levelId,jdbcType=INTEGER}, #{levelName,jdbcType=VARCHAR},
49
+      #{roomNoId,jdbcType=INTEGER}, #{roomNoName,jdbcType=VARCHAR}, #{verifyStatus,jdbcType=VARCHAR},
50
+      #{createDate,jdbcType=TIMESTAMP}, #{verifyName,jdbcType=VARCHAR})
48 51
   </insert>
49 52
   <insert id="insertSelective" parameterType="com.community.huiju.model.TaUserVerify" >
50 53
     insert into ta_user_verify
@@ -61,20 +64,35 @@
61 64
       <if test="roleId != null" >
62 65
         role_id,
63 66
       </if>
64
-      <if test="phase != null" >
65
-        phase,
67
+      <if test="phaseId != null" >
68
+        phase_id,
69
+      </if>
70
+      <if test="phaseName != null" >
71
+        phase_name,
72
+      </if>
73
+      <if test="buildingId != null" >
74
+        building_id,
75
+      </if>
76
+      <if test="buildingName != null" >
77
+        building_name,
66 78
       </if>
67
-      <if test="building != null" >
68
-        building,
79
+      <if test="unitId != null" >
80
+        unit_id,
69 81
       </if>
70
-      <if test="unit != null" >
71
-        unit,
82
+      <if test="unitName != null" >
83
+        unit_name,
72 84
       </if>
73
-      <if test="level != null" >
74
-        level,
85
+      <if test="levelId != null" >
86
+        level_id,
75 87
       </if>
76
-      <if test="roomNo != null" >
77
-        room_no,
88
+      <if test="levelName != null" >
89
+        level_name,
90
+      </if>
91
+      <if test="roomNoId != null" >
92
+        room_no_id,
93
+      </if>
94
+      <if test="roomNoName != null" >
95
+        room_no_name,
78 96
       </if>
79 97
       <if test="verifyStatus != null" >
80 98
         verify_status,
@@ -82,8 +100,8 @@
82 100
       <if test="createDate != null" >
83 101
         create_date,
84 102
       </if>
85
-      <if test="verifyName != null">
86
-          verify_name,
103
+      <if test="verifyName != null" >
104
+        verify_name,
87 105
       </if>
88 106
     </trim>
89 107
     <trim prefix="values (" suffix=")" suffixOverrides="," >
@@ -99,20 +117,35 @@
99 117
       <if test="roleId != null" >
100 118
         #{roleId,jdbcType=INTEGER},
101 119
       </if>
102
-      <if test="phase != null" >
103
-        #{phase,jdbcType=VARCHAR},
120
+      <if test="phaseId != null" >
121
+        #{phaseId,jdbcType=INTEGER},
122
+      </if>
123
+      <if test="phaseName != null" >
124
+        #{phaseName,jdbcType=VARCHAR},
125
+      </if>
126
+      <if test="buildingId != null" >
127
+        #{buildingId,jdbcType=INTEGER},
104 128
       </if>
105
-      <if test="building != null" >
106
-        #{building,jdbcType=VARCHAR},
129
+      <if test="buildingName != null" >
130
+        #{buildingName,jdbcType=VARCHAR},
107 131
       </if>
108
-      <if test="unit != null" >
109
-        #{unit,jdbcType=VARCHAR},
132
+      <if test="unitId != null" >
133
+        #{unitId,jdbcType=INTEGER},
110 134
       </if>
111
-      <if test="level != null" >
112
-        #{level,jdbcType=VARCHAR},
135
+      <if test="unitName != null" >
136
+        #{unitName,jdbcType=VARCHAR},
113 137
       </if>
114
-      <if test="roomNo != null" >
115
-        #{roomNo,jdbcType=VARCHAR},
138
+      <if test="levelId != null" >
139
+        #{levelId,jdbcType=INTEGER},
140
+      </if>
141
+      <if test="levelName != null" >
142
+        #{levelName,jdbcType=VARCHAR},
143
+      </if>
144
+      <if test="roomNoId != null" >
145
+        #{roomNoId,jdbcType=INTEGER},
146
+      </if>
147
+      <if test="roomNoName != null" >
148
+        #{roomNoName,jdbcType=VARCHAR},
116 149
       </if>
117 150
       <if test="verifyStatus != null" >
118 151
         #{verifyStatus,jdbcType=VARCHAR},
@@ -120,8 +153,8 @@
120 153
       <if test="createDate != null" >
121 154
         #{createDate,jdbcType=TIMESTAMP},
122 155
       </if>
123
-      <if test="verifyName != null">
124
-          #{verifyName},
156
+      <if test="verifyName != null" >
157
+        #{verifyName,jdbcType=VARCHAR},
125 158
       </if>
126 159
     </trim>
127 160
   </insert>
@@ -137,20 +170,35 @@
137 170
       <if test="roleId != null" >
138 171
         role_id = #{roleId,jdbcType=INTEGER},
139 172
       </if>
140
-      <if test="phase != null" >
141
-        phase = #{phase,jdbcType=VARCHAR},
173
+      <if test="phaseId != null" >
174
+        phase_id = #{phaseId,jdbcType=INTEGER},
175
+      </if>
176
+      <if test="phaseName != null" >
177
+        phase_name = #{phaseName,jdbcType=VARCHAR},
178
+      </if>
179
+      <if test="buildingId != null" >
180
+        building_id = #{buildingId,jdbcType=INTEGER},
181
+      </if>
182
+      <if test="buildingName != null" >
183
+        building_name = #{buildingName,jdbcType=VARCHAR},
184
+      </if>
185
+      <if test="unitId != null" >
186
+        unit_id = #{unitId,jdbcType=INTEGER},
187
+      </if>
188
+      <if test="unitName != null" >
189
+        unit_name = #{unitName,jdbcType=VARCHAR},
142 190
       </if>
143
-      <if test="building != null" >
144
-        building = #{building,jdbcType=VARCHAR},
191
+      <if test="levelId != null" >
192
+        level_id = #{levelId,jdbcType=INTEGER},
145 193
       </if>
146
-      <if test="unit != null" >
147
-        unit = #{unit,jdbcType=VARCHAR},
194
+      <if test="levelName != null" >
195
+        level_name = #{levelName,jdbcType=VARCHAR},
148 196
       </if>
149
-      <if test="level != null" >
150
-        level = #{level,jdbcType=VARCHAR},
197
+      <if test="roomNoId != null" >
198
+        room_no_id = #{roomNoId,jdbcType=INTEGER},
151 199
       </if>
152
-      <if test="roomNo != null" >
153
-        room_no = #{roomNo,jdbcType=VARCHAR},
200
+      <if test="roomNoName != null" >
201
+        room_no_name = #{roomNoName,jdbcType=VARCHAR},
154 202
       </if>
155 203
       <if test="verifyStatus != null" >
156 204
         verify_status = #{verifyStatus,jdbcType=VARCHAR},
@@ -158,8 +206,8 @@
158 206
       <if test="createDate != null" >
159 207
         create_date = #{createDate,jdbcType=TIMESTAMP},
160 208
       </if>
161
-      <if test="verifyName != null">
162
-          verify_name = #{verifyName}
209
+      <if test="verifyName != null" >
210
+        verify_name = #{verifyName,jdbcType=VARCHAR},
163 211
       </if>
164 212
     </set>
165 213
     where id = #{id,jdbcType=INTEGER}
@@ -169,14 +217,19 @@
169 217
     set user_id = #{userId,jdbcType=INTEGER},
170 218
       community_id = #{communityId,jdbcType=INTEGER},
171 219
       role_id = #{roleId,jdbcType=INTEGER},
172
-      phase = #{phase,jdbcType=VARCHAR},
173
-      building = #{building,jdbcType=VARCHAR},
174
-      unit = #{unit,jdbcType=VARCHAR},
175
-      level = #{level,jdbcType=VARCHAR},
176
-      room_no = #{roomNo,jdbcType=VARCHAR},
220
+      phase_id = #{phaseId,jdbcType=INTEGER},
221
+      phase_name = #{phaseName,jdbcType=VARCHAR},
222
+      building_id = #{buildingId,jdbcType=INTEGER},
223
+      building_name = #{buildingName,jdbcType=VARCHAR},
224
+      unit_id = #{unitId,jdbcType=INTEGER},
225
+      unit_name = #{unitName,jdbcType=VARCHAR},
226
+      level_id = #{levelId,jdbcType=INTEGER},
227
+      level_name = #{levelName,jdbcType=VARCHAR},
228
+      room_no_id = #{roomNoId,jdbcType=INTEGER},
229
+      room_no_name = #{roomNoName,jdbcType=VARCHAR},
177 230
       verify_status = #{verifyStatus,jdbcType=VARCHAR},
178 231
       create_date = #{createDate,jdbcType=TIMESTAMP},
179
-      verify_name = #{verifyName}
232
+      verify_name = #{verifyName,jdbcType=VARCHAR}
180 233
     where id = #{id,jdbcType=INTEGER}
181 234
   </update>
182 235
   <select id="selectByUserId" resultMap="BaseResultMap" parameterType="integer">
@@ -191,10 +244,10 @@
191 244
     from ta_user_verify
192 245
     where community_id = #{communityId,jdbcType=INTEGER}
193 246
     and user_id = #{userId,jdbcType=INTEGER}
194
-    and phase = #{phase,jdbcType=VARCHAR}
195
-    and building = #{building,jdbcType=VARCHAR}
196
-    and unit = #{unit,jdbcType=VARCHAR}
197
-    and level = #{level,jdbcType=VARCHAR}
198
-    and room_no = #{roomNo,jdbcType=VARCHAR}
247
+    and phase_id = #{phaseId,jdbcType=INTEGER}
248
+    and building_id = #{buildingId,jdbcType=INTEGER}
249
+    and unit_id = #{unitId,jdbcType=INTEGER}
250
+    and level_id = #{levelId,jdbcType=INTEGER}
251
+    and room_no_id = #{roomNoId,jdbcType=INTEGER}
199 252
   </select>
200 253
 </mapper>

+ 40
- 72
CODE/smart-community/app-api/src/main/resources/mapper/TpBuildingMapper.xml Visa fil

@@ -4,18 +4,17 @@
4 4
   <resultMap id="BaseResultMap" type="com.community.huiju.model.TpBuilding" >
5 5
     <id column="id" property="id" jdbcType="INTEGER" />
6 6
     <result column="community_id" property="communityId" jdbcType="INTEGER" />
7
-    <result column="phase" property="phase" jdbcType="VARCHAR" />
8
-    <result column="building" property="building" jdbcType="VARCHAR" />
9
-    <result column="unit" property="unit" jdbcType="VARCHAR" />
10
-    <result column="level" property="level" jdbcType="VARCHAR" />
11
-    <result column="room_no" property="roomNo" jdbcType="VARCHAR" />
7
+    <result column="phase_id" property="phaseId" jdbcType="INTEGER" />
8
+    <result column="phase_name" property="phaseName" jdbcType="VARCHAR" />
9
+    <result column="name" property="name" jdbcType="VARCHAR" />
10
+    <result column="sort" property="sort" jdbcType="VARCHAR" />
12 11
     <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
13 12
   </resultMap>
14 13
   <sql id="Base_Column_List" >
15
-    id, community_id, phase, building, unit, level, room_no, create_date
14
+    id, community_id, phase_id, phase_name, name, sort, create_date
16 15
   </sql>
17 16
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
18
-    select 
17
+    select
19 18
     <include refid="Base_Column_List" />
20 19
     from tp_building
21 20
     where id = #{id,jdbcType=INTEGER}
@@ -25,12 +24,12 @@
25 24
     where id = #{id,jdbcType=INTEGER}
26 25
   </delete>
27 26
   <insert id="insert" parameterType="com.community.huiju.model.TpBuilding" >
28
-    insert into tp_building (id, community_id, phase, 
29
-      building, unit, level, 
30
-      room_no, create_date)
31
-    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{phase,jdbcType=VARCHAR}, 
32
-      #{building,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR}, #{level,jdbcType=VARCHAR}, 
33
-      #{roomNo,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP})
27
+    insert into tp_building (id, community_id, phase_id,
28
+      phase_name, name, sort,
29
+      create_date)
30
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{phaseId,jdbcType=INTEGER},
31
+      #{phaseName,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{sort,jdbcType=VARCHAR},
32
+      #{createDate,jdbcType=TIMESTAMP})
34 33
   </insert>
35 34
   <insert id="insertSelective" parameterType="com.community.huiju.model.TpBuilding" >
36 35
     insert into tp_building
@@ -41,20 +40,17 @@
41 40
       <if test="communityId != null" >
42 41
         community_id,
43 42
       </if>
44
-      <if test="phase != null" >
45
-        phase,
46
-      </if>
47
-      <if test="building != null" >
48
-        building,
43
+      <if test="phaseId != null" >
44
+        phase_id,
49 45
       </if>
50
-      <if test="unit != null" >
51
-        unit,
46
+      <if test="phaseName != null" >
47
+        phase_name,
52 48
       </if>
53
-      <if test="level != null" >
54
-        level,
49
+      <if test="name != null" >
50
+        name,
55 51
       </if>
56
-      <if test="roomNo != null" >
57
-        room_no,
52
+      <if test="sort != null" >
53
+        sort,
58 54
       </if>
59 55
       <if test="createDate != null" >
60 56
         create_date,
@@ -67,20 +63,17 @@
67 63
       <if test="communityId != null" >
68 64
         #{communityId,jdbcType=INTEGER},
69 65
       </if>
70
-      <if test="phase != null" >
71
-        #{phase,jdbcType=VARCHAR},
66
+      <if test="phaseId != null" >
67
+        #{phaseId,jdbcType=INTEGER},
72 68
       </if>
73
-      <if test="building != null" >
74
-        #{building,jdbcType=VARCHAR},
69
+      <if test="phaseName != null" >
70
+        #{phaseName,jdbcType=VARCHAR},
75 71
       </if>
76
-      <if test="unit != null" >
77
-        #{unit,jdbcType=VARCHAR},
72
+      <if test="name != null" >
73
+        #{name,jdbcType=VARCHAR},
78 74
       </if>
79
-      <if test="level != null" >
80
-        #{level,jdbcType=VARCHAR},
81
-      </if>
82
-      <if test="roomNo != null" >
83
-        #{roomNo,jdbcType=VARCHAR},
75
+      <if test="sort != null" >
76
+        #{sort,jdbcType=VARCHAR},
84 77
       </if>
85 78
       <if test="createDate != null" >
86 79
         #{createDate,jdbcType=TIMESTAMP},
@@ -93,20 +86,17 @@
93 86
       <if test="communityId != null" >
94 87
         community_id = #{communityId,jdbcType=INTEGER},
95 88
       </if>
96
-      <if test="phase != null" >
97
-        phase = #{phase,jdbcType=VARCHAR},
98
-      </if>
99
-      <if test="building != null" >
100
-        building = #{building,jdbcType=VARCHAR},
89
+      <if test="phaseId != null" >
90
+        phase_id = #{phaseId,jdbcType=INTEGER},
101 91
       </if>
102
-      <if test="unit != null" >
103
-        unit = #{unit,jdbcType=VARCHAR},
92
+      <if test="phaseName != null" >
93
+        phase_name = #{phaseName,jdbcType=VARCHAR},
104 94
       </if>
105
-      <if test="level != null" >
106
-        level = #{level,jdbcType=VARCHAR},
95
+      <if test="name != null" >
96
+        name = #{name,jdbcType=VARCHAR},
107 97
       </if>
108
-      <if test="roomNo != null" >
109
-        room_no = #{roomNo,jdbcType=VARCHAR},
98
+      <if test="sort != null" >
99
+        sort = #{sort,jdbcType=VARCHAR},
110 100
       </if>
111 101
       <if test="createDate != null" >
112 102
         create_date = #{createDate,jdbcType=TIMESTAMP},
@@ -117,33 +107,11 @@
117 107
   <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpBuilding" >
118 108
     update tp_building
119 109
     set community_id = #{communityId,jdbcType=INTEGER},
120
-      phase = #{phase,jdbcType=VARCHAR},
121
-      building = #{building,jdbcType=VARCHAR},
122
-      unit = #{unit,jdbcType=VARCHAR},
123
-      level = #{level,jdbcType=VARCHAR},
124
-      room_no = #{roomNo,jdbcType=VARCHAR},
110
+      phase_id = #{phaseId,jdbcType=INTEGER},
111
+      phase_name = #{phaseName,jdbcType=VARCHAR},
112
+      name = #{name,jdbcType=VARCHAR},
113
+      sort = #{sort,jdbcType=VARCHAR},
125 114
       create_date = #{createDate,jdbcType=TIMESTAMP}
126 115
     where id = #{id,jdbcType=INTEGER}
127 116
   </update>
128
-  <select id="selectByAddress" resultMap="BaseResultMap">
129
-    select
130
-    <include refid="Base_Column_List"/>
131
-    from tp_building
132
-    where community_id = #{communityId,jdbcType=INTEGER}
133
-    <if test="phase != null and phase != ''">
134
-      and phase = #{phase,jdbcType=VARCHAR}
135
-    </if>
136
-    <if test="building != null and building != ''">
137
-      and building = #{building,jdbcType=VARCHAR}
138
-    </if>
139
-    <if test="unit != null and unit != ''">
140
-      and unit = #{unit,jdbcType=VARCHAR}
141
-    </if>
142
-    <if test="level != null and level != ''">
143
-      and level = #{level,jdbcType=VARCHAR}
144
-    </if>
145
-    <if test="roomNo != null and roomNo != ''">
146
-      and roomNo = #{room_no,jdbcType=VARCHAR}
147
-    </if>
148
-  </select>
149 117
 </mapper>

+ 2
- 2
CODE/smart-community/app-api/src/main/resources/mapper/TpBuildingOwnerInfoMapper.xml Visa fil

@@ -361,9 +361,9 @@
361 361
     where community_id = #{communityId,jdbcType=INTEGER} and wnerTel =  owner_tel = #{ownerTel,jdbcType=VARCHAR}
362 362
   </update>
363 363
 
364
-  <select id="selectOwnerTel" resultType="com.community.huiju.model.TpBuildingOwnerInfo" parameterType="string">
364
+  <select id="selectOwnerTel" resultMap="BaseResultMap" parameterType="string">
365 365
     select
366
-    id
366
+    <include refid="Base_Column_List"/>
367 367
     from
368 368
     tp_building_owner_info
369 369
     where  owner_tel = #{ownerTel,jdbcType=VARCHAR}