|
|
@@ -103,7 +103,6 @@ public class UserAccountServiceImpl extends SuperService implements UserAccountS
|
|
|
oid = getCurrentOid();
|
|
|
}
|
|
|
Assert.hasText(oid, "oid不能为空");
|
|
|
- Assert.hasText(param.getPhone(), "phone不能为空");
|
|
|
Assert.hasText(param.getName(), "name不能为空");
|
|
|
if (param.getState() == null) {
|
|
|
param.setState(UserState.Normal);
|
|
|
@@ -124,10 +123,12 @@ public class UserAccountServiceImpl extends SuperService implements UserAccountS
|
|
|
}
|
|
|
|
|
|
UserAccount temp = null;
|
|
|
- String loginName = param.getPhone();
|
|
|
String userId = "";
|
|
|
// 这的ID是 用户和机构关系数据ID
|
|
|
if (StringUtils.isEmpty(param.getId())) {
|
|
|
+ Assert.hasText(param.getPhone(), "phone不能为空");
|
|
|
+
|
|
|
+ String loginName = param.getPhone();
|
|
|
// 添加
|
|
|
// 判断用户是否存在
|
|
|
temp = userCountDao.findTopByLoginName(loginName);
|
|
|
@@ -169,8 +170,11 @@ public class UserAccountServiceImpl extends SuperService implements UserAccountS
|
|
|
return ResultContent.buildFail(String.format(ResultMessage.DATA_NOT_EXIST, param.getId()));
|
|
|
}
|
|
|
temp = organizationUser.getUser();
|
|
|
+ if (StringUtils.isEmpty(param.getPhone())) {
|
|
|
+ param.setPhone(temp.getPhone());
|
|
|
+ }
|
|
|
// 用户信息
|
|
|
- BeanUtils.copyProperties(param, temp);
|
|
|
+ BeanUtils.copyProperties(param, temp, "id", "userId", "userType", "loginType");
|
|
|
temp.setSpellCode(CommonUtil.getPinyin(param.getName()));
|
|
|
userCountDao.save(temp);
|
|
|
}
|
|
|
@@ -192,7 +196,8 @@ public class UserAccountServiceImpl extends SuperService implements UserAccountS
|
|
|
organizationUser.setIsAdmin(Boolean.FALSE);
|
|
|
organizationUser.setAuthType(organization.getAuthType());
|
|
|
organizationUser.setCreateUserId(getCurrentUserId());
|
|
|
- organizationUser.setUserType(OrganizationUserType.Common);
|
|
|
+ // 在机构中的用户类型
|
|
|
+ organizationUser.setUserType(OrganizationUserType.Consumer);
|
|
|
} else {
|
|
|
//权限中心: 删除以前的,这不存在的角色组
|
|
|
List<Role> oldRoles = organizationUser.getRoles();
|
|
|
@@ -444,7 +449,8 @@ public class UserAccountServiceImpl extends SuperService implements UserAccountS
|
|
|
if (ObjectUtils.isEmpty(userCount)) {
|
|
|
return ResultContent.buildFail(String.format(ResultMessage.DATA_NOT_EXIST, param.getUserId()));
|
|
|
}
|
|
|
- com.github.microservice.auth.client.content.ResultContent<Void> resultContent = userService.updateLoginPassword(param.getUserId(), CardDefault.DEFAULT_PASSWORD);
|
|
|
+ com.github.microservice.auth.client.content.ResultContent<Void> resultContent =
|
|
|
+ userService.updateLoginPassword(param.getUserId(), CardDefault.DEFAULT_PASSWORD);
|
|
|
if (resultContent.getState() != ResultState.Success) {
|
|
|
return ResultContent.buildFail(resultContent.getMsg());
|
|
|
}
|