邀请人分页列表
This commit is contained in:
parent
e8e788cff4
commit
874ca79ef8
|
|
@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -119,10 +119,11 @@ public class UDistributionController {
|
|||
@GetMapping("/inviteUser")
|
||||
public CzgResult<Page<InviteUserVO>> 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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
/**
|
||||
* 分销员:按消费金额升级等级
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ public interface ShopUserMapper extends BaseMapper<ShopUser> {
|
|||
* @param distributionUserId 分销员ID
|
||||
* @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);
|
||||
|
||||
|
|
|
|||
|
|
@ -99,9 +99,9 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
|
|||
}
|
||||
|
||||
@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);
|
||||
List<InviteUserVO> inviteUser = mapper.getInviteUser(distributionUserId, shopUserId, distributionLevelId);
|
||||
List<InviteUserVO> inviteUser = mapper.getInviteUser(distributionUserId, shopId, shopUserId, distributionLevelId);
|
||||
return PageUtil.convert(new PageInfo<>(inviteUser));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
<if test="distributionLevelId != null">and dist.distribution_level_id = #{distributionLevelId}</if>
|
||||
<if test="shopUserId != null">and invite.shop_user_id = #{shopUserId}</if>
|
||||
ORDER BY invite.`invite_time` DESC
|
||||
|
|
|
|||
|
|
@ -401,8 +401,8 @@ public class MkDistributionUserServiceImpl extends ServiceImpl<MkDistributionUse
|
|||
}
|
||||
|
||||
@Override
|
||||
public Page<InviteUserVO> getInviteUser(Long id, Long shopUserId, Long distributionLevelId, Integer page, Integer size) {
|
||||
return shopUserService.getInviteUser(id, shopUserId, distributionLevelId, page, size);
|
||||
public Page<InviteUserVO> getInviteUser(Long id, Long shopId, Long shopUserId, Long distributionLevelId, Integer page, Integer size) {
|
||||
return shopUserService.getInviteUser(id, shopId, shopUserId, distributionLevelId, page, size);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Reference in New Issue