Преглед изворни кода

Merge branch 'develop' of http://git.ycjcjy.com/fuxingfan/smartCommunity into develop

# Conflicts:
#	文档/需求/app接口需求-第二版.xlsx
傅行帆 пре 6 година
родитељ
комит
461b133e1e

+ 2
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TicketController.java Прегледај датотеку

@@ -71,8 +71,8 @@ public class TicketController {
71 71
     @ApiImplicitParams({
72 72
             @ApiImplicitParam(paramType = "path",dataType = "String",name = "communityId", value = "小区编号"),
73 73
             @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "pageNum", value = "第几页"),
74
-            @ApiImplicitParam(paramType = "path",dataType = "Integer",name = "pageSize", value = "一页多少数据"),
75
-            @ApiImplicitParam(paramType = "path",dataType = "String",name = "type", value = "工单类型 (0报修/1投诉/2联系单)"),
74
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "pageSize", value = "一页多少数据"),
75
+            @ApiImplicitParam(paramType = "query",dataType = "String",name = "type", value = "工单类型 (0报修/1投诉/2联系单)"),
76 76
     })
77 77
     public ResponseBean getServiceList(@PathVariable(value = "communityId") String communityId,
78 78
                                        @RequestParam(value = "pageNum",defaultValue = "1") Integer pageNum,

+ 64
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/UserController.java Прегледај датотеку

@@ -1,5 +1,6 @@
1 1
 package com.community.huiju.controller;
2 2
 
3
+import com.alibaba.fastjson.JSONObject;
3 4
 import com.community.commom.constant.Constant;
4 5
 import com.community.commom.mode.ResponseBean;
5 6
 import com.community.huiju.common.code.cache.AppkeyCache;
@@ -70,5 +71,68 @@ public class UserController {
70 71
         return response;
71 72
     }
72 73
 
74
+    @ApiOperation(value = "修改用户名和性别", notes = "修改用户名和性别")
75
+    @ApiImplicitParams({
76
+            @ApiImplicitParam(paramType = "query",dataType = "String",name = "userName",value = "用户民"),
77
+            @ApiImplicitParam(paramType = "query",dataType = "String",name = "gender",value = "性别")
78
+    })
79
+    @RequestMapping(value = "/user/update/info",method = RequestMethod.PUT)
80
+    public ResponseBean updateUserNameAndGender(@RequestBody TaUser user,
81
+                                                HttpSession session){
82
+        ResponseBean response = new ResponseBean();
83
+
84
+        UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
85
+
86
+        user.setId(userElement.getId());
87
+
88
+        response = iTaUserService.modifyUser(user);
89
+        return response;
90
+
91
+    }
92
+
93
+    @ApiOperation(value = "租客或家属 启用或者停用", notes = "租客或家属 启用或者停用")
94
+    @ApiImplicitParams({
95
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "userId",value = "租客或者家属"),
96
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "type",value = "1启用 0停用")
97
+    })
98
+    @RequestMapping(value = "/user/update/dependentsOrTenants",method = RequestMethod.PUT)
99
+    public ResponseBean updateDependentsOrTenants(@RequestBody String parameter,
100
+                                                HttpSession session){
101
+        ResponseBean response = new ResponseBean();
102
+
103
+        UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
104
+
105
+        JSONObject jsonObject = JSONObject.parseObject(parameter);
106
+        response = iTaUserService.startOrEndUsingUser(userElement.getId(),jsonObject.getInteger("userId"),jsonObject.getInteger("type"));
107
+
108
+        return response;
109
+
110
+    }
111
+
112
+
113
+    @ApiOperation(value = "业主添加 租客或家属", notes = "业主添加 租客或家属")
114
+    @ApiImplicitParams({
115
+            @ApiImplicitParam(paramType = "query",dataType = "String",name = "userName",value = "租客或者家属 姓名"),
116
+            @ApiImplicitParam(paramType = "query",dataType = "String",name = "phone",value = "租客或者家属 手机号"),
117
+            @ApiImplicitParam(paramType = "query",dataType = "String",name = "gender",value = "租客或者家属 性别 1男 2女"),
118
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "type",value = "1家属 0租客")
119
+    })
120
+    @RequestMapping(value = "/user/update/addTenantsOrDependents",method = RequestMethod.POST)
121
+    public ResponseBean addTenantsOrDependents(@RequestBody String parameter,
122
+                                               HttpSession session){
123
+        ResponseBean response = new ResponseBean();
124
+
125
+        UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
126
+        JSONObject jsonObject = JSONObject.parseObject(parameter);
127
+        response = iTaUserService.addTenantsOrDependents(jsonObject.getString("userName"),
128
+                jsonObject.getString("phone"),jsonObject.getString("gender"),
129
+                userElement.getId(),
130
+                jsonObject.getInteger("type"));
131
+
132
+        return response;
133
+
134
+    }
135
+
136
+
73 137
 
