weiximei 6 yıl önce
ebeveyn
işleme
8ab74d3f28

+ 12
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/UserController.java Dosyayı Görüntüle

@@ -41,6 +41,7 @@ public class UserController extends BaseController {
41 41
     @ApiImplicitParams({
42 42
             @ApiImplicitParam(paramType = "path",dataType = "String",name = "communityId",value = "小区"),
43 43
             @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "loginName(登陆名(手机号)) code(验证码)"),
44
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 app"),
44 45
     })
45 46
     @RequestMapping(value = "/user/login/{communityId}",method = RequestMethod.POST)
46 47
     public ResponseBean login(@RequestBody String parameter,
@@ -64,6 +65,7 @@ public class UserController extends BaseController {
64 65
     @ApiImplicitParams({
65 66
             @ApiImplicitParam(paramType = "body",dataType = "String",name = "paramets",value = "phone:登陆(手机号),code:(手机验证码),otherUserId:(租客或者家属ID,空为业主本人)"),
66 67
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
68
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 app"),
67 69
     })
68 70
             @RequestMapping(value = "/user/phone",method = RequestMethod.PUT)
69 71
     public ResponseBean update(@RequestBody String paramets, HttpSession session){
@@ -76,7 +78,8 @@ public class UserController extends BaseController {
76 78
 
77 79
     @ApiOperation(value = "查看房屋成员列表", notes = "查看房屋成员列表")
78 80
     @ApiImplicitParams({
79
-            @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token")
81
+            @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
82
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 app"),
80 83
     })
81 84
     @RequestMapping(value = "/roomUserList", method = RequestMethod.GET)
82 85
     public ResponseBean accessTicket(HttpSession session){
@@ -91,6 +94,7 @@ public class UserController extends BaseController {
91 94
     @ApiImplicitParams({
92 95
             @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "userName用户民和gender性别"),
93 96
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
97
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 app"),
94 98
     })
95 99
     @RequestMapping(value = "/user/update/info",method = RequestMethod.PUT)
96 100
     public ResponseBean updateUserNameAndGender(@RequestBody String parameter,
@@ -111,6 +115,7 @@ public class UserController extends BaseController {
111 115
     @ApiImplicitParams({
112 116
             @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "userId(租客或者家属) type(1启用 0停用)"),
113 117
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
118
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 app"),
114 119
     })
115 120
     @RequestMapping(value = "/user/dependentsOrTenants",method = RequestMethod.PUT)
116 121
     public ResponseBean updateDependentsOrTenants(@RequestBody String parameter,
@@ -133,6 +138,7 @@ public class UserController extends BaseController {
133 138
                     "phone(租客或者家属 手机号) " +
134 139
                     "gender(租客或者家属 性别 1男 2女) " +
135 140
                     "type(2租客 3家属)"),
141
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 app"),
136 142
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
137 143
     })
138 144
     @RequestMapping(value = "/user/addTenantsOrDependents",method = RequestMethod.POST)
@@ -158,6 +164,7 @@ public class UserController extends BaseController {
158 164
                     "phone(租客或者家属 手机号) " +
159 165
                     "gender(租客或者家属 性别 1男 2女) " +
160 166
                     "type(2租客 3家属)"),
167
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 app"),
161 168
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
162 169
     })
163 170
     @RequestMapping(value = "/user/updateTenantsOrDependents",method = RequestMethod.POST)
@@ -182,6 +189,7 @@ public class UserController extends BaseController {
182 189
     @ApiOperation(value = "修改用户头像", notes = "修改用户头像")
183 190
     @ApiImplicitParams({
184 191
             @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "headPortrait(用户头像)"),
192
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 app"),
185 193
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
186 194
     })
187 195
     @RequestMapping(value = "/user/modifyUserHeadPortrait",method = RequestMethod.PUT)
@@ -199,6 +207,7 @@ public class UserController extends BaseController {
199 207
     @ApiOperation(value = "获取用户信息", notes = "获取用户信息, 携带userId表示查询租客或者家属")
200 208
     @ApiImplicitParams({
201 209
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
210
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 app"),
202 211
             @ApiImplicitParam(paramType = "query",dataType = "String",name = "userId",value = "租客或者家属的ID(可选值)"),
203 212
     })
204 213
     @RequestMapping(value = "/user/info",method = RequestMethod.GET)
@@ -220,7 +229,8 @@ public class UserController extends BaseController {
220 229
 
221 230
     @ApiOperation(value = "游客登录", notes = "游客登录")
222 231
     @ApiImplicitParams({
223
-            @ApiImplicitParam(paramType = "path", dataTypeClass = Integer.class, name = "communityId", value = "小区Id")
232
+            @ApiImplicitParam(paramType = "path", dataTypeClass = Integer.class, name = "communityId", value = "小区Id"),
233
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 app"),
224 234
     })
225 235
     @RequestMapping(value = "/user/temporary/{communityId}", method = RequestMethod.POST)
226 236
     public ResponseBean temporaryLogin(@PathVariable Integer communityId, HttpSession session) {

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITaUserService.java Dosyayı Görüntüle

@@ -35,7 +35,7 @@ public interface ITaUserService {
35 35
     ResponseBean register(TaUser user);
36 36
 
37 37
     /**
38
-     * 修改当前用户信息
38
+     * 修改当前用户手机号
39 39
      * @param id
40 40
      * @return
41 41
      */

+ 3
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java Dosyayı Görüntüle

@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
5 5
 import com.community.commom.constant.Constant;
6 6
 import com.community.commom.mode.ResponseBean;
7 7
 import com.community.commom.utils.AccountValidatorUtil;
8
+import com.community.commom.utils.BeanTools;
8 9
 import com.community.commom.utils.MD5Utils;
9 10
 import com.community.commom.uuid.IdGen;
10 11
 import com.community.huiju.common.code.cache.AppkeyCache;
@@ -216,6 +217,7 @@ public class TaUserServiceImpl implements ITaUserService {
216 217
             TpBuildingOwnerInfo buildingOwnerInfo = buildingOwnerInfoList.get(0);
217 218
             user.setBuildingOwnerInfoId(buildingOwnerInfo.getId());
218 219
             user.setVerifyStatus("1");
220
+            user.setUserName(buildingOwnerInfo.getOwnerName());
219 221
             // 标记位1, 业主身份
220 222
             roleType = 1;
221 223
 
@@ -367,7 +369,7 @@ public class TaUserServiceImpl implements ITaUserService {
367 369
         ResponseBean response = new ResponseBean();
368 370
 
369 371
         TaUser taUser = taUserMapper.selectByPrimaryKey(user.getId());
370
-        BeanUtils.copyProperties(user,taUser);
372
+        BeanTools.copyProperties(user, taUser);
371 373
 
372 374
         int result = taUserMapper.updateByPrimaryKeySelective(taUser);
373 375
 

+ 7
- 1
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoServiceImpl.java Dosyayı Görüntüle

@@ -133,17 +133,21 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
133 133
     public ResponseBean update(String parameter, UserElement userElement) {
134 134
         ResponseBean responseBean = new ResponseBean();
135 135
 
136
+
136 137
         TpBuildingOwnerInfo tpBuildingOwnerInfo = JSONObject.parseObject(parameter, TpBuildingOwnerInfo.class);
137 138
         if (!AccountValidatorUtil.isPhone(tpBuildingOwnerInfo.getOwnerTel())){
138 139
             responseBean.addError("请输入正取的手机号!");
139 140
             return responseBean;
140 141
         }
141 142
 
142
-
143 143
         TpBuildingOwnerInfo oldTpBuildingOwnerInfo = tpBuildingOwnerInfoMapper.selectById(tpBuildingOwnerInfo.getId());
144 144
         if (null == oldTpBuildingOwnerInfo) {
145 145
             throw new WisdomException("%s 数据不存在!", tpBuildingOwnerInfo.getId());
146 146
         }
147
+        if ("1".equals(oldTpBuildingOwnerInfo.getVerifyStatus())) {
148
+            responseBean.addError("不能修改已认证的楼栋业主信息!");
149
+            return responseBean;
150
+        }
147 151
 
148 152
         // 物业端的用户,也就是正在操作的物业人员
149 153
         // 物业端用户小区Id不使用! 小区 Id 获取请使用 userElement
@@ -289,6 +293,8 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
289 293
         if (null != appOwnerUser) {
290 294
             // 更新 APP 端用户认证的状态
291 295
             appOwnerUser.setBuildingOwnerInfoId(tpBuildingOwnerInfo.getId());
296
+            appOwnerUser.setUserName(tpBuildingOwnerInfo.getOwnerName());
297
+
292 298
             // 认证状态  0 是未认证    1是认证通过   2是已作废
293 299
             // 标记位已认证
294 300
             appOwnerUser.setVerifyStatus("1");

+ 1
- 1
VUECODE/smart-property-manage/src/views/building/edi/index.vue Dosyayı Görüntüle

@@ -23,7 +23,7 @@
23 23
         <el-input v-model="ruleForm.ownerTel" :disabled="isOwnerTel"/>
24 24
       </el-form-item>
25 25
       <el-form-item>
26
-        <el-button type="primary" @click="submitForm('ruleForm')">修改</el-button>
26
+        <el-button type="primary" @click="submitForm('ruleForm')">确定</el-button>
27 27
         <el-button @click="backIndex">返回</el-button>
28 28
       </el-form-item>
29 29
     </el-form>

+ 13
- 1
VUECODE/smart-property-manage/src/views/building/index.vue Dosyayı Görüntüle

@@ -286,7 +286,19 @@ export default {
286 286
         this.$message.error('请选择一行数据进行修改!')
287 287
         return
288 288
       }
289
-      this.$router.push({ name: 'building-edi', params: { id: ids[0], listQuery: this.listQuery }})
289
+      this.$store.dispatch('GetByIdBuildingId', ids[0]).then((res) => {
290
+        const resCode = res.code
291
+        if (resCode === '0') {
292
+          const resData = res.data
293
+          if (resData.verifyStatus === '1') {
294
+            this.$message.error('不能修改已认证的楼栋业主信息!')
295
+            return
296
+          }
297
+        }
298
+        this.$router.push({ name: 'building-edi', params: { id: ids[0], listQuery: this.listQuery }})
299
+      }).catch(() => {
300
+        console.log('error GetByIdBuildingId')
301
+      })
290 302
     },
291 303
     formatDate(val) {
292 304
       var value = new Date(val)