|
@@ -325,12 +325,18 @@ public class TaUserServiceImpl implements ITaUserService {
|
325
|
325
|
// 校验手机号和验证码
|
326
|
326
|
iCode.checkPhoneAndCode(phone, code);
|
327
|
327
|
|
328
|
|
- //当前小区下的电话校验
|
329
|
|
- TaUser loginName = taUserMapper.getByLoginName(user.getCommunityId(), phone);
|
330
|
|
- if (null != loginName) {
|
|
328
|
+ // 查询出这个手机号
|
|
329
|
+ TaUser hasUserPhone = hasUserPhone(phone);
|
|
330
|
+ if (null != hasUserPhone && user.getId().intValue() != hasUserPhone.getId().intValue()) {
|
331
|
331
|
response.addError("号码已占用");
|
332
|
332
|
return response;
|
333
|
333
|
}
|
|
334
|
+
|
|
335
|
+ // 如果提交上来的手机号 和 这个用户本身的手机号相等,就直接返回成功!
|
|
336
|
+ if (null != hasUserPhone && user.getLoginName().equals(phone)) {
|
|
337
|
+ response.addSuccess(new String[0]);
|
|
338
|
+ return response;
|
|
339
|
+ }
|
334
|
340
|
TpEquipmentTree tpEquipmentTree = tpEquipmentTreeMapper.selectByCommunityId(userElement.getCommunityId());
|
335
|
341
|
String data = HKOpenApi.HKpersonPhone(user.getHkUserId(), user.getHkPersonNo(), user.getUserName(), phone, tpEquipmentTree.getHttpServer());
|
336
|
342
|
JSONObject jsonobject = JSONObject.parseObject(data);
|