74 138
 }

+ 19
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBuildingOwnerInfoMapper.java Прегледај датотеку

@@ -0,0 +1,19 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.community.huiju.model.TpBuildingOwnerInfo;
4
+import org.apache.ibatis.annotations.Mapper;
5
+
6
+@Mapper
7
+public interface TpBuildingOwnerInfoMapper {
8
+    int deleteByPrimaryKey(Integer id);
9
+
10
+    int insert(TpBuildingOwnerInfo record);
11
+
12
+    int insertSelective(TpBuildingOwnerInfo record);
13
+
14
+    TpBuildingOwnerInfo selectByPrimaryKey(Integer id);
15
+
16
+    int updateByPrimaryKeySelective(TpBuildingOwnerInfo record);
17
+
18
+    int updateByPrimaryKey(TpBuildingOwnerInfo record);
19
+}

+ 165
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpBuildingOwnerInfo.java Прегледај датотеку

@@ -0,0 +1,165 @@
1
+package com.community.huiju.model;
2
+
3
+import java.util.Date;
4
+
5
+public class TpBuildingOwnerInfo {
6
+    private Integer id;
7
+
8
+    private Integer communityId;
9
+
10
+    private String idCard;
11
+
12
+    private String building;
13
+
14
+    private String unit;
15
+
16
+    private String level;
17
+
18
+    private String roomNo;
19
+
20
+    private String ownerName;
21
+
22
+    private String ownerTel;
23
+
24
+    private String gender;
25
+
26
+    private String pairStatus;
27
+
28
+    private String verifyStatus;
29
+
30
+    private Integer createUser;
31
+
32
+    private Date createDate;
33
+
34
+    private Integer updateUser;
35
+
36
+    private Date updateDate;
37
+
38
+    public Integer getId() {
39
+        return id;
40
+    }
41
+
42
+    public void setId(Integer id) {
43
+        this.id = id;
44
+    }
45
+
46
+    public Integer getCommunityId() {
47
+        return communityId;
48
+    }
49
+
50
+    public void setCommunityId(Integer communityId) {
51
+        this.communityId = communityId;
52
+    }
53
+
54
+    public String getIdCard() {
55
+        return idCard;
56
+    }
57
+
58
+    public void setIdCard(String idCard) {
59
+        this.idCard = idCard == null ? null : idCard.trim();
60
+    }
61
+
62
+    public String getBuilding() {
63
+        return building;
64
+    }
65
+
66
+    public void setBuilding(String building) {
67
+        this.building = building == null ? null : building.trim();
68
+    }
69
+
70
+    public String getUnit() {
71
+        return unit;
72
+    }
73
+
74
+    public void setUnit(String unit) {
75
+        this.unit = unit == null ? null : unit.trim();
76
+    }
77
+
78
+    public String getLevel() {
79
+        return level;
80
+    }
81
+
82
+    public void setLevel(String level) {
83
+        this.level = level == null ? null : level.trim();
84
+    }
85
+
86
+    public String getRoomNo() {
87
+        return roomNo;
88
+    }
89
+
90
+    public void setRoomNo(String roomNo) {
91
+        this.roomNo = roomNo == null ? null : roomNo.trim();
92
+    }
93
+
94
+    public String getOwnerName() {
95
+        return ownerName;
96
+    }
97
+
98
+    public void setOwnerName(String ownerName) {
99
+        this.ownerName = ownerName == null ? null : ownerName.trim();
100
+    }
101
+
102
+    public String getOwnerTel() {
103
+        return ownerTel;
104
+    }
105
+
106
+    public void setOwnerTel(String ownerTel) {
107
+        this.ownerTel = ownerTel == null ? null : ownerTel.trim();
108
+    }
109
+
110
+    public String getGender() {
111
+        return gender;
112
+    }
113
+
114
+    public void setGender(String gender) {
115
+        this.gender = gender == null ? null : gender.trim();
116
+    }
117
+
118
+    public String getPairStatus() {
119
+        return pairStatus;
120
+    }
121
+
122
+    public void setPairStatus(String pairStatus) {
123
+        this.pairStatus = pairStatus == null ? null : pairStatus.trim();
124
+    }
125
+
126
+    public String getVerifyStatus() {
127
+        return verifyStatus;
128
+    }
129
+
130
+    public void setVerifyStatus(String verifyStatus) {
131
+        this.verifyStatus = verifyStatus == null ? null : verifyStatus.trim();
132
+    }
133
+
134
+    public Integer getCreateUser() {
135
+        return createUser;
136
+    }
137
+
138
+    public void setCreateUser(Integer createUser) {
139
+        this.createUser = createUser;
140
+    }
141
+
142
+    public Date getCreateDate() {
143
+        return createDate;
144
+    }
145
+
146
+    public void setCreateDate(Date createDate) {
147
+        this.createDate = createDate;
148
+    }
149
+
150
+    public Integer getUpdateUser() {
151
+        return updateUser;
152
+    }
153
+
154
+    public void setUpdateUser(Integer updateUser) {
155
+        this.updateUser = updateUser;
156
+    }
157
+
158
+    public Date getUpdateDate() {
159
+        return updateDate;
160
+    }
161
+
162
+    public void setUpdateDate(Date updateDate) {
163
+        this.updateDate = updateDate;
164
+    }
165
+}

