Commit ccb60006 authored by zp's avatar zp

Merge branch 'v1.2.0' of 47.100.44.39:zhoupeng/tamp_fund into v1.2.0

parents 13e85afc a72d888d
......@@ -30,10 +30,6 @@ public interface ProductApi {
@PostMapping("/get/product/info")
CommonResp<Page<ProductInfoVO>> getProductInfo(@ApiParam("筛选条件对象") @RequestBody ProductInfoReq req);
@ApiOperation("根据条件获取非探普产品信息")
@PostMapping("/not/tanpu/product/info")
CommonResp<Page<ProductInfoVO>> getNotTanpuProductInfo(@ApiParam("筛选条件对象") @RequestBody ProductInfoReq req);
@ApiOperation("获取产品详情")
@GetMapping("/product/detail")
CommonResp<ProductInfoVO> getProductDetailInfo(@ApiParam("产品id") @RequestParam("id") String id);
......@@ -95,10 +91,6 @@ public interface ProductApi {
@PostMapping("/get/product/list")
CommonResp<List<ProductInfoVO>> getProductInfolist(@ApiParam("筛选条件对象") @RequestBody ProductListReq req);
@ApiOperation("根据条件获取非探普产品信息")
@PostMapping("/not/tanpu/product/list")
CommonResp<List<ProductInfoVO>> getNotTanpuProductInfolist(@ApiParam("筛选条件对象") @RequestBody ProductListReq req);
@ApiOperation("动态回撤")
@GetMapping("/dynamic/retreat")
CommonResp<DynamicRetreatVO> getDynamicRetreatInfo(@RequestParam("id") String id);
......
......@@ -38,11 +38,6 @@ public class ProductController implements ProductApi {
return CommonResp.success(this.productService.getProductList(req));
}
@Override
public CommonResp<Page<ProductInfoVO>> getNotTanpuProductInfo(ProductInfoReq req) {
return CommonResp.success(this.productService.getNotTanpuProduct(req));
}
@Override
public CommonResp<ProductInfoVO> getProductDetailInfo(String id) {
return CommonResp.success(this.productService.getProductDetail(id));
......@@ -114,12 +109,6 @@ public class ProductController implements ProductApi {
return CommonResp.success(productInfolist);
}
@Override
public CommonResp<List<ProductInfoVO>> getNotTanpuProductInfolist(ProductListReq req) {
List<ProductInfoVO> notTanpuProductInfolist = this.productService.getNotTanpuProductInfolist(req);
return CommonResp.success(notTanpuProductInfolist);
}
@Override
public CommonResp<DynamicRetreatVO> getDynamicRetreatInfo(String id) {
return CommonResp.success(this.productService.getDynamicRetreat(id));
......
......@@ -119,7 +119,7 @@ public class ProductServiceImpl implements ProductService, Constant {
List<ProductInfoVO> vos = new ArrayList<>();
if (CollectionUtils.isNotEmpty(list)) {
vos = getProductInfoVOS(fundCounts, list);
vos = getProductInfoVOS(fundCounts, list, 1);
}
return new Page<>(req.getPage(), page.getTotal(), vos);
......@@ -201,6 +201,8 @@ public class ProductServiceImpl implements ProductService, Constant {
}
}
vo.setProductType(Constant.ONE_NUM);
return vo;
}
......@@ -238,6 +240,7 @@ public class ProductServiceImpl implements ProductService, Constant {
vo.setFundId(info.getId());
// 最新净值
vo.setNet(getNewNet(info.getId()));
vo.setProductType(Constant.ONE_NUM);
vos.add(vo);
});
......@@ -996,7 +999,7 @@ public class ProductServiceImpl implements ProductService, Constant {
List<ProductInfoVO> vos = new ArrayList<>();
if (CollectionUtils.isNotEmpty(list)) {
vos = getProductInfoVOS(fundCounts, list);
vos = getProductInfoVOS(fundCounts, list, 1);
}
return vos;
......@@ -1133,7 +1136,7 @@ public class ProductServiceImpl implements ProductService, Constant {
}).collect(Collectors.toList());
}
private List<ProductInfoVO> getProductInfoVOS(List<FundCount> fundCounts, List<String> list) {
private List<ProductInfoVO> getProductInfoVOS(List<FundCount> fundCounts, List<String> list, Integer productType) {
FundInfoExample example = new FundInfoExample();
example.createCriteria().andIdIn(list).andDeleteTagEqualTo(ZERO_NUM);
......@@ -1152,7 +1155,7 @@ public class ProductServiceImpl implements ProductService, Constant {
// 查询研报信息是否有研报
Map<String, Object> fundInfoReport = getFundReport(Lists.newArrayList(fundInfoMap.keySet()));
return fundCounts.stream().map(p -> getProductInfoVO(fundInfoMap, rateMappingMap, p, fundInfoReport.keySet()))
return fundCounts.stream().map(p -> getProductInfoVO(fundInfoMap, rateMappingMap, p, fundInfoReport.keySet(), productType))
.collect(Collectors.toList());
}
......@@ -1163,9 +1166,10 @@ public class ProductServiceImpl implements ProductService, Constant {
private ProductInfoVO getProductInfoVO(Map<String, FundInfo> fundInfoMap, Map<String, FundRateMapping> rateMappingMap,
FundCount fundCount,
Set<String> fundInfoReports) {
Set<String> fundInfoReports, Integer productType) {
ProductInfoVO vo = new ProductInfoVO();
BeanUtils.copyProperties(fundCount, vo);
vo.setProductType(productType);
vo.setRet1m(multiply100(fundCount.getRet1m()));
vo.setRet1y(multiply100(fundCount.getRet1y()));
String fundId = fundCount.getFundId();
......@@ -1387,6 +1391,8 @@ public class ProductServiceImpl implements ProductService, Constant {
}
}
detailResp.setProductType(Constant.THREE_NUM);
return detailResp;
}
......@@ -1494,6 +1500,8 @@ public class ProductServiceImpl implements ProductService, Constant {
p.setNet(importedFundCount == null ? null : Net.builder().netDate(importedFundCount.getPriceDate().getTime())
.netValue(BigDecimalUtil.toString(importedFundCount.getNetNav(), 4))
.build());
p.setProductType(Constant.THREE_NUM);
return p;
}).collect(Collectors.toList());
}
......
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