Commit 13e85afc authored by zp's avatar zp

add

parent c6e1f72f
......@@ -134,7 +134,8 @@ public interface ProductApi {
@ApiOperation("基金公司 - 私有基金")
@GetMapping("/private/fund/company")
CommonResp<FundCompanyVO> getPrivateFundCompanyInfo(@ApiParam("基金公司id") @RequestParam("id") String id);
CommonResp<FundCompanyVO> getPrivateFundCompanyInfo(@ApiParam("基金公司id") @RequestParam("id") String id,
@ApiParam("分页对象") Pageable page);
@ApiOperation("基金经理 - 私有基金")
@GetMapping("/private/fund/manager")
......
......@@ -105,7 +105,7 @@ public class ProductController implements ProductApi {
@Override
public CommonResp<FundCompanyVO> getFundCompanyInfo(String id) {
return CommonResp.success(this.productPrivateService.getFundCompany(id));
return CommonResp.success(this.productService.getFundCompany(id));
}
@Override
......@@ -179,8 +179,8 @@ public class ProductController implements ProductApi {
}
@Override
public CommonResp<FundCompanyVO> getPrivateFundCompanyInfo(String id) {
return CommonResp.success(this.productPrivateService.getFundCompany(id));
public CommonResp<FundCompanyVO> getPrivateFundCompanyInfo(String id, Pageable page) {
return CommonResp.success(this.productPrivateService.getFundCompany(id, page));
}
@Override
......
......@@ -53,7 +53,7 @@ public interface ProductPrivateService {
FundRecordVO getFundRecord(String id);
FundCompanyVO getFundCompany(String id);
FundCompanyVO getFundCompany(String id, Pageable page);
FundCompanyVO getPrivateFundCompany(String id);
......
package com.tanpu.fund.service.impl;
import com.github.pagehelper.page.PageMethod;
import com.google.common.collect.Lists;
import com.tanpu.common.enums.Constant;
import com.tanpu.common.model.Page;
......@@ -24,6 +25,7 @@ import com.tanpu.common.model.product.resp.TrackRecordVO;
import com.tanpu.common.model.product.resp.UnitNetVO;
import com.tanpu.common.model.tanpuroom.Type;
import com.tanpu.common.utils.BigDecimalUtil;
import com.tanpu.common.utils.PageUtils;
import com.tanpu.fund.entity.generator.CompanyInfo;
import com.tanpu.fund.entity.generator.CompanyTnaPersonnel;
import com.tanpu.fund.entity.generator.CompanyTnaPersonnelExample;
......@@ -313,7 +315,7 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
}
@Override
public FundCompanyVO getFundCompany(String id) {
public FundCompanyVO getFundCompany(String id, Pageable page) {
CompanyInfo companyInfo = this.companyInfoMapper.selectByPrimaryKey(id);
if (companyInfo == null) {
return new FundCompanyVO();
......@@ -347,8 +349,7 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
}
// 其他基金信息
otherFundInfo(vo, id);
otherFundInfo(vo, id, page);
return vo;
}
......@@ -363,7 +364,7 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
return personnelInfos.stream().collect(Collectors.toMap(PersonnelInfo::getId, s -> s));
}
private void otherFundInfo(FundCompanyVO vo, String id) {
private void otherFundInfo(FundCompanyVO vo, String id, Pageable page) {
FundInfoExample example1 = new FundInfoExample();
example1.createCriteria().andTrustIdEqualTo(id).andDeleteTagEqualTo(ZERO_NUM);
......@@ -373,8 +374,13 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
if (CollectionUtils.isNotEmpty(list)) {
FundCountExample example2 = new FundCountExample();
example2.createCriteria().andFundIdIn(list).andDeleteTagEqualTo(ZERO_NUM);
example2.createCriteria().andFundIdIn(list)
.andDeleteTagEqualTo(ZERO_NUM)
.andRet1yBm1IsNotNull();
example2.setOrderByClause("ret_incep desc,ret_incep_a desc");
com.github.pagehelper.Page<Object> objectPage = PageMethod.startPage(page.getPageNumber(), page.getPageSize());
List<FundCount> fundCounts = this.fundCountMapper.selectByExample(example2);
if (CollectionUtils.isNotEmpty(fundCounts)) {
......@@ -419,8 +425,10 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
vo1.setRet1y(multiply100(f.getRet1y()));
vo1.setRatioId(info.getPrimaryBenchmarkId());
return vo1;
}).collect(Collectors.toList()));
vo.setPage(new Page<>(objectPage, vo.getFundInfoVOS()));
}
}
}
......
......@@ -12,7 +12,7 @@ management.endpoint.health.show-details=always
spring.datasource.url=jdbc:mysql://118.190.63.109:3306/tamp_fund?autoReconnect=true&characterEncoding=utf-8&serverTimezone=GMT%2B8&useSSL=false
spring.datasource.username=root
spring.datasource.password='@imeng123'
spring.datasource.password= @imeng123
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
company.oss.prefix = https://tamp-pro.oss-cn-shanghai.aliyuncs.com/
......
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