+ 27
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITaUserService.java Прегледај датотеку

@@ -40,5 +40,32 @@ public interface ITaUserService {
40 40
     ResponseBean selectloginName(Integer id, String phone, String code);
41 41
 
42 42
 
43
+    /**
44
+     * 修改用户
45
+     * @param user
46
+     * @return
47
+     */
48
+    ResponseBean modifyUser(TaUser user);
49
+
50
+    /**
51
+     * 停用用户 或者 启用用户
52
+     * @param currentUserId 当前用户(业主)
53
+     * @param userId
54
+     * @param type 1启用 0停用
55
+     * @return
56
+     */
57
+    ResponseBean startOrEndUsingUser(Integer currentUserId,Integer userId,Integer type);
58
+
59
+
60
+    /**
61
+     * 添加租客或者家属
62
+     * @param userName
63
+     * @param phone
64
+     * @param gender
65
+     * @param currentUserId 当前用户(业主)
66
+     * @param type 1家属 0租客
67
+     * @return
68
+     */
69
+    ResponseBean addTenantsOrDependents(String userName, String phone, String gender,Integer currentUserId,Integer type);
43 70
 
44 71
 }

+ 163
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java Прегледај датотеку

@@ -4,13 +4,19 @@ import com.community.commom.mode.ResponseBean;
4 4
 import com.community.commom.utils.AccountValidatorUtil;
5 5
 import com.community.commom.utils.MD5Utils;
6 6
 import com.community.huiju.common.code.cache.AppkeyCache;
7
+import com.community.huiju.dao.TaSysRoleMapper;
8
+import com.community.huiju.dao.TaSysUserRoleMapper;
7 9
 import com.community.huiju.dao.TaUserMapper;
10
+import com.community.huiju.dao.TpBuildingOwnerInfoMapper;
11
+import com.community.huiju.model.TaSysRole;
12
+import com.community.huiju.model.TaSysUserRole;
8 13
 import com.community.huiju.model.TaUser;
9 14
 import com.community.huiju.service.ITaUserService;
10 15
 import com.community.huiju.vo.TaUserVO;
11 16
 import com.google.common.collect.Maps;
12 17
 import lombok.extern.slf4j.Slf4j;
13 18
 import org.apache.commons.lang.StringUtils;
19
+import org.checkerframework.checker.units.qual.A;
14 20
 import org.springframework.beans.BeanUtils;
15 21
 import org.springframework.beans.factory.annotation.Autowired;
