From 630d5398d5a5b00c56537f1bc175d5e3ff6b70ae Mon Sep 17 00:00:00 2001 From: luofl <1442745593@qq.com> Date: 星期二, 25 二月 2025 11:56:13 +0800 Subject: [PATCH] 修改物流信息导入模板 --- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopBalanceStatementController.java | 49 +++++++++++++++++++++++++++++++++++-------------- 1 files changed, 35 insertions(+), 14 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 e8d1e6e..c4c7fed 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 @@ -10,7 +10,9 @@ import com.ruoyi.common.security.service.TokenService; import com.ruoyi.other.api.domain.Shop; import com.ruoyi.other.api.domain.ShopBalanceStatement; +import com.ruoyi.other.api.domain.ShopBalanceStatementCopy; import com.ruoyi.other.dto.ShopBalanceDto; +import com.ruoyi.other.mapper.ShopBalanceStatementCopyMapper; import com.ruoyi.other.mapper.ShopBalanceStatementMapper; import com.ruoyi.other.service.ShopBalanceStatementService; import com.ruoyi.other.service.ShopService; @@ -53,6 +55,8 @@ private ShopService shopService; @Resource private SysUserClient sysUserClient; + @Resource + private ShopBalanceStatementCopyMapper shopBalanceStatementCopyMapper; @@ -68,6 +72,17 @@ ShopBalanceStatement shopBalanceStatement){ ShopCommissionStatisticsVO shopCommissionStatisticsVO = shopBalanceStatementService.shopCommissionStatistics(Page.of(pageNum, pageSize), shopBalanceStatement); return R.ok(shopCommissionStatisticsVO); + } + /** + * 导出门店分佣统计 + */ + @GetMapping("/export") + @ApiOperation("导出门店分佣统计") + public void export(HttpServletResponse response , ShopBalanceStatement shopBalanceStatement){ + ShopCommissionStatisticsVO shopCommissionStatisticsVO = shopBalanceStatementService.shopCommissionStatistics(Page.of(1, Integer.MAX_VALUE), shopBalanceStatement); + IPage<ShopBalanceStatement> statementIPage = shopCommissionStatisticsVO.getStatementIPage(); + ExcelUtil<ShopBalanceStatement> util = new ExcelUtil<>(ShopBalanceStatement.class); + util.exportExcel(response, statementIPage.getRecords(), "用户积分统计"); } @GetMapping("/commissionStatistics/list") @ApiOperation(value = "门店余额明细", notes = "门店余额明细", tags = {"门店后台"}) @@ -171,17 +186,7 @@ } - /** - * 导出门店分佣统计 - */ - @GetMapping("/export") - @ApiOperation("导出门店分佣统计") - public void export(HttpServletResponse response , ShopBalanceStatement shopBalanceStatement){ - ShopCommissionStatisticsVO shopCommissionStatisticsVO = shopBalanceStatementService.shopCommissionStatistics(Page.of(1, Integer.MAX_VALUE), shopBalanceStatement); - IPage<ShopBalanceStatement> statementIPage = shopCommissionStatisticsVO.getStatementIPage(); - ExcelUtil<ShopBalanceStatement> util = new ExcelUtil<>(ShopBalanceStatement.class); - util.exportExcel(response, statementIPage.getRecords(), "用户积分统计"); - } + @@ -200,6 +205,18 @@ shopBalanceStatementService.save(shopBalanceStatement); } + @PostMapping("/saveShopBalanceStatementCopy") + public void saveShopBalanceStatementCopy(@RequestBody ShopBalanceStatementCopy shopBalanceStatementCopy){ + shopBalanceStatementCopyMapper.insert(shopBalanceStatementCopy); + } + + @DeleteMapping("/deleteShopBalanceStatementCopy") + public R<Boolean> deleteShopBalanceStatementCopy(@RequestParam("orderId") Long orderId){ + shopBalanceStatementCopyMapper.delete(new LambdaQueryWrapper<ShopBalanceStatementCopy>() + .eq(ShopBalanceStatementCopy::getObjectId, orderId)); + return R.ok(); + } + /** * 获取门店流水数据 @@ -216,11 +233,15 @@ } @PostMapping("/getShopBalanceStatementList2") - public R<List<ShopBalanceStatement>> getShopBalanceStatementList2(@RequestParam("type") Integer type, + public R<List<ShopBalanceStatement>> getShopBalanceStatementList2(@RequestParam("type") Integer type, @RequestParam(value = "shopId") Integer shopId, @RequestParam(value = "date") LocalDateTime date){ - List<ShopBalanceStatement> list = shopBalanceStatementService.list(new LambdaQueryWrapper<ShopBalanceStatement>() + LambdaQueryWrapper<ShopBalanceStatement> queryWrapper = new LambdaQueryWrapper<ShopBalanceStatement>() .eq(ShopBalanceStatement::getType, type) - .between(ShopBalanceStatement::getCreateTime, date.with(LocalTime.MIN), date.with(LocalTime.MAX))); + .between(ShopBalanceStatement::getCreateTime, date.with(LocalTime.MIN), date.with(LocalTime.MAX)); + if(null != shopId && 0 != shopId){ + queryWrapper.eq(ShopBalanceStatement::getShopId, shopId); + } + List<ShopBalanceStatement> list = shopBalanceStatementService.list(queryWrapper); return R.ok(list); } } -- Gitblit v1.7.1