From 874ca79ef821b22fc438e20ae1f5788a68e9afff Mon Sep 17 00:00:00 2001 From: wangw <1594593906@qq.com> Date: Thu, 6 Nov 2025 15:41:04 +0800 Subject: [PATCH] =?UTF-8?q?=E9=82=80=E8=AF=B7=E4=BA=BA=E5=88=86=E9=A1=B5?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../czg/controller/admin/DistributionUserController.java | 3 ++- .../com/czg/controller/user/UDistributionController.java | 3 ++- .../main/java/com/czg/account/service/ShopUserService.java | 2 +- .../com/czg/market/service/MkDistributionUserService.java | 2 +- .../java/com/czg/service/account/mapper/ShopUserMapper.java | 2 +- .../service/account/service/impl/ShopUserServiceImpl.java | 4 ++-- .../src/main/resources/mapper/ShopUserMapper.xml | 6 +++--- .../market/service/impl/MkDistributionUserServiceImpl.java | 4 ++-- 8 files changed, 14 insertions(+), 12 deletions(-) diff --git a/cash-api/market-server/src/main/java/com/czg/controller/admin/DistributionUserController.java b/cash-api/market-server/src/main/java/com/czg/controller/admin/DistributionUserController.java index 189692b8..da276e8a 100644 --- a/cash-api/market-server/src/main/java/com/czg/controller/admin/DistributionUserController.java +++ b/cash-api/market-server/src/main/java/com/czg/controller/admin/DistributionUserController.java @@ -48,7 +48,8 @@ public class DistributionUserController { @RequestParam(required = false, defaultValue = "1") Integer page, @RequestParam(required = false, defaultValue = "10") Integer size) { AssertUtil.isNull(id, "邀请人ID"); - return CzgResult.success(distributionUserService.getInviteUser(id, shopUserId, distributionLevelId, page, size)); + Long shopId = StpKit.USER.getShopId(); + return CzgResult.success(distributionUserService.getInviteUser(id,shopId, shopUserId, distributionLevelId, page, size)); } /** diff --git a/cash-api/market-server/src/main/java/com/czg/controller/user/UDistributionController.java b/cash-api/market-server/src/main/java/com/czg/controller/user/UDistributionController.java index d4247892..46943835 100644 --- a/cash-api/market-server/src/main/java/com/czg/controller/user/UDistributionController.java +++ b/cash-api/market-server/src/main/java/com/czg/controller/user/UDistributionController.java @@ -119,10 +119,11 @@ public class UDistributionController { @GetMapping("/inviteUser") public CzgResult> getInviteUser( @RequestParam Long id, + @RequestParam Long shopId, @RequestParam(required = false, defaultValue = "1") Integer page, @RequestParam(required = false, defaultValue = "10") Integer size) { AssertUtil.isNull(id, "邀请人ID"); - return CzgResult.success(distributionUserService.getInviteUser(id, null, null, page, size)); + return CzgResult.success(distributionUserService.getInviteUser(id, shopId, null, null, page, size)); } /** diff --git a/cash-common/cash-common-service/src/main/java/com/czg/account/service/ShopUserService.java b/cash-common/cash-common-service/src/main/java/com/czg/account/service/ShopUserService.java index 72397348..245e1e44 100644 --- a/cash-common/cash-common-service/src/main/java/com/czg/account/service/ShopUserService.java +++ b/cash-common/cash-common-service/src/main/java/com/czg/account/service/ShopUserService.java @@ -29,7 +29,7 @@ public interface ShopUserService extends IService { /** * 获取邀请用户列表 */ - Page getInviteUser(Long getDistributionUserId, Long shopUserId, Long distributionLevelId, Integer page, Integer size); + Page getInviteUser(Long getDistributionUserId, Long shopId, Long shopUserId, Long distributionLevelId, Integer page, Integer size); boolean updateInfo(ShopUser shopUser); diff --git a/cash-common/cash-common-service/src/main/java/com/czg/market/service/MkDistributionUserService.java b/cash-common/cash-common-service/src/main/java/com/czg/market/service/MkDistributionUserService.java index 3e5c4d29..0cbeeeb2 100644 --- a/cash-common/cash-common-service/src/main/java/com/czg/market/service/MkDistributionUserService.java +++ b/cash-common/cash-common-service/src/main/java/com/czg/market/service/MkDistributionUserService.java @@ -67,7 +67,7 @@ public interface MkDistributionUserService extends IService /** * 获取分销员邀请人分页列表 */ - Page getInviteUser(Long id, Long shopUserId, Long distributionLevelId, Integer page, Integer size); + Page getInviteUser(Long id, Long shopId, Long shopUserId, Long distributionLevelId, Integer page, Integer size); /** * 分销员:按消费金额升级等级 diff --git a/cash-service/account-service/src/main/java/com/czg/service/account/mapper/ShopUserMapper.java b/cash-service/account-service/src/main/java/com/czg/service/account/mapper/ShopUserMapper.java index 8127a45c..f82051b3 100644 --- a/cash-service/account-service/src/main/java/com/czg/service/account/mapper/ShopUserMapper.java +++ b/cash-service/account-service/src/main/java/com/czg/service/account/mapper/ShopUserMapper.java @@ -70,7 +70,7 @@ public interface ShopUserMapper extends BaseMapper { * @param distributionUserId 分销员ID * @return 分页结果 */ - List getInviteUser(Long distributionUserId, Long shopUserId, Long distributionLevelId); + List getInviteUser(Long distributionUserId, Long shopId, Long shopUserId, Long distributionLevelId); void updateOneOrTwoAmount(Long shopUserId, Long shopId, BigDecimal amount, Integer isOne); diff --git a/cash-service/account-service/src/main/java/com/czg/service/account/service/impl/ShopUserServiceImpl.java b/cash-service/account-service/src/main/java/com/czg/service/account/service/impl/ShopUserServiceImpl.java index 14ee0c00..c9a1da3a 100644 --- a/cash-service/account-service/src/main/java/com/czg/service/account/service/impl/ShopUserServiceImpl.java +++ b/cash-service/account-service/src/main/java/com/czg/service/account/service/impl/ShopUserServiceImpl.java @@ -99,9 +99,9 @@ public class ShopUserServiceImpl extends ServiceImpl i } @Override - public Page getInviteUser(Long distributionUserId, Long shopUserId, Long distributionLevelId, Integer page, Integer size) { + public Page getInviteUser(Long distributionUserId, Long shopId, Long shopUserId, Long distributionLevelId, Integer page, Integer size) { PageHelper.startPage(page, size); - List inviteUser = mapper.getInviteUser(distributionUserId, shopUserId, distributionLevelId); + List inviteUser = mapper.getInviteUser(distributionUserId, shopId, shopUserId, distributionLevelId); return PageUtil.convert(new PageInfo<>(inviteUser)); } diff --git a/cash-service/account-service/src/main/resources/mapper/ShopUserMapper.xml b/cash-service/account-service/src/main/resources/mapper/ShopUserMapper.xml index b93d7222..d2b05527 100644 --- a/cash-service/account-service/src/main/resources/mapper/ShopUserMapper.xml +++ b/cash-service/account-service/src/main/resources/mapper/ShopUserMapper.xml @@ -292,9 +292,9 @@ dist.distribution_level_name AS levelName, u.distribution_shops AS distributionShops FROM tb_shop_user_invite invite - left join tb_shop_user u on invite.shop_user_id = u.id - left join mk_distribution_user dist on u.id = dist.id - WHERE invite.`distribution_user_id` = #{distributionUserId} + left join tb_shop_user u on invite.shop_user_id = u.id + left join mk_distribution_user dist on u.id = dist.id + WHERE invite.`distribution_user_id` = #{distributionUserId} and invite.shop_id = #{shopId} and dist.distribution_level_id = #{distributionLevelId} and invite.shop_user_id = #{shopUserId} ORDER BY invite.`invite_time` DESC diff --git a/cash-service/market-service/src/main/java/com/czg/service/market/service/impl/MkDistributionUserServiceImpl.java b/cash-service/market-service/src/main/java/com/czg/service/market/service/impl/MkDistributionUserServiceImpl.java index ad8f2dc5..c0a595d8 100644 --- a/cash-service/market-service/src/main/java/com/czg/service/market/service/impl/MkDistributionUserServiceImpl.java +++ b/cash-service/market-service/src/main/java/com/czg/service/market/service/impl/MkDistributionUserServiceImpl.java @@ -401,8 +401,8 @@ public class MkDistributionUserServiceImpl extends ServiceImpl getInviteUser(Long id, Long shopUserId, Long distributionLevelId, Integer page, Integer size) { - return shopUserService.getInviteUser(id, shopUserId, distributionLevelId, page, size); + public Page getInviteUser(Long id, Long shopId, Long shopUserId, Long distributionLevelId, Integer page, Integer size) { + return shopUserService.getInviteUser(id, shopId, shopUserId, distributionLevelId, page, size); } @Override