Commit 91057c87 authored by libin's avatar libin

会员订单列表导出

parent 1b2947b3
...@@ -63,6 +63,9 @@ public class AppUserLoginBiz extends BaseBiz<AppUserLoginMapper, AppUserLogin> { ...@@ -63,6 +63,9 @@ public class AppUserLoginBiz extends BaseBiz<AppUserLoginMapper, AppUserLogin> {
@Autowired @Autowired
private AppUserRelationBiz appUserRelationBiz; private AppUserRelationBiz appUserRelationBiz;
@Autowired
private AppUserSellingWaterBiz appUserSellingWaterBiz;
@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED) @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
@Override @Override
public void insertSelective(AppUserLogin entity) { public void insertSelective(AppUserLogin entity) {
...@@ -417,11 +420,10 @@ public class AppUserLoginBiz extends BaseBiz<AppUserLoginMapper, AppUserLogin> { ...@@ -417,11 +420,10 @@ public class AppUserLoginBiz extends BaseBiz<AppUserLoginMapper, AppUserLogin> {
leaderId = appUserLogins.get(0).getId(); leaderId = appUserLogins.get(0).getId();
//2.根据leader userId查询下级 userid //2.根据leader userId查询下级 userid
if (Objects.nonNull(leaderId)) { if (Objects.nonNull(leaderId)) {
List<AppUserRelation> appUserRelationList = appUserRelationBiz.findMemberPageByLeaderId(leaderId); memberIds = appUserSellingWaterBiz.findMemberIdByLeaderIdAndOrdreType(leaderId,3);
if(CollectionUtils.isEmpty(appUserRelationList)){ if(CollectionUtils.isEmpty(memberIds)){
return Collections.EMPTY_LIST; return Collections.EMPTY_LIST;
} }
memberIds = appUserRelationList.stream().map(AppUserRelation::getUserId).collect(Collectors.toList());
} }
} }
List<Integer> userIds = mapper.findAppUser(phone, name, memberIds); List<Integer> userIds = mapper.findAppUser(phone, name, memberIds);
......
...@@ -399,6 +399,18 @@ public class AppUserSellingWaterBiz extends BaseBiz<AppUserSellingWaterMapper, A ...@@ -399,6 +399,18 @@ public class AppUserSellingWaterBiz extends BaseBiz<AppUserSellingWaterMapper, A
return sellingWalletPagVo; return sellingWalletPagVo;
} }
public List<Integer> findMemberIdByLeaderIdAndOrdreType(Integer leaderId, int orderType) {
Example example = new Example(AppUserSellingWater.class);
Example.Criteria criteria = example.createCriteria();
criteria.andEqualTo("userId", leaderId);
criteria.andEqualTo("orderType", orderType);
List<AppUserSellingWater> appUserSellingWaters = mapper.selectByExample(example);
if (CollectionUtils.isEmpty(appUserSellingWaters)){
return Collections.EMPTY_LIST;
}
return appUserSellingWaters.stream().map(AppUserSellingWater::getSourceId).collect(Collectors.toList());
}
private enum SellerWallterStatus { private enum SellerWallterStatus {
CANCEL(2, "取消订单"), CANCEL(2, "取消订单"),
POST(1, "已入账"), POST(1, "已入账"),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment