From 5963b8ba238e0ed8560044462a570272656bff0c Mon Sep 17 00:00:00 2001
From: jinpengyong <jpy123456>
Date: Thu, 24 Jun 2021 14:06:55 +0800
Subject: [PATCH] update
---
screen-api/src/main/java/com/moral/api/service/impl/GroupMenuServiceImpl.java | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/screen-api/src/main/java/com/moral/api/service/impl/GroupMenuServiceImpl.java b/screen-api/src/main/java/com/moral/api/service/impl/GroupMenuServiceImpl.java
index 18cecf2..ec6709b 100644
--- a/screen-api/src/main/java/com/moral/api/service/impl/GroupMenuServiceImpl.java
+++ b/screen-api/src/main/java/com/moral/api/service/impl/GroupMenuServiceImpl.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 MenuMapper menuMapper;
+ @Autowired
+ private OperationLogUtils operationLogUtils;
+
@Override
@Transactional
public void allotMenus(Map<String, Object> parameters) {
@@ -59,7 +63,7 @@
deleteWrapper.eq("group_id", groupId).eq("channel_key", Constants.WEB_CHANNEL);
groupMenuMapper.delete(deleteWrapper);
List<String> menus = new ArrayList<>();
- if (menuIds != null && !menuIds.isEmpty()) {
+ if (!ObjectUtils.isEmpty(menuIds)) {
menuIds.forEach(menuId -> {
menus.add(menuMapper.selectById(menuId).getName());
GroupMenu groupMenu = new GroupMenu();
@@ -71,11 +75,10 @@
});
}
-
//������
String groupName = groupMapper.selectById((Integer) parameters.get("groupId")).getGroupName();
- String content = "���������" + groupName + "������������������" + menus.toString();
- OperationLogUtils.insertLog(request, content, Constants.UPDATE_OPERATE_TYPE);
+ String content = "���������" + groupName + "������������������" + menus;
+ operationLogUtils.insertLog(request, content, Constants.UPDATE_OPERATE_TYPE);
}
@Override
--
Gitblit v1.8.0