From b044d9fbf64ebf7e7beae0b7c49e5f39c6ac620c Mon Sep 17 00:00:00 2001 From: luodangjia <luodangjia> Date: 星期一, 09 十二月 2024 15:30:59 +0800 Subject: [PATCH] 12.9 --- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/BannerController.java | 5 ++--- 1 files changed, 2 insertions(+), 3 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 5fe3a69..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; @@ -32,8 +31,8 @@ @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