From e058a649d8f6c78afd8f73d157058d5106aa6925 Mon Sep 17 00:00:00 2001 From: luodangjia <luodangjia> Date: 星期一, 13 一月 2025 19:47:10 +0800 Subject: [PATCH] 12.18 --- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopBalanceStatementController.java | 26 ++++++++++++++++++++++++-- 1 files changed, 24 insertions(+), 2 deletions(-) diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopBalanceStatementController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopBalanceStatementController.java index c0d33fb..86a05d4 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopBalanceStatementController.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopBalanceStatementController.java @@ -1,7 +1,9 @@ package com.ruoyi.other.controller; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.common.core.domain.R; import com.ruoyi.common.core.utils.poi.ExcelUtil; @@ -13,6 +15,8 @@ import com.ruoyi.other.service.ShopBalanceStatementService; import com.ruoyi.other.service.ShopService; import com.ruoyi.other.vo.ShopCommissionStatisticsVO; +import com.ruoyi.system.api.domain.SysUser; +import com.ruoyi.system.api.feignClient.SysUserClient; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -21,6 +25,7 @@ import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; import java.math.BigDecimal; +import java.util.Collection; import java.util.List; import java.util.List; @@ -42,9 +47,10 @@ private TokenService tokenService; @Resource private ShopBalanceStatementMapper shopBalanceStatementMapper; - @Resource private ShopService shopService; + @Resource + private SysUserClient sysUserClient; @@ -66,7 +72,10 @@ public R<Page<ShopBalanceStatement>> shopCommissionStatisticslist(@ApiParam("页码") @RequestParam Integer pageNum, @ApiParam("每一页数据大小") Integer pageSize, ShopBalanceStatement shopBalanceStatement){ - Integer objectId = tokenService.getLoginUser().getSysUser().getObjectId(); + Long userid = tokenService.getLoginUser().getUserid(); + R<SysUser> sysUserR = sysUserClient.getSysUser(userid); + SysUser sysUser = sysUserR.getData(); + Integer objectId = sysUser.getObjectId(); Page<ShopBalanceStatement> page = shopBalanceStatementService.lambdaQuery().eq(ShopBalanceStatement::getShopId, objectId).eq(shopBalanceStatement.getType() != null, ShopBalanceStatement::getType, shopBalanceStatement.getType()) .orderByDesc(ShopBalanceStatement::getCreateTime) .page(Page.of(pageNum, pageSize)); @@ -148,5 +157,18 @@ shopBalanceStatementService.save(shopBalanceStatement); } + + /** + * 获取门店流水数据 + * @param types + * @param objectId + * @return + */ + @PostMapping("/getShopBalanceStatementList") + public R<List<ShopBalanceStatement>> getShopBalanceStatementList(@RequestParam("types") Collection<Integer> types, @RequestParam("objectId") Long objectId){ + List<ShopBalanceStatement> list = shopBalanceStatementService.list(new LambdaQueryWrapper<ShopBalanceStatement>().eq(ShopBalanceStatement::getObjectId, objectId) + .in(ShopBalanceStatement::getType, types)); + return R.ok(list); + } } -- Gitblit v1.7.1