From 1faf6cccbb580a9e50d668e5b0f5c92fe431ee6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=9D=BE?= <8605635+zhang3064194730@user.noreply.gitee.com> Date: Tue, 28 Oct 2025 14:04:10 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=88=86=E9=94=80=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../account/service/impl/UserInfoServiceImpl.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cash-service/account-service/src/main/java/com/czg/service/account/service/impl/UserInfoServiceImpl.java b/cash-service/account-service/src/main/java/com/czg/service/account/service/impl/UserInfoServiceImpl.java index 832eb3c5c..3867b605d 100644 --- a/cash-service/account-service/src/main/java/com/czg/service/account/service/impl/UserInfoServiceImpl.java +++ b/cash-service/account-service/src/main/java/com/czg/service/account/service/impl/UserInfoServiceImpl.java @@ -13,6 +13,7 @@ import com.czg.account.entity.UserInfo; import com.czg.account.service.UserInfoService; import com.czg.config.RedisCst; import com.czg.exception.ApiNotPrintException; +import com.czg.exception.CzgException; import com.czg.service.RedisService; import com.czg.service.account.mapper.ShopUserMapper; import com.czg.service.account.mapper.UserInfoMapper; @@ -98,4 +99,12 @@ public class UserInfoServiceImpl extends ServiceImpl i } return b; } + + @Override + public void updateDistributionAmount(long userId, BigDecimal amount) { + boolean b = mapper.updateAmount(userId, amount); + if (!b) { + throw new CzgException("更新分销金额失败"); + } + } } From 708f9399178d0b7b23bb871d971432603b4fac37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=9D=BE?= <8605635+zhang3064194730@user.noreply.gitee.com> Date: Tue, 28 Oct 2025 14:05:34 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=88=86=E9=94=80=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/czg/controller/admin/DistributionController.java | 2 +- .../czg/market/service/MkDistributionWithdrawFlowService.java | 2 +- .../service/impl/MkDistributionWithdrawFlowServiceImpl.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cash-api/market-server/src/main/java/com/czg/controller/admin/DistributionController.java b/cash-api/market-server/src/main/java/com/czg/controller/admin/DistributionController.java index 00450d125..19e004582 100644 --- a/cash-api/market-server/src/main/java/com/czg/controller/admin/DistributionController.java +++ b/cash-api/market-server/src/main/java/com/czg/controller/admin/DistributionController.java @@ -123,7 +123,7 @@ public class DistributionController { @GetMapping("/withdrawFlow") public CzgResult> withdrawPageInfo(@RequestParam(required = false) Long userId, @RequestParam(required = false) String key, @RequestParam(required = false) String startTime, @RequestParam(required = false) String endTime) { - return CzgResult.success(withdrawFlowService.withdrawPageInfo(StpKit.USER.getShopId(), userId, StrUtil.isBlank(startTime) ? null : DateUtil.parseLocalDateTime(startTime), + return CzgResult.success(withdrawFlowService.withdrawPageInfo(userId, StrUtil.isBlank(startTime) ? null : DateUtil.parseLocalDateTime(startTime), StrUtil.isBlank(endTime) ? null : DateUtil.parseLocalDateTime(endTime), key)); } diff --git a/cash-common/cash-common-service/src/main/java/com/czg/market/service/MkDistributionWithdrawFlowService.java b/cash-common/cash-common-service/src/main/java/com/czg/market/service/MkDistributionWithdrawFlowService.java index 5bfefcece..38899d57c 100644 --- a/cash-common/cash-common-service/src/main/java/com/czg/market/service/MkDistributionWithdrawFlowService.java +++ b/cash-common/cash-common-service/src/main/java/com/czg/market/service/MkDistributionWithdrawFlowService.java @@ -16,5 +16,5 @@ public interface MkDistributionWithdrawFlowService extends IService pageInfo(long userId); - Page withdrawPageInfo(Long shopId, Long userId, LocalDateTime startTime, LocalDateTime endTime, String key); + Page withdrawPageInfo(Long userId, LocalDateTime startTime, LocalDateTime endTime, String key); } diff --git a/cash-service/market-service/src/main/java/com/czg/service/market/service/impl/MkDistributionWithdrawFlowServiceImpl.java b/cash-service/market-service/src/main/java/com/czg/service/market/service/impl/MkDistributionWithdrawFlowServiceImpl.java index e3a05cbd3..1532fc018 100644 --- a/cash-service/market-service/src/main/java/com/czg/service/market/service/impl/MkDistributionWithdrawFlowServiceImpl.java +++ b/cash-service/market-service/src/main/java/com/czg/service/market/service/impl/MkDistributionWithdrawFlowServiceImpl.java @@ -34,12 +34,12 @@ public class MkDistributionWithdrawFlowServiceImpl extends ServiceImpl withdrawPageInfo(Long shopId, Long userId, LocalDateTime startTime, LocalDateTime endTime, String key) { + public Page withdrawPageInfo(Long userId, LocalDateTime startTime, LocalDateTime endTime, String key) { QueryWrapper queryWrapper = new MyQueryWrapper() .selectAll(MkDistributionWithdrawFlow.class) .leftJoin(UserInfo.class).on(UserInfo::getId, MkDistributionWithdrawFlow::getUserId) .select(UserInfo::getNickName, UserInfo::getPhone) - .eq(MkDistributionWithdrawFlow::getShopId, shopId).eq(MkDistributionWithdrawFlow::getUserId, userId) + .eq(MkDistributionWithdrawFlow::getUserId, userId) .ge(MkDistributionWithdrawFlow::getCreateTime, startTime) .le(MkDistributionWithdrawFlow::getCreateTime, endTime); if (StrUtil.isNotBlank(key)){ From 727beadca38d6753f755cb9cb6074828560f4c2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=9D=BE?= <8605635+zhang3064194730@user.noreply.gitee.com> Date: Tue, 28 Oct 2025 14:09:15 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=88=86=E9=94=80=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/czg/controller/admin/DistributionController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cash-api/market-server/src/main/java/com/czg/controller/admin/DistributionController.java b/cash-api/market-server/src/main/java/com/czg/controller/admin/DistributionController.java index 19e004582..d51d99428 100644 --- a/cash-api/market-server/src/main/java/com/czg/controller/admin/DistributionController.java +++ b/cash-api/market-server/src/main/java/com/czg/controller/admin/DistributionController.java @@ -80,8 +80,8 @@ public class DistributionController { * @param key 搜索 */ @GetMapping("/flow") - public CzgResult> flow(@RequestParam(required = false) String type, @RequestParam(required = false) String key) { - return CzgResult.success(distributionAmountFlowService.pageInfo(StpKit.USER.getShopId(), type, key)); + public CzgResult> flow(@RequestParam(required = false) Long shopId, @RequestParam(required = false) String type, @RequestParam(required = false) String key) { + return CzgResult.success(distributionAmountFlowService.pageInfo(StpKit.USER.isAdmin() ? shopId : StpKit.USER.getShopId(), type, key)); } /**