Commit 23c03d44 authored by 张亚辉's avatar 张亚辉

Merge branch 'v1.3.3' into dev

parents dbd8ef5f f354a8ea
......@@ -188,4 +188,10 @@ public interface ProductApi {
@GetMapping("/private/like")
CommonResp<List<Type>> getFundLikeShortNameInfo(@Valid @NotEmpty(message = "产品名称不能为空") @RequestParam("productName") String productName,
Pageable page);
//**********************************************************私有基金 end**********************************************************
@ApiOperation("推荐基金 - 无净值基金")
@GetMapping("/noNetfund/query/samefund")
CommonResp<List<FundSameResp>> getNoNetfund(@RequestParam("fundId") String fundId);
}
......@@ -238,4 +238,12 @@ public class ProductController implements ProductApi {
public CommonResp<List<Type>> getFundLikeShortNameInfo(String productName, Pageable page) {
return CommonResp.success(this.productService.getFundLikeShortName(productName, page));
}
@Override
public CommonResp<List<FundSameResp>> getNoNetfund(String fundId) {
if (StringUtils.isEmpty(fundId)) {
return CommonResp.error(CommonResp.PARAMETER_INVALID_STATUS_CODE, CommonResp.PARAMETER_INVALID_MESSAGE);
}
return CommonResp.success(this.productService.getNoNetfund(fundId));
}
}
package com.tanpu.fund.entity.generator;
import java.util.Date;
public class IfaImportedNonavFund {
/**
* id
*/
private String id;
/**
* 无净值基金名称
*/
private String fundName;
/**
* 募集期开始结束时间
*/
private String startEndDate;
/**
* 创建时间
*/
private Date createTime;
/**
* 修改时间
*/
private Date updateTime;
/**
* 0正常 1删除
*/
private Integer deleteTag;
/**
* 理财师id
*/
private String ifaId;
/**
* 机构id
*/
private String orgId;
/**
* 产品概要
*/
private String summary;
/**
* 产品详情
*/
private String detail;
/**
* 基金附件pdf
*/
private String fundFile;
/**
* 基金图片
*/
private String fundPng;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getFundName() {
return fundName;
}
public void setFundName(String fundName) {
this.fundName = fundName;
}
public String getStartEndDate() {
return startEndDate;
}
public void setStartEndDate(String startEndDate) {
this.startEndDate = startEndDate;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Integer getDeleteTag() {
return deleteTag;
}
public void setDeleteTag(Integer deleteTag) {
this.deleteTag = deleteTag;
}
public String getIfaId() {
return ifaId;
}
public void setIfaId(String ifaId) {
this.ifaId = ifaId;
}
public String getOrgId() {
return orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public String getSummary() {
return summary;
}
public void setSummary(String summary) {
this.summary = summary;
}
public String getDetail() {
return detail;
}
public void setDetail(String detail) {
this.detail = detail;
}
public String getFundFile() {
return fundFile;
}
public void setFundFile(String fundFile) {
this.fundFile = fundFile;
}
public String getFundPng() {
return fundPng;
}
public void setFundPng(String fundPng) {
this.fundPng = fundPng;
}
}
\ No newline at end of file
package com.tanpu.fund.mapper.generator;
import com.tanpu.fund.entity.generator.IfaImportedNonavFund;
import com.tanpu.fund.entity.generator.IfaImportedNonavFundExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface IfaImportedNonavFundMapper {
long countByExample(IfaImportedNonavFundExample example);
int deleteByExample(IfaImportedNonavFundExample example);
/**
* delete by primary key
* @param id primaryKey
* @return deleteCount
*/
int deleteByPrimaryKey(String id);
/**
* insert record to table
* @param record the record
* @return insert count
*/
int insert(IfaImportedNonavFund record);
int insertOrUpdate(IfaImportedNonavFund record);
int insertOrUpdateSelective(IfaImportedNonavFund record);
int insertOrUpdateWithBLOBs(IfaImportedNonavFund record);
/**
* insert record to table selective
* @param record the record
* @return insert count
*/
int insertSelective(IfaImportedNonavFund record);
List<IfaImportedNonavFund> selectByExampleWithBLOBs(IfaImportedNonavFundExample example);
List<IfaImportedNonavFund> selectByExample(IfaImportedNonavFundExample example);
/**
* select by primary key
* @param id primary key
* @return object by primary key
*/
IfaImportedNonavFund selectByPrimaryKey(String id);
int updateByExampleSelective(@Param("record") IfaImportedNonavFund record, @Param("example") IfaImportedNonavFundExample example);
int updateByExampleWithBLOBs(@Param("record") IfaImportedNonavFund record, @Param("example") IfaImportedNonavFundExample example);
int updateByExample(@Param("record") IfaImportedNonavFund record, @Param("example") IfaImportedNonavFundExample example);
/**
* update record selective
* @param record the updated record
* @return update count
*/
int updateByPrimaryKeySelective(IfaImportedNonavFund record);
int updateByPrimaryKeyWithBLOBs(IfaImportedNonavFund record);
/**
* update record
* @param record the updated record
* @return update count
*/
int updateByPrimaryKey(IfaImportedNonavFund record);
int updateBatch(List<IfaImportedNonavFund> list);
int updateBatchSelective(List<IfaImportedNonavFund> list);
int batchInsert(@Param("list") List<IfaImportedNonavFund> list);
}
\ No newline at end of file
......@@ -87,4 +87,6 @@ public interface ProductService {
Long getFundRankCountInfo(FundRankReq req);
List<Type> getFundLikeShortName(String productName, Pageable page);
List<FundSameResp> getNoNetfund(String fundId);
}
......@@ -72,6 +72,9 @@ public class ProductServiceImpl implements ProductService, Constant {
@Resource
private FundInfoMapper fundInfoMapper;
@Resource
private IfaImportedNonavFundMapper ifaImportedNonavFundMapper;
@Resource
private FundPerformanceMapper fundPerformanceMapper;
......@@ -1671,34 +1674,38 @@ public class ProductServiceImpl implements ProductService, Constant {
example.createCriteria().andIfaIdEqualTo(UserInfoThreadLocalHolder.getserInfo().getId())
.andIdNotEqualTo(fundId)
.andDeleteTagEqualTo(BizEnums.DeleteTag.tag_init);
PageMethod.startPage(1, 10);
List<IfaImportedFundInfo> importedFundInfoList = ifaImportedFundInfoMapper.selectByExample(example);
List<String> fundIdList = importedFundInfoList.stream().map(IfaImportedFundInfo::getId).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(importedFundInfoList)) {
List<String> fundIdList = importedFundInfoList.stream().map(IfaImportedFundInfo::getId).collect(Collectors.toList());
IfaImportedFundCountExample countExample = new IfaImportedFundCountExample();
countExample.createCriteria().andFundIdIn(fundIdList).andDeleteTagEqualTo(BizEnums.DeleteTag.tag_init);
List<IfaImportedFundCount> importedFundCountList = ifaImportedFundCountMapper.selectByExample(countExample);
IfaImportedFundCountExample countExample = new IfaImportedFundCountExample();
countExample.createCriteria().andFundIdIn(fundIdList).andDeleteTagEqualTo(BizEnums.DeleteTag.tag_init);
List<IfaImportedFundCount> importedFundCountList = ifaImportedFundCountMapper.selectByExample(countExample);
Map<String, IfaImportedFundCount> fundCountMap;
if (CollectionUtils.isNotEmpty(importedFundCountList)) {
fundCountMap = importedFundCountList.stream().collect(Collectors.toMap(IfaImportedFundCount::getFundId, c -> c));
} else {
fundCountMap = null;
}
Map<String, IfaImportedFundCount> fundCountMap;
if (CollectionUtils.isNotEmpty(importedFundCountList)) {
fundCountMap = importedFundCountList.stream().collect(Collectors.toMap(IfaImportedFundCount::getFundId, c -> c));
} else {
fundCountMap = null;
}
List<String> checkFundIdList = feignClientForDiagnose.getFundCollectInfo(fundIdList).getAttributes();
List<String> checkFundIdList = feignClientForDiagnose.getFundCollectInfo(fundIdList).getAttributes();
importedFundInfoList.forEach(item -> {
FundSameResp p = FundSameResp.builder()
.fundId(item.getId())
.fundName(item.getFundName())
.isCheck(CollectionUtils.isNotEmpty(checkFundIdList) ? (checkFundIdList.contains(item.getId()) ? 1 : 0) : 0)
.build();
return importedFundInfoList.stream().map(item -> {
FundSameResp p = FundSameResp.builder()
.fundId(item.getId())
.fundName(item.getFundName())
.isCheck(CollectionUtils.isNotEmpty(checkFundIdList) ? (checkFundIdList.contains(item.getId()) ? 1 : 0) : 0)
.build();
if (fundCountMap != null && fundCountMap.containsKey(item.getId())) {
p.setRet1y(BigDecimalUtil.toString(fundCountMap.get(item.getId()).getRet1y(), 2));
}
});
if (fundCountMap != null && fundCountMap.containsKey(item.getId())) {
p.setRet1y(BigDecimalUtil.toString(fundCountMap.get(item.getId()).getRet1y(), 2));
}
return p;
}).collect(Collectors.toList());
}
return new ArrayList<>(0);
}
......@@ -2402,4 +2409,26 @@ public class ProductServiceImpl implements ProductService, Constant {
return this.fundInfoCustomMapper.getFundInfoLikeName("%" + productName + "%");
}
@Override
public List<FundSameResp> getNoNetfund(String fundId) {
IfaImportedNonavFundExample example = new IfaImportedNonavFundExample();
example.createCriteria().andIfaIdEqualTo(UserInfoThreadLocalHolder.getserInfo().getId())
.andIdNotEqualTo(fundId)
.andDeleteTagEqualTo(BizEnums.DeleteTag.tag_init);
PageMethod.startPage(1, 10);
List<IfaImportedNonavFund> importedFundInfoList = ifaImportedNonavFundMapper.selectByExample(example);
if (CollectionUtils.isNotEmpty(importedFundInfoList)) {
List<String> fundIdList = importedFundInfoList.stream().map(IfaImportedNonavFund::getId).collect(Collectors.toList());
List<String> checkFundIdList = feignClientForDiagnose.getFundCollectInfo(fundIdList).getAttributes();
return importedFundInfoList.stream().map(item -> FundSameResp.builder()
.fundId(item.getId())
.fundName(item.getFundName())
.isCheck(CollectionUtils.isNotEmpty(checkFundIdList) ? (checkFundIdList.contains(item.getId()) ? 1 : 0) : 0)
.build()).collect(Collectors.toList());
}
return new ArrayList<>(0);
}
}
......@@ -94,6 +94,10 @@ tanpu.oss.ali.region-id = cn-shanghai
tanpu.oss.ali.endpoint = https://oss-${tanpu.oss.ali.region-id}.aliyuncs.com
tanpu.oss.ali.bucket-domain = https://${tanpu.oss.ali.bucket-name}.oss-${tanpu.oss.ali.region-id}.aliyuncs.com
tanpu.oss.ali.oss-path = /upload
tanpu.oss.ali.access-key-id=LTAIAKEzVydP0Q9P
tanpu.oss.ali.secret-access-key=59V9ke9txaIFzWxHFKTb1eoOOpmKpJ
tanpu.oss.ali.project-name=faTools-sit
tanpu.oss.ali.doc-convert-output-path=/docConvertOutput
tanpu.userno.startstep = 10000000
......
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