提交 b1789442 authored 作者: yucaiwei's avatar yucaiwei

--no commit message

上级 190b1499
......@@ -362,19 +362,17 @@ public class FgPermissionsController {
if (m.getStatus() == 0 || m.getStatus() == 2) {
throw new BaseException(5, "该账户已禁用");
}
if (StringUtils.isBlank(m.getPhone()) && StringUtils.isNotBlank(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(form.getPhone())) {
Example example = mService.createExample();
example.createCriteria().andEqualTo("phone", form.getPhone());
if (mService.selectCountByExample(example) == 0) {
m.setPhone(form.getPhone());
if (StringUtils.isBlank(m.getPhone())){
m.setPhone(form.getPhone());
} else {
if (!m.getPhone().equals(form.getPhone())) {
m.setPhone(form.getPhone());
}
}
}
// throw new BaseException(15, "该手机号已被注册");
}
......@@ -395,12 +393,18 @@ public class FgPermissionsController {
if (StringUtils.isBlank(m.getQqKey()) && StringUtils.isNotBlank(form.getQqKey())) {
m.setQqKey(form.getQqKey());
}
if (StringUtils.isBlank(m.getWechatKey()) && StringUtils.isNotBlank(form.getWechatKey())) {
m.setWechatKey(form.getWechatKey());
}
if(StringUtils.isNotBlank(m.getWechatKey()) && StringUtils.isNotBlank(form.getWechatKey()) && !m.getWechatKey().equals(form.getWechatKey())){
m.setWechatKey(form.getWechatKey());
if (StringUtils.isNotBlank(form.getWechatKey())) {
if (StringUtils.isBlank(m.getWechatKey())) {
m.setWechatKey(form.getWechatKey());
} else {
if(!m.getWechatKey().equals(form.getWechatKey())){
m.setWechatKey(form.getWechatKey());
}
}
}
if(!mService.updateByPrimaryKeySelective(m)) {
throw new BaseException("绑定微信或QQ失败!");
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论