From 3d6c34f45d76b78151d6586f93acca2943698b08 Mon Sep 17 00:00:00 2001
From: phpcjl <phpcjl@gmail.com>
Date: 星期一, 09 十二月 2024 10:56:42 +0800
Subject: [PATCH] 1.
---
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/BannerController.java | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/BannerController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/BannerController.java
index 4f31a82..21573c3 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/BannerController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/BannerController.java
@@ -8,7 +8,6 @@
import com.ruoyi.other.service.BannerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
-import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -24,16 +23,16 @@
*/
@RestController
@RequestMapping("/banner")
-@Api("轮播图")
+@Api(tags = "轮播图")
public class BannerController {
@Resource
private BannerService bannerService;
- @PostMapping("/index/list")
- @ApiOperation(value = "banner列表", tags = {"小程序-首页"})
+ @GetMapping("/list")
+ @ApiOperation(value = "banner列表", tags = {"小程序-banner"})
public R<List<Banner>> list(String name, Integer jumpType, Integer position){
List<Banner> list = bannerService.lambdaQuery().like(StringUtils.isNotEmpty(name), Banner::getName, name)
- .eq(Banner::getJumpType, jumpType)
- .eq(Banner::getPosition, position)
+ .eq(jumpType!=null,Banner::getJumpType, jumpType)
+ .eq(position!=null,Banner::getPosition, position)
.list();
return R.ok(list);
}
--
Gitblit v1.7.1