集合返回3
This commit is contained in:
@@ -2,6 +2,8 @@ package com.czg.account.service;
|
|||||||
|
|
||||||
import com.czg.account.dto.shopuser.*;
|
import com.czg.account.dto.shopuser.*;
|
||||||
import com.czg.account.entity.ShopUser;
|
import com.czg.account.entity.ShopUser;
|
||||||
|
import com.czg.market.vo.InviteUserVO;
|
||||||
|
import com.mybatisflex.core.paginate.Page;
|
||||||
import com.mybatisflex.core.query.QueryWrapper;
|
import com.mybatisflex.core.query.QueryWrapper;
|
||||||
import com.mybatisflex.core.service.IService;
|
import com.mybatisflex.core.service.IService;
|
||||||
|
|
||||||
@@ -24,6 +26,11 @@ public interface ShopUserService extends IService<ShopUser> {
|
|||||||
|
|
||||||
ShopUser getShopUserInfo(Long shopId, long userId);
|
ShopUser getShopUserInfo(Long shopId, long userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取邀请用户列表
|
||||||
|
*/
|
||||||
|
Page<InviteUserVO> getInviteUser(Long getDistributionUserId, Integer page, Integer size);
|
||||||
|
|
||||||
|
|
||||||
boolean updateInfo(ShopUser shopUser);
|
boolean updateInfo(ShopUser shopUser);
|
||||||
|
|
||||||
|
|||||||
@@ -15,9 +15,14 @@ import com.czg.exception.ApiNotPrintException;
|
|||||||
import com.czg.market.entity.MemberLevelConfig;
|
import com.czg.market.entity.MemberLevelConfig;
|
||||||
import com.czg.market.service.MemberLevelConfigService;
|
import com.czg.market.service.MemberLevelConfigService;
|
||||||
import com.czg.market.service.TbMemberConfigService;
|
import com.czg.market.service.TbMemberConfigService;
|
||||||
|
import com.czg.market.vo.InviteUserVO;
|
||||||
import com.czg.market.vo.MemberConfigVO;
|
import com.czg.market.vo.MemberConfigVO;
|
||||||
import com.czg.service.account.mapper.ShopUserMapper;
|
import com.czg.service.account.mapper.ShopUserMapper;
|
||||||
import com.czg.utils.MyQueryWrapper;
|
import com.czg.utils.MyQueryWrapper;
|
||||||
|
import com.czg.utils.PageUtil;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.mybatisflex.core.paginate.Page;
|
||||||
import com.mybatisflex.core.query.QueryWrapper;
|
import com.mybatisflex.core.query.QueryWrapper;
|
||||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
@@ -94,6 +99,16 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
|
|||||||
return shopUser;
|
return shopUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Page<InviteUserVO> getInviteUser(Long getDistributionUserId, Integer page, Integer size) {
|
||||||
|
PageHelper.startPage(page, size);
|
||||||
|
List<InviteUserVO> list = listAs(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 PageUtil.convert(new PageInfo<>(list));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public Long updateMoney(ShopUserMoneyEditDTO shopUserEditDTO) {
|
public Long updateMoney(ShopUserMoneyEditDTO shopUserEditDTO) {
|
||||||
@@ -151,7 +166,7 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
|
|||||||
public List<ShopUser> selectBirthdayUser(LocalDate current, Long mainShopId, String userType) {
|
public List<ShopUser> selectBirthdayUser(LocalDate current, Long mainShopId, String userType) {
|
||||||
QueryWrapper queryWrapper = new QueryWrapper().isNotNull(ShopUser::getBirthDay)
|
QueryWrapper queryWrapper = new QueryWrapper().isNotNull(ShopUser::getBirthDay)
|
||||||
.eq(ShopUser::getMainShopId, mainShopId)
|
.eq(ShopUser::getMainShopId, mainShopId)
|
||||||
.eq("DATE_FORMAT(birth_day, '%m-%d')", DateUtil.format(DateUtil.date(current), "MM-dd"));
|
.eq("DATE_FORMAT(birth_day, '%m-%d')", DateUtil.format(DateUtil.date(current), "MM-dd"));
|
||||||
if ("vip".equals(userType)) {
|
if ("vip".equals(userType)) {
|
||||||
queryWrapper.eq(ShopUser::getIsVip, 1);
|
queryWrapper.eq(ShopUser::getIsVip, 1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -349,12 +349,7 @@ public class MkDistributionUserServiceImpl extends ServiceImpl<MkDistributionUse
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<InviteUserVO> getInviteUser(Long id, Integer page, Integer size) {
|
public Page<InviteUserVO> getInviteUser(Long id, Integer page, Integer size) {
|
||||||
PageHelper.startPage(page, size);
|
return shopUserService.getInviteUser(id, page, size);
|
||||||
List<InviteUserVO> list = shopUserService.listAs(QueryWrapper.create()
|
|
||||||
.select("head_img as headImg,nick_name as shopUserName,phone as shopUserPhone,one_income as oneIncome")
|
|
||||||
.eq(ShopUser::getDistributionUserId, id)
|
|
||||||
.orderBy(ShopUser::getCreateTime).desc(), InviteUserVO.class);
|
|
||||||
return PageUtil.convert(new PageInfo<>(list));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user