|
|
|
@@ -376,13 +376,14 @@ public class InvestBizServiceImpl implements InvestBizService { |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<MallUserInfo> queryUserList() { |
|
|
|
return queryUserList(EnumInvestUserType.USER); |
|
|
|
return queryUserList(EnumInvestUserType.ALL); |
|
|
|
} |
|
|
|
|
|
|
|
public List<MallUserInfo> queryUserList(EnumInvestUserType userType) { |
|
|
|
LambdaQueryWrapper<MallUserInfo> queryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
queryWrapper.eq(MallUserInfo::getStatus, 1); |
|
|
|
if (Objects.nonNull(userType)) { |
|
|
|
queryWrapper.eq(MallUserInfo::getInvestRule, userType.getCode()); |
|
|
|
queryWrapper.in(MallUserInfo::getInvestRule, EnumInvestUserType.MANAGER.getCode(), EnumInvestUserType.USER.getCode()); |
|
|
|
} |
|
|
|
return userInfoService.selectList(queryWrapper); |
|
|
|
} |
|
|
|
@@ -462,9 +463,16 @@ public class InvestBizServiceImpl implements InvestBizService { |
|
|
|
|
|
|
|
@Override |
|
|
|
public Collection<InvestOperateRecordVo> findOperateById(InvestOperateRecordQuery params) { |
|
|
|
params.setPageSize(Integer.MAX_VALUE); |
|
|
|
return findOperateListById(params).getRecords(); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public InvestPageResult<InvestOperateRecordVo> findOperateListById(InvestOperateRecordQuery params) { |
|
|
|
InvestHelper.notNull(params, params.getRecordType(), params.getTid()); |
|
|
|
InvestPageResult<InvestOperateRecordVo> investPage = new InvestPageResult<>(); |
|
|
|
LambdaQueryWrapper<InvestOperateRecordEntity> recordQueryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
InvestDemandEntity demandEntity = null; |
|
|
|
InvestDemandEntity demandEntity; |
|
|
|
List<InvestOperateRecordEntity> demandRecord = new ArrayList<>(); |
|
|
|
if (Objects.equals(params.getRecordType(), EnumFollowType.DEMAND)) { |
|
|
|
InvestCustomerEntity customerEntity = customerService.getByIdNotNull(params.getTid()); |
|
|
|
@@ -483,7 +491,7 @@ public class InvestBizServiceImpl implements InvestBizService { |
|
|
|
List<InvestOperateRecordEntity> recordPage = operateRecordService.list(recordQueryWrapper); |
|
|
|
recordPage.addAll(demandRecord); |
|
|
|
if (CollectionUtils.isEmpty(recordPage)) { |
|
|
|
return resultList; |
|
|
|
return investPage; |
|
|
|
} |
|
|
|
List<InvestOperateRecordEntity> mixRecordPage = recordPage.parallelStream().sorted((o1, o2) -> { |
|
|
|
if (Objects.equals(o1.getCreateDate(), o2.getCreateDate())) { |
|
|
|
@@ -500,7 +508,7 @@ public class InvestBizServiceImpl implements InvestBizService { |
|
|
|
List<TableTriple> record = JSONArray.parseArray(recordEntity.getContent(), TableTriple.class); |
|
|
|
resultList.addAll(getRecordList(recordEntity, record, usersMap.get(recordEntity.getOperator()))); |
|
|
|
} |
|
|
|
return resultList; |
|
|
|
return investPage; |
|
|
|
} |
|
|
|
|
|
|
|
private List<InvestOperateRecordVo> getRecordList(InvestOperateRecordEntity recordEntity, Collection<TableTriple> contentList, MallUserInfo userInfo) { |
|
|
|
|