|
@@ -17,6 +17,7 @@ import com.xy.dto.SysWorkUser.*;
|
|
|
import com.xy.dto.UserInfoDto;
|
|
|
import com.xy.dto.be.MercUserDto;
|
|
|
import com.xy.entity.UserInfo;
|
|
|
+import com.xy.error.CommRuntimeException;
|
|
|
import com.xy.mapper.UserInfoMapper;
|
|
|
import com.xy.service.be.MercFeignService;
|
|
|
import com.xy.utils.*;
|
|
@@ -200,7 +201,7 @@ public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo> i
|
|
|
if (!update.getTel().equals(byId.getTel())) {
|
|
|
long count = count(new LambdaQueryWrapper<UserInfo>().eq(UserInfo::getTel, update.getTel()));
|
|
|
if (count > 0) {
|
|
|
- return R.fail("手机已存在");
|
|
|
+ throw new CommRuntimeException("手机已存在");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -208,7 +209,7 @@ public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo> i
|
|
|
if (!byId.getMail().equals(update.getMail())) {
|
|
|
long count = count(new LambdaQueryWrapper<UserInfo>().eq(UserInfo::getMail, update.getMail()));
|
|
|
if (count > 0) {
|
|
|
- return R.fail("邮箱已存在");
|
|
|
+ throw new CommRuntimeException("邮箱已存在");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -229,6 +230,7 @@ public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo> i
|
|
|
|
|
|
log.info("权限用户信息修改:{}", JSONUtil.toJsonPrettyStr(updateDto));
|
|
|
sysWorkUserService.update(updateDto);
|
|
|
+
|
|
|
}
|
|
|
// 修改用户
|
|
|
updateById(updateInfo);
|