Commit 12f3835a authored by 张亚辉's avatar 张亚辉

simple query

parent b05f30dd
......@@ -6,6 +6,7 @@ import com.tanpu.common.model.product.req.NetReq;
import com.tanpu.common.model.product.req.ProductInfoReq;
import com.tanpu.common.model.product.req.ProductListReq;
import com.tanpu.common.model.product.resp.*;
import com.tanpu.common.model.tanpuroom.Type;
import com.tanpu.common.resp.CommonResp;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -93,6 +94,10 @@ public interface ProductApi {
@GetMapping("/dynamic/retreat")
CommonResp<DynamicRetreatVO> getDynamicRetreatInfo(@RequestParam("id") String id);
@ApiOperation("获取产品列表(只返回产品名称)")
@GetMapping("/get/fund/info/simple")
CommonResp<List<Type>> getSimpleFundList(@RequestParam("list") List<String> list);
//**********************************************************私有基金start**********************************************************
@ApiOperation("私有基金详情 - 私有基金")
@GetMapping("/privatefund/detail")
......@@ -137,6 +142,10 @@ public interface ProductApi {
@GetMapping("/private/bonus/ratio")
CommonResp<List<BonusRatioVO>> getPrivateBonusRatioInfo(@ApiParam("产品id") @RequestParam("id") String id);
@ApiOperation("获取产品列表(只返回产品名称)")
@GetMapping("/private/get/fund/info/simple")
CommonResp<List<Type>> getSimplePrivateFundList(@RequestParam("list") List<String> list);
//**********************************************************私有基金 end**********************************************************
@ApiOperation(value = "根据Id查询私募产品基本信息")
......
......@@ -7,6 +7,7 @@ import com.tanpu.common.model.product.req.NetReq;
import com.tanpu.common.model.product.req.ProductInfoReq;
import com.tanpu.common.model.product.req.ProductListReq;
import com.tanpu.common.model.product.resp.*;
import com.tanpu.common.model.tanpuroom.Type;
import com.tanpu.common.resp.CommonResp;
import com.tanpu.fund.api.ProductApi;
import com.tanpu.fund.feign.publicfund.FeignClientForPublicfund;
......@@ -112,6 +113,11 @@ public class ProductController implements ProductApi {
return CommonResp.success(this.productService.getDynamicRetreat(id));
}
@Override
public CommonResp<List<Type>> getSimpleFundList(List<String> list) {
return CommonResp.success(this.productService.getSimpleFundList(list));
}
@Override
public CommonResp<ProductInfoVO> getPrivateDetail(String id) {
if (StringUtils.isEmpty(id)) {
......@@ -178,6 +184,11 @@ public class ProductController implements ProductApi {
return CommonResp.success(this.productPrivateService.getBonusRatio(id));
}
@Override
public CommonResp<List<Type>> getSimplePrivateFundList(List<String> list) {
return CommonResp.success(this.productPrivateService.getSimplePrivateFundList(list));
}
@Override
public CommonResp<List<FundManagerVO>> getPrivateFundManagerInfo(String id, String ifaId) {
return CommonResp.success(this.productPrivateService.getFundManager(id, ifaId));
......
package com.tanpu.fund.mapper.generator.custom;
import com.tanpu.common.model.product.resp.FilePreviewResp;
import com.tanpu.common.model.tanpuroom.Type;
import com.tanpu.fund.entity.generator.FundNav;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
......@@ -47,4 +48,10 @@ public interface FundInfoCustomMapper {
@Select("select t.id as fileId,t.logical_path as previewUrl from fund_file_record t where t.id in(${list})")
List<FilePreviewResp> getFilePreviewUrl(@Param("list") String list);
@Select("select t.id as id, t.fund_short_name as `value` from fund_info t where t.id in(${list})")
List<Type> getSimpleFundList(@Param("list") String list);
@Select("select t.id as id, t.fund_name as `value` from ifa_imported_fund_info t where t.id in(${list})")
List<Type> getSimplePrivateFundList(@Param("list") String list);
}
......@@ -5,20 +5,8 @@ import com.tanpu.common.model.Pageable;
import com.tanpu.common.model.product.req.NetReq;
import com.tanpu.common.model.product.req.ProductInfoReq;
import com.tanpu.common.model.product.req.ProductListReq;
import com.tanpu.common.model.product.resp.BonusRatioVO;
import com.tanpu.common.model.product.resp.DynamicRetreatVO;
import com.tanpu.common.model.product.resp.FundCompanyVO;
import com.tanpu.common.model.product.resp.FundInfoSimpleListResp;
import com.tanpu.common.model.product.resp.FundManagerVO;
import com.tanpu.common.model.product.resp.FundRecordVO;
import com.tanpu.common.model.product.resp.FundSameResp;
import com.tanpu.common.model.product.resp.NetVO;
import com.tanpu.common.model.product.resp.ProductInfoVO;
import com.tanpu.common.model.product.resp.RiskRatingVO;
import com.tanpu.common.model.product.resp.TrackNetVO;
import com.tanpu.common.model.product.resp.TrackRecordVO;
import com.tanpu.common.model.product.resp.TradeNotesResp;
import com.tanpu.common.model.product.resp.UnitNetVO;
import com.tanpu.common.model.product.resp.*;
import com.tanpu.common.model.tanpuroom.Type;
import java.util.List;
......@@ -81,4 +69,5 @@ public interface ProductPrivateService {
List<FundSameResp> getRemmendPrivateFundList();
List<Type> getSimplePrivateFundList(List<String> list);
}
......@@ -9,6 +9,7 @@ import com.tanpu.common.model.product.resp.ProductInfoVO;
import com.tanpu.common.model.product.req.NetReq;
import com.tanpu.common.model.product.req.ProductInfoReq;
import com.tanpu.common.model.product.resp.*;
import com.tanpu.common.model.tanpuroom.Type;
import java.util.List;
......@@ -68,4 +69,6 @@ public interface ProductService {
List<FundSameResp> querySamefund(String fundId);
List<FundSameResp> getRemmendPrivateFundList(String fundId);
List<Type> getSimpleFundList(List<String> list);
}
......@@ -20,6 +20,7 @@ import com.tanpu.fund.entity.generator.*;
import com.tanpu.fund.enums.ProTypeEnums;
import com.tanpu.fund.feign.diagnose.FeignClientForDiagnose;
import com.tanpu.fund.mapper.generator.*;
import com.tanpu.fund.mapper.generator.custom.FundInfoCustomMapper;
import com.tanpu.fund.service.ProductPrivateService;
import com.tanpu.fund.utils.LongUtil;
import lombok.extern.slf4j.Slf4j;
......@@ -86,6 +87,9 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
@Resource
private FeignClientForDiagnose diagnose;
@Resource
private FundInfoCustomMapper fundInfoCustomMapper;
@Override
public Page<ProductInfoVO> getProductList(ProductInfoReq req) {
return null;
......@@ -519,4 +523,8 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
return null;
}
@Override
public List<Type> getSimplePrivateFundList(List<String> list) {
return fundInfoCustomMapper.getSimplePrivateFundList(list.stream().collect(Collectors.joining("','", "'", "'")));
}
}
......@@ -16,6 +16,7 @@ import com.tanpu.common.model.product.req.NetReq;
import com.tanpu.common.model.product.req.ProductInfoReq;
import com.tanpu.common.model.product.req.ProductListReq;
import com.tanpu.common.model.product.resp.*;
import com.tanpu.common.model.tanpuroom.Type;
import com.tanpu.common.model.user.resp.SysConstantResp;
import com.tanpu.common.resp.CommonResp;
import com.tanpu.common.utils.BigDecimalUtil;
......@@ -1663,6 +1664,11 @@ public class ProductServiceImpl implements ProductService, Constant {
return new ArrayList<>(0);
}
@Override
public List<Type> getSimpleFundList(List<String> list) {
return fundInfoCustomMapper.getSimpleFundList(list.stream().collect(Collectors.joining("','", "'", "'")));
}
private ArrayList<TrackRecordVO> getPrivateFundTrackRecordVOS(IfaImportedFundCount fundCount) {
return Lists.newArrayList(
new TrackRecordVO("近三个月", multiply100(fundCount.getRet3m()), multiply100(fundCount.getRet3mBm1()), fundCount.getEndDate() == null ? null : fundCount.getEndDate().getTime()),
......
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