邀请人列表

This commit is contained in:
2025-10-28 17:49:27 +08:00
parent 618286703e
commit faac76cc33
9 changed files with 31 additions and 39 deletions

View File

@@ -70,5 +70,5 @@ public interface ShopUserMapper extends BaseMapper<ShopUser> {
* @param distributionUserId 分销员ID
* @return 分页结果
*/
List<InviteUserVO> getInviteUser(Long distributionUserId);
List<InviteUserVO> getInviteUser(Long distributionUserId, Long shopUserId);
}

View File

@@ -18,7 +18,6 @@ import com.czg.market.service.TbMemberConfigService;
import com.czg.market.vo.InviteUserVO;
import com.czg.market.vo.MemberConfigVO;
import com.czg.service.account.mapper.ShopUserMapper;
import com.czg.utils.MyQueryWrapper;
import com.czg.utils.PageUtil;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
@@ -100,9 +99,9 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
}
@Override
public Page<InviteUserVO> getInviteUser(Long distributionUserId, Integer page, Integer size) {
public Page<InviteUserVO> getInviteUser(Long distributionUserId, Long shopUserId, Integer page, Integer size) {
PageHelper.startPage(page, size);
List<InviteUserVO> inviteUser = mapper.getInviteUser(distributionUserId);
List<InviteUserVO> inviteUser = mapper.getInviteUser(distributionUserId, shopUserId);
return PageUtil.convert(new PageInfo<>(inviteUser));
}

View File

@@ -263,17 +263,18 @@
order by u.create_time desc
</select>
<select id="getInviteUser" resultType="com.czg.market.vo.InviteUserVO">
SELECT user.head_img AS headImg,
user.nick_name AS shopUserName,
user.phone AS shopUserPhone,
user.one_income AS oneIncome,
user.invite_time AS inviteTime,
dist.distribution_level_id AS levelId,
dist.distribution_level_name AS levelName,
SELECT user.head_img AS headImg,
user.nick_name AS shopUserName,
user.phone AS shopUserPhone,
user.one_income AS oneIncome,
user.invite_time AS inviteTime,
dist.distribution_level_id AS levelId,
dist.distribution_level_name AS levelName,
CASE WHEN dist.id IS NOT NULL THEN 1 ELSE 0 END AS isDistribution
FROM `tb_shop_user` user
left join mk_distribution_user dist on user.id = dist.id
WHERE user.`distribution_user_id` = #{distributionUserId}
<if test="shopUserId != null">and user.id = #{shopUserId}</if>
ORDER BY `create_time` DESC
</select>
</mapper>