From 36dd5e7edf18d0ab0e0d57ed960bdbd8aa770c40 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期一, 13 一月 2025 13:52:32 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java index db499ac..fb85e64 100644 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java +++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java @@ -438,11 +438,14 @@ public R<IPage<AppUser>> shopGetAppuserPage(@ApiParam("页码") @RequestParam Integer pageCurr, @ApiParam("每一页数据大小") Integer pageSize, AppUser appUser) { - Integer objectId = tokenService.getLoginUser().getSysUser().getObjectId(); + Long userid = tokenService.getLoginUser().getUserid(); + R<SysUser> sysUserR = sysUserClient.getSysUser(userid); + SysUser sysUser = sysUserR.getData(); List<Long> userIds = new ArrayList<>(); userIds.add(-1L); //获取在该本店下单的用户ids + Integer objectId = sysUser.getObjectId(); R<List<Order>> listR = remoteOrderGoodsClient.byShopId(objectId); for (Order datum : listR.getData()) { userIds.add(datum.getAppUserId()); @@ -585,6 +588,8 @@ if (!CollectionUtils.isEmpty(orderList)){ BigDecimal paymentAmount = orderList.stream().map(Order::getPaymentAmount).reduce(BigDecimal.ZERO, BigDecimal::add); byId.setShopAmount(paymentAmount); + }else { + byId.setShopAmount(BigDecimal.ZERO); } return R.ok(byId); } @@ -710,6 +715,7 @@ if(sysUser.getRoleType() == 2){ queryWrapper.eq(AppUser::getShopId, sysUser.getObjectId()); } + queryWrapper.orderByAsc(AppUser::getCreateTime); List<AppUser> appUserList = appUserService.list(queryWrapper); if (appUserList.isEmpty()) { return R.ok(new CommissionDetail()); @@ -718,7 +724,7 @@ BigDecimal totalServiceFee = BigDecimal.ZERO; BigDecimal totalUserCommission = BigDecimal.ZERO; Map<Integer, BigDecimal> vipCommissions = new HashMap<>(); - Map<String, Map<Integer, BigDecimal>> dailyVipCommissions = new HashMap<>(); + Map<String, Map<Integer, BigDecimal>> dailyVipCommissions = new TreeMap<>(); for (AppUser appUser : appUserList) { BigDecimal distributionAmount = Optional.ofNullable(appUser.getTotalDistributionAmount()).orElse(BigDecimal.ZERO); totalCommission = totalCommission.add(distributionAmount); -- Gitblit v1.7.1