From 86cdd920b68274185233383f69ddb974052b6b6f Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期一, 01 四月 2024 17:55:51 +0800
Subject: [PATCH] system模块修改
---
smart-man-boot/src/main/java/com/qianwen/smartman/modules/system/service/impl/TopMenuServiceImpl.java | 38 +++++++++-----------------------------
1 files changed, 9 insertions(+), 29 deletions(-)
diff --git a/smart-man-boot/src/main/java/com/qianwen/smartman/modules/system/service/impl/TopMenuServiceImpl.java b/smart-man-boot/src/main/java/com/qianwen/smartman/modules/system/service/impl/TopMenuServiceImpl.java
index c628b46..46f4cf8 100644
--- a/smart-man-boot/src/main/java/com/qianwen/smartman/modules/system/service/impl/TopMenuServiceImpl.java
+++ b/smart-man-boot/src/main/java/com/qianwen/smartman/modules/system/service/impl/TopMenuServiceImpl.java
@@ -1,47 +1,25 @@
package com.qianwen.smartman.modules.system.service.impl;
-import com.baomidou.mybatisplus.core.conditions.Wrapper;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import java.lang.invoke.SerializedLambda;
import java.util.ArrayList;
import java.util.List;
+
import javax.validation.constraints.NotEmpty;
+
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.qianwen.core.mp.base.BaseServiceImpl;
import com.qianwen.smartman.modules.system.entity.TopMenu;
import com.qianwen.smartman.modules.system.entity.TopMenuSetting;
import com.qianwen.smartman.modules.system.mapper.TopMenuMapper;
import com.qianwen.smartman.modules.system.service.ITopMenuService;
import com.qianwen.smartman.modules.system.service.ITopMenuSettingService;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
@Service
-/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/system/service/impl/TopMenuServiceImpl.class */
public class TopMenuServiceImpl extends BaseServiceImpl<TopMenuMapper, TopMenu> implements ITopMenuService {
private final ITopMenuSettingService topMenuSettingService;
- private static /* synthetic */ Object $deserializeLambda$(SerializedLambda lambda) {
- String implMethodName = lambda.getImplMethodName();
- boolean z = true;
- switch (implMethodName.hashCode()) {
- case -420196903:
- if (implMethodName.equals("getTopMenuId")) {
- z = false;
- break;
- }
- break;
- }
- switch (z) {
- case false:
- if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/modules/system/entity/TopMenuSetting") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) {
- return (v0) -> {
- return v0.getTopMenuId();
- };
- }
- break;
- }
- throw new IllegalArgumentException("Invalid lambda deserialization");
- }
public TopMenuServiceImpl(final ITopMenuSettingService topMenuSettingService) {
this.topMenuSettingService = topMenuSettingService;
@@ -50,9 +28,11 @@
@Override // org.springblade.modules.system.service.ITopMenuService
@Transactional(rollbackFor = {Exception.class})
public boolean grant(@NotEmpty List<Long> topMenuIds, @NotEmpty List<Long> menuIds) {
+ this.topMenuSettingService.remove(Wrappers.<TopMenuSetting>update().lambda().in(TopMenuSetting::getTopMenuId, topMenuIds));
+ /*
this.topMenuSettingService.remove((Wrapper) Wrappers.update().lambda().in((v0) -> {
return v0.getTopMenuId();
- }, topMenuIds));
+ }, topMenuIds));*/
List<TopMenuSetting> menuSettings = new ArrayList<>();
topMenuIds.forEach(topMenuId -> {
menuIds.forEach(menuId -> {
--
Gitblit v1.9.3