From d7b3c61e01aadf99ce6a1d8ebf18c4e6dd81cc2b Mon Sep 17 00:00:00 2001 From: luodangjia <luodangjia> Date: 星期四, 12 十二月 2024 18:05:34 +0800 Subject: [PATCH] 12.12 --- 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