Commit 3bc85b38 authored by zp's avatar zp

init

parent 7ed23242
......@@ -38,9 +38,4 @@ public class ProductOrderController implements ProductOrderApi {
return CommonResp.success(this.productOrderService.getFundLastNet(list));
}
@Override
public CommonResp<List<FilePreviewResp>> getFilePreviewUrl(List<String> list) {
return CommonResp.success(this.productOrderService.getFilePreview(list));
}
}
package com.tanpu.fund.mapper.generator.custom;
import com.tanpu.common.model.product.resp.FilePreviewResp;
import com.tanpu.fund.entity.generator.FundNav;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......
......@@ -48,5 +48,4 @@ public interface ProductService {
DynamicRetreatVO getDynamicRetreat(String id);
FundDateResp getFundDateByFundId(String fundId);
}
......@@ -120,9 +120,9 @@ public class ProductServiceImpl implements ProductService, Constant {
vo.setDesc(fundInfo.getDescInfo());
List<String> ls = Lists.newArrayList(fundInfo.getPrimaryBenchmarkId());
// 产品编码
/*// 产品编码
Map<String, List<IndexesProfile>> indexIdMap = getIndexIdMap(ls);
getProductCode(indexIdMap, vo, fundInfo);
getProductCode(indexIdMap, vo, fundInfo);*/
// 最新净值
vo.setNet(getNewNet(fundInfo.getId()));
......@@ -1013,10 +1013,10 @@ public class ProductServiceImpl implements ProductService, Constant {
Map<String, FundInfo> fundInfoMap = fundInfos.stream().collect(Collectors.toMap(FundInfo::getId, f -> f));
// 指数indexId
List<String> ls = fundInfos.stream().filter(f -> StringUtils.isNotEmpty(f.getPrimaryBenchmarkId()))
/*List<String> ls = fundInfos.stream().filter(f -> StringUtils.isNotEmpty(f.getPrimaryBenchmarkId()))
.map(FundInfo::getPrimaryBenchmarkId).collect(Collectors.toList());
Map<String, List<IndexesProfile>> indexIdMap = getIndexIdMap(ls);
Map<String, List<IndexesProfile>> indexIdMap = getIndexIdMap(ls);*/
// 起投金额
Map<String, FundRateMapping> rateMappingMap = getStringFundRateMappingMap(list);
......@@ -1035,8 +1035,7 @@ public class ProductServiceImpl implements ProductService, Constant {
return fundInfoCustomMapper.getFundInfoReport(ids);
}
private ProductInfoVO getProductInfoVO(Map<String, FundInfo> fundInfoMap,
Map<String, List<IndexesProfile>> indexIdMap, Map<String, FundRateMapping> rateMappingMap,
private ProductInfoVO getProductInfoVO(Map<String, FundInfo> fundInfoMap, Map<String, FundRateMapping> rateMappingMap,
FundCount fundCount,
Map<String, List<ProductLabel>> productLabelMap,
LabelUtil labelUtil,
......@@ -1055,7 +1054,7 @@ public class ProductServiceImpl implements ProductService, Constant {
// 指数id
vo.setRatioId(fundInfo.getPrimaryBenchmarkId());
vo.setProductName(fundInfo.getFundShortName());
getProductCode(indexIdMap, vo, fundInfo);
// getProductCode(indexIdMap, vo, fundInfo);
vo.setOpenDay(fundInfo.getOpenDay());
vo.setDesc(fundInfo.getDescInfo());
......@@ -1102,14 +1101,14 @@ public class ProductServiceImpl implements ProductService, Constant {
return net;
}
private void getProductCode(Map<String, List<IndexesProfile>> indexIdMap, ProductInfoVO vo, FundInfo fundInfo) {
/*private void getProductCode(Map<String, List<IndexesProfile>> indexIdMap, ProductInfoVO vo, FundInfo fundInfo) {
if (CollectionUtils.isNotEmpty(indexIdMap.get(fundInfo.getPrimaryBenchmarkId()))) {
String indexCode = indexIdMap.get(fundInfo.getPrimaryBenchmarkId()).get(0).getIndexCode();
if (StringUtils.isNotEmpty(indexCode)) {
vo.setProductCode(indexCode.substring(0, indexCode.indexOf(".")));
}
}
}
}*/
private Map<String, FundRateMapping> getStringFundRateMappingMap(List<String> ls) {
if (CollectionUtils.isEmpty(ls)) {
......@@ -1229,12 +1228,4 @@ public class ProductServiceImpl implements ProductService, Constant {
return vo;
}
@Override
public FundDateResp getFundDateByFundId(String fundId) {
FundDateResp resp = new FundDateResp();
FundDateExample example = new FundDateExample();
example.createCriteria().andFundIdEqualTo(fundId).andTypeIn(Lists.newArrayList(1, 2)).andDateGreaterThanOrEqualTo(DateUtil.beginOfDay(new Date()));
example.setOrderByClause(" date limit 1");
return resp;
}
}
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