Commit c0acea28 authored by 钱坤's avatar 钱坤

查询最新净值,都改为用新方案

parent 7f656595
......@@ -21,13 +21,16 @@ import java.util.stream.Collectors;
public class ProductForPcServiceImpl implements ProductForPcService {
@Resource
private FundInfoCustomMapper fundInfoCustomMapper;
@Resource
private FundLatestNavService fundLatestNavService;
@Override
public List<Net> getFundNewnet(List<String> list) {
if (CollectionUtils.isEmpty(list)) {
return new ArrayList<>();
}
List<FundNav> fundInfoNewNet = fundInfoCustomMapper.getFundInfoNewNet(list);
// 原先的老sql耗时太大,这里用新方案
List<FundNav> fundInfoNewNet = fundLatestNavService.getLatestNavBy(list);
if (CollectionUtils.isNotEmpty(fundInfoNewNet)) {
return fundInfoNewNet.stream().map(item -> Net.builder()
.fundId(item.getFundId())
......
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