Commit fa230732 authored by libin's avatar libin

用户身份信息修改

parent 25e0d6cc
...@@ -316,6 +316,15 @@ public class AppUserPositionTempBiz extends BaseBiz<AppUserPositionTempMapper, A ...@@ -316,6 +316,15 @@ public class AppUserPositionTempBiz extends BaseBiz<AppUserPositionTempMapper, A
public void setPostionIdByPhone(String phone) { public void setPostionIdByPhone(String phone) {
try { try {
//根据手机号查询userId
AppUserLogin userLogin = loginBiz.checkeUserLogin(phone);
Integer userId = userLogin.getId();
if (userLogin == null) {
log.info("----用户不存在----phone===" + phone);
return;
}
Integer postionId = appShareholderDetailBiz.findShareholderByUserIdOrPhone(null, phone);
if(Objects.isNull(postionId)) {
Example example = new Example(AppUserPositionTemp.class); Example example = new Example(AppUserPositionTemp.class);
example.createCriteria().andEqualTo("phone", phone).andEqualTo("isDel", 0); example.createCriteria().andEqualTo("phone", phone).andEqualTo("isDel", 0);
List<AppUserPositionTemp> list = selectByExample(example); List<AppUserPositionTemp> list = selectByExample(example);
...@@ -328,20 +337,16 @@ public class AppUserPositionTempBiz extends BaseBiz<AppUserPositionTempMapper, A ...@@ -328,20 +337,16 @@ public class AppUserPositionTempBiz extends BaseBiz<AppUserPositionTempMapper, A
log.info("----用户已存在身份----phone===" + phone); log.info("----用户已存在身份----phone===" + phone);
return; return;
} }
//根据手机号查询userId
AppUserLogin userLogin = loginBiz.checkeUserLogin(phone);
if (userLogin == null) {
log.info("----用户不存在----phone===" + phone);
return;
}
Integer userId = userLogin.getId();
positionTemp.setUserId(userId); positionTemp.setUserId(userId);
int num = updateSelectiveByIdRe(positionTemp); int num = updateSelectiveByIdRe(positionTemp);
if (num > 0) { if (num > 0) {
Integer postionId = positionTemp.getPositionId(); postionId = positionTemp.getPositionId();
log.info("----用户---postionId====" + postionId + "----phone===" + phone); log.info("----用户---postionId====" + postionId + "----phone===" + phone);
detailBiz.updateUserPositionByUserId(userId, postionId); detailBiz.updateUserPositionByUserId(userId, postionId);
} }
}else {
detailBiz.updateUserPositionByUserId(userId,postionId);
}
} catch (Exception e) { } catch (Exception e) {
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment