From 6f12948893fcc846dfb32aa861c473a842edcd56 Mon Sep 17 00:00:00 2001
From: jinpengyong <jpy123456>
Date: Wed, 23 Jun 2021 14:46:15 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev_
---
screen-api/src/main/java/com/moral/api/service/impl/UserGroupServiceImpl.java | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/screen-api/src/main/java/com/moral/api/service/impl/UserGroupServiceImpl.java b/screen-api/src/main/java/com/moral/api/service/impl/UserGroupServiceImpl.java
index 66f03ef..75a25f0 100644
--- a/screen-api/src/main/java/com/moral/api/service/impl/UserGroupServiceImpl.java
+++ b/screen-api/src/main/java/com/moral/api/service/impl/UserGroupServiceImpl.java
@@ -20,6 +20,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.ObjectUtils;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
@@ -45,6 +46,9 @@
@Autowired
private GroupMapper groupMapper;
+ @Autowired
+ private OperationLogUtils operationLogUtils;
+
@Override
@Transactional
public void allotGroups(Map<String, Object> parameters) {
@@ -59,7 +63,7 @@
deleteWrapper.eq("user_id", userId);
userGroupMapper.delete(deleteWrapper);
List<String> groups = new ArrayList<>();
- if (groupIds != null && !groupIds.isEmpty()) {
+ if (!ObjectUtils.isEmpty(groupIds)) {
groupIds.forEach(groupId -> {
groups.add(groupMapper.selectById(groupId).getGroupName());
UserGroup userGroup = new UserGroup();
@@ -72,8 +76,8 @@
//������
String account = userMapper.selectById((Integer) parameters.get("userId")).getAccount();
- String content = "������������" + account + "���������������" + groups.toString();
- OperationLogUtils.insertLog(request, content, Constants.UPDATE_OPERATE_TYPE);
+ String content = "������������" + account + "���������������" + groups;
+ operationLogUtils.insertLog(request, content, Constants.UPDATE_OPERATE_TYPE);
}
@Override
--
Gitblit v1.8.0