|
@@ -50,7 +50,7 @@ public class UserService {
|
|
|
}
|
|
|
TopUserVo vo = userDao.getTopUserByLoginName(dto.getLoginName());
|
|
|
if (vo == null) {
|
|
|
- return R.error("没有查询到top用户信息");
|
|
|
+ return R.error("新增用户必须是top已有账号,用户正常使用需要top增加移网投诉权限。");
|
|
|
}
|
|
|
UserRoleCity role = getUserRoleCity(session);
|
|
|
if (role.getCityId() != -1 && !role.getCityId().equals(vo.getCityId())) {
|
|
@@ -307,7 +307,7 @@ public class UserService {
|
|
|
String loginNames = users.stream().map(User::getLoginName).collect(Collectors.joining("、"));
|
|
|
sb.append("批量复制权限给 ").append(loginNames).append(";权限:");
|
|
|
List<UserRoleCity> userRoleCities = new ArrayList<>();
|
|
|
- List<UserFunction> userFunctions = new ArrayList<>();
|
|
|
+ Set<UserFunction> userFunctions = new HashSet<>();
|
|
|
for (AddUserRoleDto t : dto.getRoles()) {
|
|
|
sb.append(t.getRoleName()).append("-").append(t.getCityName()).append(",");
|
|
|
for (Integer userId : dto.getUserIds()) {
|
|
@@ -328,7 +328,7 @@ public class UserService {
|
|
|
userRoleCityDao.insertBatch(userRoleCities);
|
|
|
if (!CollectionUtils.isEmpty(userFunctions)) {
|
|
|
deleteUserFunctionByUserIds(dto.getUserIds());
|
|
|
- userFunctionDao.insertBatch(userFunctions);
|
|
|
+ userFunctionDao.insertBatch(new ArrayList<>(userFunctions));
|
|
|
}
|
|
|
// 记录日志
|
|
|
operationLogService.logOperation(session, "批量复制权限", sb.toString());
|