邀请人分页列表

This commit is contained in:
2025-11-06 15:41:04 +08:00
parent e8e788cff4
commit 874ca79ef8
8 changed files with 14 additions and 12 deletions

View File

@@ -48,7 +48,8 @@ public class DistributionUserController {
@RequestParam(required = false, defaultValue = "1") Integer page, @RequestParam(required = false, defaultValue = "1") Integer page,
@RequestParam(required = false, defaultValue = "10") Integer size) { @RequestParam(required = false, defaultValue = "10") Integer size) {
AssertUtil.isNull(id, "邀请人ID"); 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));
} }
/** /**

View File

@@ -119,10 +119,11 @@ public class UDistributionController {
@GetMapping("/inviteUser") @GetMapping("/inviteUser")
public CzgResult<Page<InviteUserVO>> getInviteUser( public CzgResult<Page<InviteUserVO>> getInviteUser(
@RequestParam Long id, @RequestParam Long id,
@RequestParam Long shopId,
@RequestParam(required = false, defaultValue = "1") Integer page, @RequestParam(required = false, defaultValue = "1") Integer page,
@RequestParam(required = false, defaultValue = "10") Integer size) { @RequestParam(required = false, defaultValue = "10") Integer size) {
AssertUtil.isNull(id, "邀请人ID"); 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));
} }
/** /**

View File

@@ -29,7 +29,7 @@ public interface ShopUserService extends IService<ShopUser> {
/** /**
* 获取邀请用户列表 * 获取邀请用户列表
*/ */
Page<InviteUserVO> getInviteUser(Long getDistributionUserId, Long shopUserId, Long distributionLevelId, Integer page, Integer size); Page<InviteUserVO> getInviteUser(Long getDistributionUserId, Long shopId, Long shopUserId, Long distributionLevelId, Integer page, Integer size);
boolean updateInfo(ShopUser shopUser); boolean updateInfo(ShopUser shopUser);

View File

@@ -67,7 +67,7 @@ public interface MkDistributionUserService extends IService<MkDistributionUser>
/** /**
* 获取分销员邀请人分页列表 * 获取分销员邀请人分页列表
*/ */
Page<InviteUserVO> getInviteUser(Long id, Long shopUserId, Long distributionLevelId, Integer page, Integer size); Page<InviteUserVO> getInviteUser(Long id, Long shopId, Long shopUserId, Long distributionLevelId, Integer page, Integer size);
/** /**
* 分销员:按消费金额升级等级 * 分销员:按消费金额升级等级

View File

@@ -70,7 +70,7 @@ public interface ShopUserMapper extends BaseMapper<ShopUser> {
* @param distributionUserId 分销员ID * @param distributionUserId 分销员ID
* @return 分页结果 * @return 分页结果
*/ */
List<InviteUserVO> getInviteUser(Long distributionUserId, Long shopUserId, Long distributionLevelId); List<InviteUserVO> getInviteUser(Long distributionUserId, Long shopId, Long shopUserId, Long distributionLevelId);
void updateOneOrTwoAmount(Long shopUserId, Long shopId, BigDecimal amount, Integer isOne); void updateOneOrTwoAmount(Long shopUserId, Long shopId, BigDecimal amount, Integer isOne);

View File

@@ -99,9 +99,9 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
} }
@Override @Override
public Page<InviteUserVO> getInviteUser(Long distributionUserId, Long shopUserId, Long distributionLevelId, Integer page, Integer size) { public Page<InviteUserVO> getInviteUser(Long distributionUserId, Long shopId, Long shopUserId, Long distributionLevelId, Integer page, Integer size) {
PageHelper.startPage(page, size); PageHelper.startPage(page, size);
List<InviteUserVO> inviteUser = mapper.getInviteUser(distributionUserId, shopUserId, distributionLevelId); List<InviteUserVO> inviteUser = mapper.getInviteUser(distributionUserId, shopId, shopUserId, distributionLevelId);
return PageUtil.convert(new PageInfo<>(inviteUser)); return PageUtil.convert(new PageInfo<>(inviteUser));
} }

View File

@@ -292,9 +292,9 @@
dist.distribution_level_name AS levelName, dist.distribution_level_name AS levelName,
u.distribution_shops AS distributionShops u.distribution_shops AS distributionShops
FROM tb_shop_user_invite invite FROM tb_shop_user_invite invite
left join tb_shop_user u on invite.shop_user_id = u.id left join tb_shop_user u on invite.shop_user_id = u.id
left join mk_distribution_user dist on u.id = dist.id left join mk_distribution_user dist on u.id = dist.id
WHERE invite.`distribution_user_id` = #{distributionUserId} WHERE invite.`distribution_user_id` = #{distributionUserId} and invite.shop_id = #{shopId}
<if test="distributionLevelId != null">and dist.distribution_level_id = #{distributionLevelId}</if> <if test="distributionLevelId != null">and dist.distribution_level_id = #{distributionLevelId}</if>
<if test="shopUserId != null">and invite.shop_user_id = #{shopUserId}</if> <if test="shopUserId != null">and invite.shop_user_id = #{shopUserId}</if>
ORDER BY invite.`invite_time` DESC ORDER BY invite.`invite_time` DESC

View File

@@ -401,8 +401,8 @@ public class MkDistributionUserServiceImpl extends ServiceImpl<MkDistributionUse
} }
@Override @Override
public Page<InviteUserVO> getInviteUser(Long id, Long shopUserId, Long distributionLevelId, Integer page, Integer size) { public Page<InviteUserVO> getInviteUser(Long id, Long shopId, Long shopUserId, Long distributionLevelId, Integer page, Integer size) {
return shopUserService.getInviteUser(id, shopUserId, distributionLevelId, page, size); return shopUserService.getInviteUser(id, shopId, shopUserId, distributionLevelId, page, size);
} }
@Override @Override