16 22
 import org.springframework.stereotype.Service;
@@ -30,6 +36,15 @@ public class TaUserServiceImpl implements ITaUserService {
30 36
     @Autowired
31 37
     private TaUserMapper taUserMapper;
32 38
 
39
+    @Autowired
40
+    private TpBuildingOwnerInfoMapper tpBuildingOwnerInfoMapper;
41
+
42
+    @Autowired
43
+    private TaSysRoleMapper taSysRoleMapper;
44
+
45
+    @Autowired
46
+    private TaSysUserRoleMapper taSysUserRoleMapper;
47
+
33 48
     @Transactional
34 49
     @Override
35 50
     public ResponseBean login(TaUser user) {
@@ -163,4 +178,152 @@ public class TaUserServiceImpl implements ITaUserService {
163 178
 
164 179
     }
165 180
 
181
+    @Transactional
182
+    @Override
183
+    public ResponseBean modifyUser(TaUser user) {
184
+
185
+        ResponseBean response = new ResponseBean();
186
+
187
+        TaUser taUser = taUserMapper.selectByPrimaryKey(user.getId());
188
+        BeanUtils.copyProperties(user,taUser);
189
+
190
+        int result = taUserMapper.updateByPrimaryKeySelective(taUser);
191
+
192
+        if (result > 0){
193
+            response.addSuccess("修改成功!");
194
+        }else {
195
+            response.addError("修改失败!");
196
+        }
197
+
198
+        return response;
199
+    }
200
+
201
+    @Transactional
202
+    @Override
203
+    public ResponseBean startOrEndUsingUser(Integer currentUserId, Integer userId, Integer type) {
204
+        ResponseBean response = null;
205
+        if ("1".equals(type)){
206
+            response = startAndEnd(currentUserId,userId,true);
207
+        } else {
208
+            response = startAndEnd(currentUserId,userId,false);
209
+        }
210
+        return response;
211
+    }
212
+
213
+    /**
214
+     *  用户停用和启用
215
+     * @param currentUserId 当前用户(业主)
216
+     * @param userId 租客或者家属
217
+     * @param bool 启用为 true  停用为 false
218
+     * @return
219
+     */
220
+    private ResponseBean startAndEnd(Integer currentUserId, Integer userId, boolean bool){
221
+
222
+        // TODO 更新人字段需要待定
223
+        /**
224
+         * 更新人 是业主 还是 物业
225
+         */
226
+
227
+        ResponseBean response = new ResponseBean();
228
+
229
+        TaUser user = taUserMapper.selectByPrimaryKey(userId);
230
+        if (null == user) {
231
+            response.addError("该用户不存在!");
232
+            return response;
233
+        }
234
+        if (!currentUserId.equals(user.getParentId())) {
235
+            response.addError("该用户不是您的家属或租客!");
236
+            return response;
237
+        }
238
+        if (bool) {
239
+            if ("1".equals(user.getStatus())) {
240
+                response.addError("用户已启用!");
241
+                return response;
242
+            }
243
+            user.setStatus("1");
244
+        } else {
245
+            if ("0".equals(user.getStatus())) {
246
+                response.addError("用户已停用!");
247
+                return response;
248
+            }
249
+            user.setStatus("0");
250
+        }
251
+
252
+        int result = taUserMapper.updateByPrimaryKeySelective(user);
253
+        if (result > 0) {
254
+            response.addSuccess(bool==true?"用户启用成功!":"用户停用成功!");
255
+        } else {
256
+            response.addError(bool==true?"用户启用失败!":"用户停用失败!");
257
+        }
258
+
259
+        return response;
260
+    }
261
+
262
+    @Transactional
263
+    @Override
264
+    public ResponseBean addTenantsOrDependents(String userName, String phone, String gender, Integer currentUserId, Integer type) {
265
+        ResponseBean response = new ResponseBean();
266
+
267
+        TaUser taUser = taUserMapper.selectByPrimaryKey(currentUserId);
268
+        if (null == taUser) {
269
+            response.addError("此用户不存在!");
270
+            return response;
271
+        }
272
+        if (taUser.getVerifyStatus().equals("0") || taUser.getVerifyStatus().equals("2")) {
273
+            response.addError("对不起,您未认证或认证已作废!");
274
+            return response;
275
+        }
276
+
277
+        TaUser user = new TaUser();
278
+        user.setUserName(userName);
279
+        user.setLoginName(phone);
280
+        user.setGender(gender);
281
+        user.setCreateDate(new Date());
282
+        user.setCreateUser(currentUserId);
283
+        user.setUpdateDate(new Date());
284
+        user.setUpdateUser(currentUserId);
285
+        user.setParentId(currentUserId);
286
+        user.setStatus("1");
287
+        user.setVerifyStatus("1");
288
+        user.setAcceptAgreementStatus("1");
289
+        user.setRemark("这是业主添加的!");
290
+        user.setUserName(user.getLoginName());
291
+        user.setBuildingOwnerInfoId(taUser.getBuildingOwnerInfoId());
292
+        user.setCommunityId(user.getCommunityId());
293
+
294
+        int result = taUserMapper.insertSelective(user);
295
+        if (result < 0) {
296
+            response.addError("添加失败!");
297
+            return response;
298
+        }
299
+
300
+        // 先查询角色 在角色关联记录
301
+        // 这里的 2 或者 3 是对应角色编号
302
+        int roleType = type.equals("0") ? 2 : 3;
303
+        TaSysRole taSysRole = taSysRoleMapper.selectByPrimaryKey(roleType);
304
+        if (null == taSysRole) {
305
+            response.addError("该权限不存在!");
306
+            log.error("这个角色没有找到!角色名称:{} 角色编号:{}",type.equals("0") ? "租客" : "家属",roleType);
307
+            return response;
308
+        }
309
+
310
+        TaSysUserRole taSysUserRole = new TaSysUserRole();
311
+        taSysUserRole.setCommunityId(user.getCommunityId());
312
+        taSysUserRole.setRoleId(taSysRole.getId());
313
+        taSysUserRole.setUserId(user.getId());
314
+        try {
315
+            int resultRole = taSysUserRoleMapper.insertSelective(taSysUserRole);
316
+            if (resultRole > 0) {
317
+                response.addSuccess("添加成功!");
318
+            } else {
319
+                throw new RuntimeException("租客或者家属角色权限添加失败");
320
+            }
321
+        } catch (Exception e) {
322
+            response.addSuccess("添加失败!");
323
+            log.error("租客或者家属角色权限添加失败!",e);
324
+            throw new RuntimeException("租客或者家属角色权限添加失败");
325
+        }
326
+
327
+        return response;
328
+    }
166 329
 }

+ 1
- 1
CODE/smart-community/app-api/src/main/resources/mapper/TaUserMapper.xml Прегледај датотеку

@@ -52,7 +52,7 @@
52 52
       #{createDate,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP}
53 53
       )
