From 040976de6f9934b99f30268a28e2ecf42260e217 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期六, 18 五月 2024 22:13:01 +0800
Subject: [PATCH] 注释整理
---
smart-man-boot/src/main/java/com/qianwen/smartman/modules/system/controller/GalleryController.java | 78 ++++++++++-----------------------------
1 files changed, 20 insertions(+), 58 deletions(-)
diff --git a/smart-man-boot/src/main/java/com/qianwen/smartman/modules/system/controller/GalleryController.java b/smart-man-boot/src/main/java/com/qianwen/smartman/modules/system/controller/GalleryController.java
index 33272d3..3c46a7e 100644
--- a/smart-man-boot/src/main/java/com/qianwen/smartman/modules/system/controller/GalleryController.java
+++ b/smart-man-boot/src/main/java/com/qianwen/smartman/modules/system/controller/GalleryController.java
@@ -1,19 +1,17 @@
package com.qianwen.smartman.modules.system.controller;
-import com.baomidou.mybatisplus.core.conditions.Wrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import java.lang.invoke.SerializedLambda;
import java.util.List;
import java.util.Map;
+
import javax.validation.Valid;
-import com.qianwen.smartman.common.cache.RegionCache;
-import com.qianwen.smartman.common.utils.Lambda;
+
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.qianwen.core.boot.ctrl.BladeController;
import com.qianwen.core.mp.support.Condition;
import com.qianwen.core.mp.support.Query;
@@ -24,6 +22,8 @@
import com.qianwen.core.scanner.modular.stereotype.ApiResource;
import com.qianwen.core.tool.api.R;
import com.qianwen.core.tool.utils.Func;
+import com.qianwen.smartman.common.cache.RegionCache;
+import com.qianwen.smartman.common.utils.Lambda;
import com.qianwen.smartman.modules.system.convert.GalleryConvert;
import com.qianwen.smartman.modules.system.convert.GalleryItemConvert;
import com.qianwen.smartman.modules.system.entity.Gallery;
@@ -32,55 +32,20 @@
import com.qianwen.smartman.modules.system.service.IGalleryService;
import com.qianwen.smartman.modules.system.vo.GalleryTreeVO;
import com.qianwen.smartman.modules.system.vo.GalleryVO;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
import springfox.documentation.annotations.ApiIgnore;
@Api(value = "鍥惧簱绠$悊", tags = {"鍥惧簱绠$悊"})
@ApiResource({"blade-system/gallery"})
@RestController
-/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/system/controller/GalleryController.class */
public class GalleryController extends BladeController {
private IGalleryService galleryService;
private IGalleryItemService galleryItemService;
-
- private static /* synthetic */ Object $deserializeLambda$(SerializedLambda lambda) {
- String implMethodName = lambda.getImplMethodName();
- boolean z = true;
- switch (implMethodName.hashCode()) {
- case 98245393:
- if (implMethodName.equals("getId")) {
- z = false;
- break;
- }
- break;
- case 309945687:
- if (implMethodName.equals("getGalleryId")) {
- z = true;
- 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/core/mp/base/BaseEntity") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) {
- return (v0) -> {
- return v0.getId();
- };
- }
- break;
- case true:
- 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/GalleryItem") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) {
- return (v0) -> {
- return v0.getGalleryId();
- };
- }
- break;
- }
- throw new IllegalArgumentException("Invalid lambda deserialization");
- }
public GalleryController(final IGalleryService galleryService, final IGalleryItemService galleryItemService) {
this.galleryService = galleryService;
@@ -112,11 +77,8 @@
List<Gallery> list = this.galleryService.list(Lambda.create());
List<GalleryTreeVO> treeVOS = GalleryConvert.INSTANCE.convertTree(list);
for (GalleryTreeVO tree : treeVOS) {
- List<GalleryItem> items = this.galleryItemService.list((Wrapper) Lambda.eq((v0) -> {
- return v0.getGalleryId();
- }, tree.getId()).limit(count).orderByDesc((v0) -> {
- return v0.getId();
- }));
+ List<GalleryItem> items = this.galleryItemService.list(Lambda.eq(GalleryItem::getGalleryId, tree.getId()).limit(count).orderByDesc(GalleryItem::getId));
+
tree.setChildren(GalleryItemConvert.INSTANCE.convert(items));
}
return R.data(treeVOS);
@@ -159,7 +121,7 @@
@ApiOperationSupport(order = 6)
@DeleteResource({"/remove"})
@ApiOperation(value = "鍥惧簱鍒犻櫎", notes = "浼犲叆ids")
- public R remove(@ApiParam(value = "涓婚敭", required = true) @RequestBody List<String> ids) {
+ public R<Void> remove(@ApiParam(value = "涓婚敭", required = true) @RequestBody List<String> ids) {
if (ids.isEmpty()) {
return R.status(false);
}
--
Gitblit v1.9.3