|
|
|
@ -98,7 +98,7 @@ public class UserServiceImpl implements UserService {
|
|
|
|
|
BeanUtil.copyProperties(user, copyUser);
|
|
|
|
|
new HashSet<>();
|
|
|
|
|
copyUser.setRoles(roles);
|
|
|
|
|
String username = byId.getCompanyName().
|
|
|
|
|
String username = byId.getCompanyName().trim().
|
|
|
|
|
concat(StrPool.COLON).concat(user.getUsername());
|
|
|
|
|
if (userRepository.findByUsername(username) != null) {
|
|
|
|
|
throw new EntityExistException(User.class, "username", username);
|
|
|
|
@ -188,8 +188,8 @@ public class UserServiceImpl implements UserService {
|
|
|
|
|
BeanUtil.copyProperties(userDTO, user);
|
|
|
|
|
user.setCompanyId(companyId);
|
|
|
|
|
user.setUsername(flag ||
|
|
|
|
|
userId == DefaultNumberConstants.ONE_NUMBER ? user.getUsername() :
|
|
|
|
|
companyService.findById(companyId).getCompanyName().concat(StrPool.COLON).concat(user.getUsername()));
|
|
|
|
|
userId == DefaultNumberConstants.ONE_NUMBER ? user.getUsername().trim() :
|
|
|
|
|
companyService.findById(companyId).getCompanyName().trim().concat(StrPool.COLON).concat(user.getUsername()));
|
|
|
|
|
user.setWhichUserId(userId);
|
|
|
|
|
User userCreateResult = create(user);
|
|
|
|
|
MultipartFile file = userDTO.getFile();
|
|
|
|
@ -345,7 +345,7 @@ public class UserServiceImpl implements UserService {
|
|
|
|
|
if (!user.getUsername().equals(resources.getUsername()) && user.getCompanyId() != null){
|
|
|
|
|
String username =
|
|
|
|
|
companyService.findById(user.getCompanyId())
|
|
|
|
|
.getCompanyName().concat(StrPool.COLON).concat(resources.getUsername());
|
|
|
|
|
.getCompanyName().trim().concat(StrPool.COLON).concat(resources.getUsername());
|
|
|
|
|
user.setUsername(username);
|
|
|
|
|
}
|
|
|
|
|
user.setEmail(resources.getEmail());
|
|
|
|
|