Commit 1112cd91 authored by zp's avatar zp

add

parents 6bd358f7 7277f5b2
......@@ -49,7 +49,7 @@ public class ProductController implements ProductApi {
@Override
public CommonResp<List<ProductInfoVO>> getProductListNotNetInfo(List<String> ids) {
return CommonResp.success();
return CommonResp.success(this.productService.getProductListNotNet(ids));
}
@Override
......
package com.tanpu.fund.service.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateTime;
......@@ -796,7 +797,7 @@ public class ProductServiceImpl implements ProductService, Constant {
if (i < fundNavs.size() - 1) {
FundNav pre = fundNavs.get(i + 1);
if (pre.getNav().compareTo(BigDecimal.ZERO) == 1) {
if (pre.getNav().compareTo(BigDecimal.ZERO) > 0) {
BigDecimal dailyIncrease = f.getNav().subtract(pre.getNav()).divide(pre.getNav(), 4, BigDecimal.ROUND_HALF_UP);
vo.setDailyIncrease(BigDecimalUtil.multiply100(dailyIncrease));
}
......@@ -1557,8 +1558,18 @@ public class ProductServiceImpl implements ProductService, Constant {
@Override
public List<ProductInfoVO> getProductListNotNet(List<String> ids) {
return null;
IfaImportedNonavFundExample example = new IfaImportedNonavFundExample();
example.createCriteria().andIdIn(ids);
List<IfaImportedNonavFund> ifaImportedNonavFunds = this.ifaImportedNonavFundMapper.selectByExample(example);
if (CollUtil.isEmpty(ifaImportedNonavFunds)) {
return new ArrayList<>(0);
}
return ifaImportedNonavFunds.stream().map(ls -> {
ProductInfoVO vo = new ProductInfoVO();
vo.setFundId(ls.getId());
vo.setFundName(ls.getFundName());
return vo;
}).collect(Collectors.toList());
}
@Override
......
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