提交 85e4f488 authored 作者: yucaiwei's avatar yucaiwei

--no commit message

上级 b3289920
...@@ -363,11 +363,16 @@ public class FgPermissionsController { ...@@ -363,11 +363,16 @@ public class FgPermissionsController {
throw new BaseException(5, "该账户已禁用"); throw new BaseException(5, "该账户已禁用");
} }
if (StringUtils.isBlank(m.getPhone()) && StringUtils.isNotBlank(form.getPhone())) { if (StringUtils.isBlank(m.getPhone()) && StringUtils.isNotBlank(form.getPhone())) {
m.setPhone(form.getPhone()); Example example = mService.createExample();
example.createCriteria().andEqualTo("phone", form.getPhone());
if (mService.selectCountByExample(example) == 0) {
m.setPhone(form.getPhone());
}
// throw new BaseException(15, "该手机号已被注册");
} }
if(StringUtils.isNotBlank(m.getPhone()) && StringUtils.isNotBlank(form.getPhone()) && !m.getPhone().equals(form.getPhone())){ /*if(StringUtils.isNotBlank(m.getPhone()) && StringUtils.isNotBlank(form.getPhone()) && !m.getPhone().equals(form.getPhone())){
m.setPhone(form.getPhone()); m.setPhone(form.getPhone());
} }*/
if(!mService.updateByPrimaryKeySelective(m)) { if(!mService.updateByPrimaryKeySelective(m)) {
throw new BaseException("绑定手机号失败!"); throw new BaseException("绑定手机号失败!");
} }
...@@ -389,7 +394,7 @@ public class FgPermissionsController { ...@@ -389,7 +394,7 @@ public class FgPermissionsController {
m.setWechatKey(form.getWechatKey()); m.setWechatKey(form.getWechatKey());
} }
if(StringUtils.isNotBlank(m.getWechatKey()) && StringUtils.isNotBlank(form.getWechatKey()) && !m.getPhone().equals(form.getPhone())){ if(StringUtils.isNotBlank(m.getWechatKey()) && StringUtils.isNotBlank(form.getWechatKey()) && !m.getPhone().equals(form.getPhone())){
m.setPhone(form.getWechatKey()); m.setWechatKey(form.getWechatKey());
} }
if(!mService.updateByPrimaryKeySelective(m)) { if(!mService.updateByPrimaryKeySelective(m)) {
throw new BaseException("绑定微信或QQ失败!"); throw new BaseException("绑定微信或QQ失败!");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论