Commit 119bdf8d authored by zp's avatar zp

aa

parent 7a69733d
package com.tanpu.fund.service.impl; package com.tanpu.fund.service.impl;
import com.alibaba.fastjson.JSON;
import com.github.pagehelper.page.PageMethod; import com.github.pagehelper.page.PageMethod;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
...@@ -54,6 +55,7 @@ import com.tanpu.fund.mapper.generator.PersonCompanyPositionMappingMapper; ...@@ -54,6 +55,7 @@ import com.tanpu.fund.mapper.generator.PersonCompanyPositionMappingMapper;
import com.tanpu.fund.mapper.generator.PersonnelInfoMapper; import com.tanpu.fund.mapper.generator.PersonnelInfoMapper;
import com.tanpu.fund.service.ProductPrivateService; import com.tanpu.fund.service.ProductPrivateService;
import com.tanpu.fund.utils.LongUtil; import com.tanpu.fund.utils.LongUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
...@@ -89,6 +91,7 @@ import static com.tanpu.common.utils.BigDecimalUtil.multiply100; ...@@ -89,6 +91,7 @@ import static com.tanpu.common.utils.BigDecimalUtil.multiply100;
* @email: zhoupeng_08@163.com * @email: zhoupeng_08@163.com
*/ */
@Service @Service
@Slf4j
public class ProductPrivateServiceImpl implements ProductPrivateService, Constant { public class ProductPrivateServiceImpl implements ProductPrivateService, Constant {
@Value("${company.oss.prefix}") @Value("${company.oss.prefix}")
...@@ -231,18 +234,7 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan ...@@ -231,18 +234,7 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
example1.createCriteria().andIdIn(list).andDeleteTagEqualTo(ZERO_NUM); example1.createCriteria().andIdIn(list).andDeleteTagEqualTo(ZERO_NUM);
List<PersonnelInfo> infos = this.personnelInfoMapper.selectByExampleWithBLOBs(example1); List<PersonnelInfo> infos = this.personnelInfoMapper.selectByExampleWithBLOBs(example1);
Set<String> isCheckSet; Set<String> isCheckSet = getIsCheck(ifaId, fundIds);
if (StringUtils.isEmpty(ifaId)) {
isCheckSet = new HashSet<>(0);
} else {
List<String> attributes = diagnose.getFundCollectInfo(ExternalReq.builder().ids(fundIds).ifaId(ifaId).build()).getAttributes();
if (CollectionUtils.isEmpty(attributes)) {
isCheckSet = new HashSet<>(0);
} else {
isCheckSet = Sets.newHashSet(attributes);
}
}
// 基金经理 // 基金经理
return infos.stream().map(i -> { return infos.stream().map(i -> {
...@@ -422,19 +414,7 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan ...@@ -422,19 +414,7 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
if (CollectionUtils.isNotEmpty(fundCounts)) { if (CollectionUtils.isNotEmpty(fundCounts)) {
Set<String> isCheckSet; Set<String> isCheckSet = getIsCheck(ifaId, list);
if (StringUtils.isEmpty(ifaId)) {
isCheckSet = new HashSet<>(0);
} else {
List<String> attributes = diagnose.getFundCollectInfo(ExternalReq.builder().ids(list).ifaId(ifaId).build()).getAttributes();
if (CollectionUtils.isEmpty(attributes)) {
isCheckSet = new HashSet<>(0);
} else {
isCheckSet = Sets.newHashSet(attributes);
}
}
fundCounts.sort(Comparator.comparing(FundCount::getRetIncep).reversed()); fundCounts.sort(Comparator.comparing(FundCount::getRetIncep).reversed());
FundCount fundCount = fundCounts.get(0); FundCount fundCount = fundCounts.get(0);
...@@ -486,6 +466,25 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan ...@@ -486,6 +466,25 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
} }
} }
private Set<String> getIsCheck(String ifaId, List<String> list) {
log.info("入参信息 ifa : {},基金id : {}", ifaId, JSON.toJSONString(list));
Set<String> isCheckSet;
if (StringUtils.isEmpty(ifaId)) {
isCheckSet = new HashSet<>(0);
} else {
List<String> attributes = diagnose.getFundCollectInfo(ExternalReq.builder().ids(list).ifaId(ifaId).build()).getAttributes();
if (CollectionUtils.isEmpty(attributes)) {
isCheckSet = new HashSet<>(0);
} else {
isCheckSet = Sets.newHashSet(attributes);
}
}
log.info("返回参数 {}", JSON.toJSONString(isCheckSet));
return isCheckSet;
}
@Override @Override
public FundCompanyVO getPrivateFundCompany(String id) { public FundCompanyVO getPrivateFundCompany(String id) {
return null; return null;
......
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