From d51a8cfa10c34d9c1e7d6b4726d31e75ecee5dc6 Mon Sep 17 00:00:00 2001 From: phpcjl <phpcjl@gmail.com> Date: 星期五, 20 十二月 2024 18:32:03 +0800 Subject: [PATCH] 1 --- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopPointController.java | 18 +++++++++++++----- 1 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopPointController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopPointController.java index ac28712..084043b 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopPointController.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopPointController.java @@ -4,11 +4,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.common.core.domain.R; -import com.ruoyi.common.core.utils.bean.BeanUtils; import com.ruoyi.common.core.utils.poi.ExcelUtil; import com.ruoyi.common.security.service.TokenService; import com.ruoyi.other.api.domain.ShopPoint; -import com.ruoyi.other.excel.ShopPointEX; import com.ruoyi.other.service.ShopPointService; import com.ruoyi.other.vo.ShopPointStatistics; import io.swagger.annotations.Api; @@ -19,8 +17,6 @@ import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; -import java.util.ArrayList; -import java.util.List; /** * <p> @@ -62,10 +58,22 @@ @ApiOperation(value = "门店积分统计列表", notes = "门店积分统计", tags = {"门店后台"}) public R<Page<ShopPoint>> shopstatisticslist(ShopPoint shopPoint,Integer pageNum,Integer pageSize) { Integer objectId = tokenService.getLoginUser().getSysUser().getObjectId(); - Page<ShopPoint> page = shopPointService.lambdaQuery().eq(ShopPoint::getShopId, objectId).eq(ShopPoint::getType, shopPoint.getType()) + Page<ShopPoint> page = shopPointService.lambdaQuery().eq(ShopPoint::getShopId, objectId).eq(shopPoint.getType()!=null,ShopPoint::getType, shopPoint.getType()) + .like(shopPoint.getOrderNum()!=null,ShopPoint::getOrderNum, shopPoint.getOrderNum()) + .orderByDesc(ShopPoint::getCreateTime) .page(Page.of(pageNum, pageSize)); return R.ok(page); } + @GetMapping("/statistics/list") + @ApiOperation(value = "门店积分明细必传门店id", tags = {"后台"}) + public R<Page<ShopPoint>> statisticslist(ShopPoint shopPoint,Integer pageNum,Integer pageSize) { + Page<ShopPoint> page = shopPointService.lambdaQuery().eq(ShopPoint::getShopId, shopPoint.getShopId()).eq(shopPoint.getType()!=null,ShopPoint::getType, shopPoint.getType()) + .like(shopPoint.getOrderNum()!=null,ShopPoint::getOrderNum, shopPoint.getOrderNum()) + .orderByDesc(ShopPoint::getCreateTime) + .page(Page.of(pageNum, pageSize)); + return R.ok(page); + } + /** * 导出门店积分统计 -- Gitblit v1.7.1