Commit 9c7c463f authored by 张亚辉's avatar 张亚辉

无净值基金

parent f354a8ea
......@@ -194,4 +194,8 @@ public interface ProductApi {
@GetMapping("/noNetfund/query/samefund")
CommonResp<List<FundSameResp>> getNoNetfund(@RequestParam("fundId") String fundId);
@ApiOperation("无净值基金-根据ID查询列表")
@GetMapping("/noNetfund/querybyids")
CommonResp<List<ProductInfoVO>> querybyids(@RequestParam("list") List<String> ids);
}
package com.tanpu.fund.controller;
import cn.hutool.core.collection.CollectionUtil;
import com.tanpu.common.auth.mapping.TanpuInterfaceLoginAuth;
import com.tanpu.common.model.Page;
import com.tanpu.common.model.Pageable;
......@@ -246,4 +247,12 @@ public class ProductController implements ProductApi {
}
return CommonResp.success(this.productService.getNoNetfund(fundId));
}
@Override
public CommonResp<List<ProductInfoVO>> querybyids(List<String> ids) {
if (CollectionUtil.isEmpty(ids)) {
return CommonResp.error(CommonResp.PARAMETER_INVALID_STATUS_CODE, CommonResp.PARAMETER_INVALID_MESSAGE);
}
return CommonResp.success(this.productService.querybyids(ids));
}
}
......@@ -89,4 +89,6 @@ public interface ProductService {
List<Type> getFundLikeShortName(String productName, Pageable page);
List<FundSameResp> getNoNetfund(String fundId);
List<ProductInfoVO> querybyids(List<String> ids);
}
......@@ -2431,4 +2431,23 @@ public class ProductServiceImpl implements ProductService, Constant {
return new ArrayList<>(0);
}
@Override
public List<ProductInfoVO> querybyids(List<String> ids) {
IfaImportedNonavFundExample example = new IfaImportedNonavFundExample();
example.createCriteria().andIdIn(ids).andDeleteTagEqualTo(BizEnums.DeleteTag.tag_init);
List<IfaImportedNonavFund> ifaImportedNonavFundList = ifaImportedNonavFundMapper.selectByExample(example);
if (CollectionUtils.isNotEmpty(ifaImportedNonavFundList)) {
return new ArrayList<>(0);
}
return ifaImportedNonavFundList.stream().map(item -> {
ProductInfoVO p = new ProductInfoVO();
p.setProductName(item.getFundName());
p.setFundName(item.getFundName());
p.setFundId(item.getId());
p.setDesc(item.getSummary());
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