54 54
   </insert>
55
-  <insert id="insertSelective" parameterType="com.community.huiju.model.TaUser" >
55
+  <insert id="insertSelective" useGeneratedKeys="true" keyProperty="id" parameterType="com.community.huiju.model.TaUser" >
56 56
     insert into ta_user
57 57
     <trim prefix="(" suffix=")" suffixOverrides="," >
58 58
       <if test="id != null" >

+ 223
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpBuildingOwnerInfoMapper.xml Прегледај датотеку

@@ -0,0 +1,223 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.community.huiju.dao.TpBuildingOwnerInfoMapper" >
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TpBuildingOwnerInfo" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="community_id" property="communityId" jdbcType="INTEGER" />
7
+    <result column="id_card" property="idCard" 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" />
12
+    <result column="owner_name" property="ownerName" jdbcType="VARCHAR" />
13
+    <result column="owner_tel" property="ownerTel" jdbcType="VARCHAR" />
14
+    <result column="gender" property="gender" jdbcType="CHAR" />
15
+    <result column="pair_status" property="pairStatus" jdbcType="CHAR" />
16
+    <result column="verify_status" property="verifyStatus" jdbcType="CHAR" />
17
+    <result column="create_user" property="createUser" jdbcType="INTEGER" />
18
+    <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
19
+    <result column="update_user" property="updateUser" jdbcType="INTEGER" />
20
+    <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
21
+  </resultMap>
22
+  <sql id="Base_Column_List" >
23
+    id, community_id, id_card, building, unit, level, room_no, owner_name, owner_tel, 
24
+    gender, pair_status, verify_status, create_user, create_date, update_user, update_date
25
+  </sql>
26
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
27
+    select 
28
+    <include refid="Base_Column_List" />
29
+    from tp_building_owner_info
30
+    where id = #{id,jdbcType=INTEGER}
31
+  </select>
32
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
33
+    delete from tp_building_owner_info
34
+    where id = #{id,jdbcType=INTEGER}
35
+  </delete>
36
+  <insert id="insert" parameterType="com.community.huiju.model.TpBuildingOwnerInfo" >
37
+    insert into tp_building_owner_info (id, community_id, id_card, 
38
+      building, unit, level, 
39
+      room_no, owner_name, owner_tel, 
40
+      gender, pair_status, verify_status, 
41
+      create_user, create_date, update_user, 
42
+      update_date)
43
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{idCard,jdbcType=VARCHAR}, 
44
+      #{building,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR}, #{level,jdbcType=VARCHAR}, 
45
+      #{roomNo,jdbcType=VARCHAR}, #{ownerName,jdbcType=VARCHAR}, #{ownerTel,jdbcType=VARCHAR}, 
46
+      #{gender,jdbcType=CHAR}, #{pairStatus,jdbcType=CHAR}, #{verifyStatus,jdbcType=CHAR}, 
47
+      #{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}, 
48
+      #{updateDate,jdbcType=TIMESTAMP})
49
+  </insert>
50
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TpBuildingOwnerInfo" >
51
+    insert into tp_building_owner_info
52
+    <trim prefix="(" suffix=")" suffixOverrides="," >
53
+      <if test="id != null" >
54
+        id,
55
+      </if>
56
+      <if test="communityId != null" >
57
+        community_id,
58
+      </if>
59
+      <if test="idCard != null" >
60
+        id_card,
61
+      </if>
62
+      <if test="building != null" >
63
+        building,
64
+      </if>
65
+      <if test="unit != null" >
66
+        unit,
67
+      </if>
68
+      <if test="level != null" >
69
+        level,
70
+      </if>
71
+      <if test="roomNo != null" >
72
+        room_no,
73
+      </if>
74
+      <if test="ownerName != null" >
75
+        owner_name,
76
+      </if>
77
+      <if test="ownerTel != null" >
78
+        owner_tel,
79
+      </if>
80
+      <if test="gender != null" >
81
+        gender,
82
+      </if>
83
+      <if test="pairStatus != null" >
84
+        pair_status,
85
+      </if>
86
+      <if test="verifyStatus != null" >
87
+        verify_status,
88
+      </if>
89
+      <if test="createUser != null" >
90
+        create_user,
91
+      </if>
92
+      <if test="createDate != null" >
93
+        create_date,
94
+      </if>
95
+      <if test="updateUser != null" >
96
+        update_user,
97
+      </if>
98
+      <if test="updateDate != null" >
99
+        update_date,
100
+      </if>
101
+    </trim>
102
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
103
+      <if test="id != null" >
104
+        #{id,jdbcType=INTEGER},
105
+      </if>
106
+      <if test="communityId != null" >
107
+        #{communityId,jdbcType=INTEGER},
108
+      </if>
109
+      <if test="idCard != null" >
110
+        #{idCard,jdbcType=VARCHAR},
111
+      </if>
112
+      <if test="building != null" >
113
+        #{building,jdbcType=VARCHAR},
114
+      </if>
115
+      <if test="unit != null" >
116
+        #{unit,jdbcType=VARCHAR},
117
+      </if>
118
+      <if test="level != null" >
119
+        #{level,jdbcType=VARCHAR},
120
+      </if>
121
+      <if test="roomNo != null" >
122
+        #{roomNo,jdbcType=VARCHAR},
123
+      </if>
124
+      <if test="ownerName != null" >
125
+        #{ownerName,jdbcType=VARCHAR},
126
+      </if>
127
+      <if test="ownerTel != null" >
128
+        #{ownerTel,jdbcType=VARCHAR},
129
+      </if>
130
+      <if test="gender != null" >
131
+        #{gender,jdbcType=CHAR},
132
+      </if>
133
+      <if test="pairStatus != null" >
134
+        #{pairStatus,jdbcType=CHAR},
135
+      </if>
136
+      <if test="verifyStatus != null" >
137
+        #{verifyStatus,jdbcType=CHAR},
138
+      </if>
139
+      <if test="createUser != null" >
140
+        #{createUser,jdbcType=INTEGER},
141
+      </if>
142
+      <if test="createDate != null" >
143
+        #{createDate,jdbcType=TIMESTAMP},
144
+      </if>
145
+      <if test="updateUser != null" >
146
+        #{updateUser,jdbcType=INTEGER},
147
+      </if>
148
+      <if test="updateDate != null" >
149
+        #{updateDate,jdbcType=TIMESTAMP},
150
+      </if>
151
+    </trim>
152
+  </insert>
153
+  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpBuildingOwnerInfo" >
154
+    update tp_building_owner_info
155
+    <set >
156
+      <if test="communityId != null" >
157
+        community_id = #{communityId,jdbcType=INTEGER},
158
+      </if>
159
+      <if test="idCard != null" >
160
+        id_card = #{idCard,jdbcType=VARCHAR},
161
+      </if>
162
+      <if test="building != null" >
163
+        building = #{building,jdbcType=VARCHAR},
164
+      </if>
165
+      <if test="unit != null" >
166
+        unit = #{unit,jdbcType=VARCHAR},
167
+      </if>
168
+      <if test="level != null" >
169
+        level = #{level,jdbcType=VARCHAR},
170
+      </if>
171
+      <if test="roomNo != null" >
172
+        room_no = #{roomNo,jdbcType=VARCHAR},
173
+      </if>
174
+      <if test="ownerName != null" >
175
+        owner_name = #{ownerName,jdbcType=VARCHAR},
176
+      </if>
177
+      <if test="ownerTel != null" >
178
+        owner_tel = #{ownerTel,jdbcType=VARCHAR},
179
+      </if>
180
+      <if test="gender != null" >
181
+        gender = #{gender,jdbcType=CHAR},
182
+      </if>
183
+      <if test="pairStatus != null" >
184
+        pair_status = #{pairStatus,jdbcType=CHAR},
185
+      </if>
186
+      <if test="verifyStatus != null" >
187
+        verify_status = #{verifyStatus,jdbcType=CHAR},
188
+      </if>
189
+      <if test="createUser != null" >
190
+        create_user = #{createUser,jdbcType=INTEGER},
191
+      </if>
192
+      <if test="createDate != null" >
193
+        create_date = #{createDate,jdbcType=TIMESTAMP},
194
+      </if>
195
+      <if test="updateUser != null" >
196
+        update_user = #{updateUser,jdbcType=INTEGER},
197
+      </if>
198
+      <if test="updateDate != null" >
199
+        update_date = #{updateDate,jdbcType=TIMESTAMP},
200
+      </if>
201
+    </set>
202
+    where id = #{id,jdbcType=INTEGER}
203
+  </update>
204
+  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpBuildingOwnerInfo" >
205
+    update tp_building_owner_info
206
+    set community_id = #{communityId,jdbcType=INTEGER},
207
+      id_card = #{idCard,jdbcType=VARCHAR},
208
+      building = #{building,jdbcType=VARCHAR},
209
+      unit = #{unit,jdbcType=VARCHAR},
210
+      level = #{level,jdbcType=VARCHAR},
211
+      room_no = #{roomNo,jdbcType=VARCHAR},
212
+      owner_name = #{ownerName,jdbcType=VARCHAR},
213
+      owner_tel = #{ownerTel,jdbcType=VARCHAR},
214
+      gender = #{gender,jdbcType=CHAR},
215
+      pair_status = #{pairStatus,jdbcType=CHAR},
216
+      verify_status = #{verifyStatus,jdbcType=CHAR},
217
+      create_user = #{createUser,jdbcType=INTEGER},
218
+      create_date = #{createDate,jdbcType=TIMESTAMP},
219
+      update_user = #{updateUser,jdbcType=INTEGER},
220
+      update_date = #{updateDate,jdbcType=TIMESTAMP}
221
+    where id = #{id,jdbcType=INTEGER}
222
+  </update>
223
+</mapper>

BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/EnumUtils.class Прегледај датотеку