邀请人列表
This commit is contained in:
@@ -6,6 +6,7 @@ import com.czg.account.dto.shopuser.ShopUserVipCardDTO;
|
||||
import com.czg.account.dto.user.userinfo.UserInfoAssetsSummaryDTO;
|
||||
import com.czg.account.entity.ShopUser;
|
||||
import com.czg.market.entity.SmsPushEventUser;
|
||||
import com.czg.market.vo.InviteUserVO;
|
||||
import com.mybatisflex.core.BaseMapper;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -62,4 +63,12 @@ public interface ShopUserMapper extends BaseMapper<ShopUser> {
|
||||
@Param("param") SmsPushEventUser smsPushEventUser
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* 查询邀请用户
|
||||
*
|
||||
* @param distributionUserId 分销员ID
|
||||
* @return 分页结果
|
||||
*/
|
||||
List<InviteUserVO> getInviteUser(Long distributionUserId);
|
||||
}
|
||||
|
||||
@@ -100,12 +100,10 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<InviteUserVO> getInviteUser(Long getDistributionUserId, Integer page, Integer size) {
|
||||
Page<InviteUserVO> pages = pageAs(new Page<>(page, size),QueryWrapper.create()
|
||||
.select("head_img as headImg,nick_name as shopUserName,phone as shopUserPhone,one_income as oneIncome")
|
||||
.eq(ShopUser::getDistributionUserId, getDistributionUserId)
|
||||
.orderBy(ShopUser::getCreateTime).desc(), InviteUserVO.class);
|
||||
return pages;
|
||||
public Page<InviteUserVO> getInviteUser(Long distributionUserId, Integer page, Integer size) {
|
||||
PageHelper.startPage(page, size);
|
||||
List<InviteUserVO> inviteUser = mapper.getInviteUser(distributionUserId);
|
||||
return PageUtil.convert(new PageInfo<>(inviteUser));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -262,4 +262,18 @@
|
||||
</if>
|
||||
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,
|
||||
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}
|
||||
ORDER BY `create_time` DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user