|
|
@@ -29,6 +29,7 @@ import com.inspur.logging.object.log.SmsbLogDto;
|
|
|
import com.inspur.logging.service.HttpContextUtils;
|
|
|
import com.inspur.logging.service.NetUtils;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.dubbo.config.annotation.DubboReference;
|
|
|
import org.keycloak.representations.idm.CredentialRepresentation;
|
|
|
@@ -135,10 +136,10 @@ public class KeycloakUserController {
|
|
|
logDto.setDescription("账号角色分配");
|
|
|
String userName = keycloakService.getUserMap().get(usersRoleMappingDTO.getUserId());
|
|
|
StringBuffer sbf = new StringBuffer("给用户:"+ (StringUtils.isNotEmpty(userName) ? userName : usersRoleMappingDTO.getUserId()));
|
|
|
- if(!usersRoleMappingDTO.getAddRoleList().isEmpty()){
|
|
|
+ if(CollectionUtils.isNotEmpty(usersRoleMappingDTO.getAddRoleList())){
|
|
|
sbf.append(",分配角色:"+getRoleNameList(usersRoleMappingDTO.getAddRoleList()));
|
|
|
}
|
|
|
- if(!usersRoleMappingDTO.getRemoveRoleList().isEmpty()){
|
|
|
+ if(CollectionUtils.isNotEmpty(usersRoleMappingDTO.getRemoveRoleList())){
|
|
|
sbf.append(",删除角色:"+getRoleNameList(usersRoleMappingDTO.getRemoveRoleList()));
|
|
|
}
|
|
|
logDto.setParams(sbf.toString());
|