Commit 615e0e56 authored by 张亚辉's avatar 张亚辉

model

parent 564f7718
package com.tanpu.fund.api;
import io.swagger.annotations.Api;
@Api(tags = "私募基金 PC端")
public interface ProductForPcApi {
}
package com.tanpu.fund.api.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
@ApiModel("回答信息")
@Data
@Builder
public class Answer {
@ApiModelProperty("回复时间 yyyy-mm-dd HH:mm")
private Long time;
@ApiModelProperty("回复信息")
private String answerInfo;
}
package com.tanpu.fund.api.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
@ApiModel("分红")
@Data
public class Bonus {
@ApiModelProperty("分红日期")
private Long time;
@ApiModelProperty("分红类型")
private String type;
@ApiModelProperty("分红类型")
private String ratio;
}
package com.tanpu.fund.api.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
@ApiModel("基金信息")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class FundInfoVO {
@ApiModelProperty("基金id")
private String fundId;
@ApiModelProperty("基金类型")
private Integer bonusType;
@ApiModelProperty("基金类型名称")
private String bonusTypeName;
@ApiModelProperty("基金名称")
private String fundName;
@ApiModelProperty("累积净值")
private String cumulProfit;
@ApiModelProperty("累计收益")
private String retIncep;
@ApiModelProperty("年化收益")
private String yearProfit;
@ApiModelProperty("占比")
private String ratio;
@ApiModelProperty("对比产品id")
private String ratioId;
@ApiModelProperty("较上次调仓")
private String ratioTransfer;
}
package com.tanpu.fund.api.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
@ApiModel("基金占比")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class FundRatioVO {
@ApiModelProperty(value = "基金类型",
notes = "私募基金类型:1-信托计划,2-有限合伙,3-券商资管,4-公募专户,5-单账户,6-证券投资基金,7-海外基金,8-期货资管,9-保险资管、10-创业投资基金、11-股权投资基金、12-银行理财、13-类固收信托、-1其他投资基金" +
"公募基金类型:1-混合型、2-债券型、3-定开债券、4-联接基金、5-货币型、6-债券指数、7-保本型、8-理财型、9-QDII、10-股票指数、11-QDII-指数、12-股票型、13-固定收益、14-分级杠杆、15-ETF-场内、16-QDII-ETF、17-债券创新-场内、18-封闭式")
private Integer bonusType;
@ApiModelProperty(value = "占比")
private String ratio;
private List<FundInfoVO> list;
}
package com.tanpu.fund.api.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
@ApiModel("产品收益")
@Data
public class Proceed {
@ApiModelProperty("近3月收益")
private String ret3m;
@ApiModelProperty("近1年")
private String ret1y;
@ApiModelProperty("成立来")
private String retIncep;
}
package com.tanpu.fund.api.model.req;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
public class FundCompanyReq {
}
package com.tanpu.fund.api.model.req;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class FundQaAskReq {
@ApiModelProperty("基金ID")
private String fundId;
@ApiModelProperty("内容")
private String content;
}
package com.tanpu.fund.api.model.req;
import com.tanpu.common.model.Pageable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ApiModel("产品QA")
@Data
public class FundQaListReq {
@ApiModelProperty("基金ID")
private String fundId;
@ApiModelProperty("分页对象")
private Pageable page;
}
package com.tanpu.fund.api.model.req;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
@ApiModel("基金档案入参")
@Data
public class FundRecordReq {
@ApiModelProperty("基金id")
private String id;
@ApiModelProperty("基金档案查询类型 默认查询概况 1:概况 2:分红")
private String type;
}
package com.tanpu.fund.api.model.req;
import com.tanpu.common.model.Pageable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
@ApiModel("净值参数")
@Data
public class NetReq {
@ApiModelProperty("收益高低排序 默认倒序 1:倒叙 2:正序")
private String profitSort;
@ApiModelProperty("策略")
private List<String> list;
@ApiModelProperty("开放日筛选 1: 一个月 2: 两个月 ...")
private String month;
@ApiModelProperty("净值排序 默认倒序 1:倒叙 2:正序")
private String netSort;
@ApiModelProperty("近半年收益排序 默认倒序 1:倒叙 2:正序")
private String aboutYearProfitSort;
@ApiModelProperty("本周收益 默认倒序 1:倒叙 2:正序")
private String weekProfitSort;
@ApiModelProperty("近一月收益 默认倒序 1:倒叙 2:正序")
private String near1MonthProfitSort;
@ApiModelProperty("近一年收益 默认倒序 1:倒叙 2:正序")
private String near1YearProfitSort;
@ApiModelProperty("近一年波动率 默认倒序 1:倒叙 2:正序")
private String near1YearVolatilitySort;
@ApiModelProperty("近一年回撤 默认倒序 1:倒叙 2:正序")
private String near1YearRetreatSort;
@ApiModelProperty("近一年夏普 默认倒序 1:倒叙 2:正序")
private String near1YearSharpSort;
@ApiModelProperty("分页信息")
private Pageable page;
}
package com.tanpu.fund.api.model.req;
import com.tanpu.fund.api.model.Proceed;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
@ApiModel("组合策略")
@Data
public class ProductGroupReq {
@ApiModelProperty("chan产品组名称")
private String proGroupName;
@ApiModelProperty("类型")
private String type;
@ApiModelProperty("类型名称")
private String typeName;
@ApiModelProperty("收益")
private List<Proceed> proceeds;
}
package com.tanpu.fund.api.model.req;
import com.tanpu.common.model.Pageable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
@ApiModel("产品查询入参")
@Data
public class ProductInfoReq {
@ApiModelProperty("排序 默认由倒序高到底 1:倒序 2:正序")
private String sort;
@ApiModelProperty("策略")
private List<String> list;
@ApiModelProperty("开放日筛选 1: 一个月 2: 两个月 ... 99: 不限")
private String month;
@ApiModelProperty("对比产品")
private String ratioId;
@ApiModelProperty("净值排序 默认倒叙 1:倒叙 2:正序")
private String netSort;
@ApiModelProperty("近一年排序 默认倒叙 1:倒叙 2:正序")
private String near1YearSort;
@ApiModelProperty("成立以来收益率 1:倒叙 2:正序")
private String retIncepSort;
@ApiModelProperty("分页信息")
private Pageable page;
}
package com.tanpu.fund.api.model.resp;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
@ApiModel("分红配送")
@Data
public class BonusRatioVO {
@ApiModelProperty("分红日期 yyyy-mm-dd")
private Long time;
@ApiModelProperty("分红类型 1:分红,2:拆分 3:业绩报酬 -1:其他")
private Integer type;
@ApiModelProperty("分红比率/差费比率")
private String distribution;
}
package com.tanpu.fund.api.model.resp;
import com.tanpu.common.model.product.resp.Net;
import com.tanpu.common.model.product.resp.ProductInfoVO;
import com.tanpu.fund.api.model.FundInfoVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
@ApiModel("基金公司信息")
@Data
public class FundCompanyVO {
@ApiModelProperty("icon")
private String img;
@ApiModelProperty("基金公司id")
private String companyId;
@ApiModelProperty("公司名称")
private String companyName;
@ApiModelProperty("总金额 单位:亿元")
private String totalMoney;
@ApiModelProperty("基金总数量")
private Integer totalFund;
@ApiModelProperty("代表id")
private String fundId;
@ApiModelProperty("对比产品id")
private String ratioId;
@ApiModelProperty("基金名称")
private String fundName;
@ApiModelProperty("成立以来的累计收益")
private String retIncep;
@ApiModelProperty("最新净值")
private Net net;
@ApiModelProperty("运行时间 时间戳")
private Long time;
@ApiModelProperty("成立时间")
private Long inceptionDate;
private ProductInfoVO productInfoVO;
private List<FundInfoVO> fundInfoVOS;
}
package com.tanpu.fund.api.model.resp;
import io.swagger.annotations.ApiModel;
import lombok.Data;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
@ApiModel("基金解读")
@Data
public class FundExplainVO {
private String id;
private String fundId;
private String title;
private String content;
}
package com.tanpu.fund.api.model.resp;
import com.tanpu.common.model.product.resp.Net;
import com.tanpu.common.model.product.resp.ProductLabel;
import com.tanpu.fund.api.model.FundInfoVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import java.util.List;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
@ApiModel("基金组详情")
@Data
@Builder
public class FundGroupVO {
@ApiModelProperty("产品名称")
private String productName;
@ApiModelProperty("基金类型")
private String bonusType;
@ApiModelProperty("近一年收益")
private String near1YearRatio;
@ApiModelProperty("风险等级")
private Integer riskLevel;
@ApiModelProperty("最新净值")
private Net net;
@ApiModelProperty("近一个月收益")
private String near1Month;
@ApiModelProperty("组合目标")
private String groupTarget;
@ApiModelProperty("成立以来")
private String retIncep;
@ApiModelProperty("适合客户群体")
private String customerGroup;
@ApiModelProperty("组合点评")
private String groupComment;
@ApiModelProperty("调仓点评")
private String transferComment;
@ApiModelProperty("组合基金标签")
private List<ProductLabel> productLabels;
@ApiModelProperty("基金占比")
private List<FundInfoVO> fundInfoVOList;
}
package com.tanpu.fund.api.model.resp;
import com.tanpu.common.model.product.resp.Net;
import com.tanpu.fund.api.model.FundInfoVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
@ApiModel("基金经理信息")
@Data
public class FundManagerVO {
@ApiModelProperty("经理id")
private String managerId;
@ApiModelProperty("经理姓名")
private String managerName;
@ApiModelProperty("从业时间 单位:年 -1:代表不详")
private Integer jobTime;
@ApiModelProperty("个人简介")
private String personalProfile;
@ApiModelProperty("代表的基金id")
private String id;
@ApiModelProperty("对比基金id")
private String ratioId;
@ApiModelProperty("基金名称")
private String fundName;
@ApiModelProperty("成立以来的累计收益")
private String retIncep;
@ApiModelProperty("最新净值")
private Net net;
@ApiModelProperty("运行时间")
private Long time;
@ApiModelProperty("成立时间")
private Long inceptionDate;
private List<FundInfoVO> fundInfoVOS;
}
package com.tanpu.fund.api.model.resp;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
@ApiModel("基金档案信息")
@Data
public class FundRecordVO {
@ApiModelProperty("产品全称")
private String productName;
@ApiModelProperty("基金id")
private String id;
@ApiModelProperty("风险等级")
private String riskLevel;
@ApiModelProperty("投资顾问 id")
private String advisorId;
@ApiModelProperty("投资顾问 name")
private String advisorName;
@ApiModelProperty("基金管理人 id")
private String fundManagerId;
@ApiModelProperty("基金管理人 name")
private String fundManagerName;
@ApiModelProperty("基金托管人id")
private String fundCustodianId;
@ApiModelProperty("基金托管人")
private String fundCustodian;
@ApiModelProperty("外包机构 id")
private String liquidationAgencyId;
@ApiModelProperty("外包机构 name")
private String liquidationAgencyName;
@ApiModelProperty("证券经纪人 id")
private String brokerId;
@ApiModelProperty("证券经纪人 name")
private String brokerName;
@ApiModelProperty("期货经纪人 id")
private String brokerFutureId;
@ApiModelProperty("期货经纪人 name")
private String brokerFutureName;
@ApiModelProperty("成立日")
private Long foundDate;
@ApiModelProperty("运行状态")
private String fundStatus;
@ApiModelProperty("运行状态 value")
private String fundStatusValue;
@ApiModelProperty("产品类型")
private Integer fundType;
@ApiModelProperty("value")
private String fundTypeValue;
@ApiModelProperty("初始规模")
private String initialSize;
@ApiModelProperty("投资/子策略")
private String aaa;
@ApiModelProperty("备案编号")
private String registerNumber;
@ApiModelProperty("认购起点")
private String minInvestmentShare;
@ApiModelProperty("追加起点")
private String subsequentInvestmentShare;
// @ApiModelProperty("封闭期")
// private String aa;
@ApiModelProperty("开放日")
private String bb;
@ApiModelProperty("基金code")
private String code;
@ApiModelProperty("发行规模")
private String issue;
@ApiModelProperty("公司id")
private String companyId;
@ApiModelProperty("基金公司")
private String companyName;
}
package com.tanpu.fund.api.model.resp;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
@ApiModel("组合策略")
@Data
@Builder
public class FundSetListVO {
@ApiModelProperty("成立以来的收益")
private String foundProfit;
@ApiModelProperty("组合id")
private String id;
@ApiModelProperty("对比指数id")
private String ratioId;
@ApiModelProperty("组合名称")
private String name;
@ApiModelProperty("策略id")
private Integer strategy;
@ApiModelProperty("策略名称")
private String strategyName;
@ApiModelProperty("描述")
private String desc;
}
package com.tanpu.fund.api.model.resp;
import com.tanpu.common.model.product.resp.Net;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
@ApiModel("净值列表详情")
@Data
public class NetVO {
@ApiModelProperty("产品名称")
private String productName;
@ApiModelProperty("产品id")
private String productId;
@ApiModelProperty("对比产品id")
private String ratioId;
@ApiModelProperty("净值")
private Net net;
@ApiModelProperty("近半年")
private String aboutYearProfit;
@ApiModelProperty("本周收益")
private String weekProfit;
@ApiModelProperty("近一月收益")
private String near1MonthProfit;
@ApiModelProperty("近一年收益")
private String near1YearProfit;
@ApiModelProperty("近一年波动率")
private String near1YearVolatility;
@ApiModelProperty("近一年回撤")
private String near1YearRetreat;
@ApiModelProperty("近一年夏普")
private String near1YearSharp;
}
package com.tanpu.fund.api.model.resp;
import com.tanpu.common.model.product.resp.Net;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
@ApiModel("非探普产品")
@Data
public class NotTPProductVO {
@ApiModelProperty("产品名称")
private String productName;
@ApiModelProperty("产品iid")
private String productId;
@ApiModelProperty("最新净值")
private Net net;
@ApiModelProperty("最近一年")
private String ret1y;
}
package com.tanpu.fund.api.model.resp;
import io.swagger.annotations.ApiModel;
import lombok.Data;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
@ApiModel("非探普产品")
@Data
public class NotTanpuProductVO {
// private String
}
package com.tanpu.fund.api.model.resp;
import com.tanpu.common.model.product.resp.Net;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author: zyh
* @date: 2021-02-05 5:23 下午
* @description:
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class PrivateFundDetailResp {
@ApiModelProperty("基金ID")
private String fundId;
@ApiModelProperty("备案编号")
private String registerNumber;
@ApiModelProperty("基金名称")
private String fundName;
@ApiModelProperty("近一年收益")
private String near1YearProfit;
@ApiModelProperty("最新净值")
private Net net;
}
package com.tanpu.fund.api.model.resp;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author: zyh
* @date: 2021-02-05 5:46 下午
* @description:
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class PrivateHistoryprofitResp {
@ApiModelProperty("基金ID")
private String fundId;
@ApiModelProperty("近三月收益")
private String ret3m;
@ApiModelProperty("近半年收益")
private String ret6m;
@ApiModelProperty("近一年收益")
private String ret1y;
@ApiModelProperty("近两年收益")
private String ret2y;
@ApiModelProperty("近三年收益")
private String ret3y;
@ApiModelProperty("近四年收益")
private String ret4y;
@ApiModelProperty("近五年收益")
private String ret5y;
@ApiModelProperty("成立以来收益")
private String retIncep;
}
package com.tanpu.fund.api.model.resp;
import com.tanpu.common.model.product.resp.ProductInfoVO;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
public class ProductDetailVO {
private ProductInfoVO productInfoVO;
private ProfitTrendVO profitTrendVO;
}
package com.tanpu.fund.api.model.resp;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
public class ProfitTrendVO {
private String currDate;
private String foundDate;
private String yields;
private String ratioYields;
}
package com.tanpu.fund.api.model.resp;
import com.tanpu.fund.api.model.Answer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import java.util.List;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
@ApiModel("QA信息")
@Data
@Builder
public class QAVO {
@ApiModelProperty("用户id")
private String userId;
@ApiModelProperty("用户头像")
private String headImg;
@ApiModelProperty("用户名称")
private String userName;
@ApiModelProperty("提问时间 yyyy-mm-dd HH:mm")
private Long time;
@ApiModelProperty("问题描述")
private String question;
@ApiModelProperty("答复信息")
private List<Answer> answers;
}
package com.tanpu.fund.api.model.resp;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
@ApiModel("风险评估")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RiskRatingVO {
@ApiModelProperty("时间")
private String timeDesc;
@ApiModelProperty("最大回撤")
private String maxRetreat;
@ApiModelProperty("年化波动率")
private String annualizedVolatility;
@ApiModelProperty("夏普比率")
private String sharpeRatio;
}
package com.tanpu.fund.api.model.resp;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
@ApiModel("策略信息")
public class StrategyVO {
@ApiModelProperty("策略编码")
private String strategyCode;
}
package com.tanpu.fund.api.model.resp;
import io.swagger.annotations.ApiModel;
import lombok.Data;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
@ApiModel
@Data
public class TestVO {
}
package com.tanpu.fund.api.model.resp;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
@ApiModel("历史净值")
@Data
public class TrackNetVO {
@ApiModelProperty("日期 yyyy-mm-dd")
private String priceDate;
@ApiModelProperty("单位净值")
private String nav;
@ApiModelProperty("考虑分红再投资 累计净值")
private String cumulativeNav;
@ApiModelProperty("分红不投资的单位累计净值")
private String cumulativeNavWithdrawal;
}
package com.tanpu.fund.api.model.resp;
import com.tanpu.fund.api.model.FundInfoVO;
import com.tanpu.fund.api.model.FundRatioVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
@ApiModel("历史持仓")
@Data
public class TrackPositionVO {
@ApiModelProperty("时间 yyyy-mm-dd")
private Long time;
@ApiModelProperty("各基金当前占比")
private List<FundRatioVO> fundRatios;
@ApiModelProperty("各基金持仓变动")
private List<FundInfoVO> fundInfos;
}
package com.tanpu.fund.api.model.resp;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
@ApiModel("历史业绩")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class TrackRecordVO {
@ApiModelProperty("净值时间")
private String netTime;
@ApiModelProperty("本产品")
private String net;
@ApiModelProperty("对比产品")
private String ratioNet;
}
package com.tanpu.fund.api.model.resp;
import com.tanpu.common.model.product.resp.Net;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
@ApiModel("单位净值信息")
@Data
public class UnitNetVO {
@ApiModelProperty("单位净值日期 格式 : yyyy-mm-dd")
private String time;
@ApiModelProperty("成立时间 yyyy-mm-dd")
private String foundTime;
@ApiModelProperty("本产品收益率")
private String net;
@ApiModelProperty("对比产品名称收益率")
private String ratioProductName;
@ApiModelProperty("对比产品")
private String ratioProductNet;
@ApiModelProperty("本产品")
private List<Net> nets;
@ApiModelProperty("对比")
private List<Net> ratioNets;
}
package com.tanpu.fund.api.model.resp;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ApiModel(description = "用户信息")
@Data
public class UserInfoVo {
@ApiModelProperty("用户ID")
private String id;
@ApiModelProperty("用户姓名")
private String uiUsername;
@ApiModelProperty("用户昵称")
private String uiNickname;
@ApiModelProperty("用户头像")
private String uiHeadimg;
}
...@@ -6,7 +6,7 @@ import com.tanpu.common.model.product.req.ProductListReq; ...@@ -6,7 +6,7 @@ import com.tanpu.common.model.product.req.ProductListReq;
import com.tanpu.common.model.product.resp.*; import com.tanpu.common.model.product.resp.*;
import com.tanpu.common.resp.CommonResp; import com.tanpu.common.resp.CommonResp;
import com.tanpu.fund.api.ProductApi; import com.tanpu.fund.api.ProductApi;
import com.tanpu.fund.api.model.req.NetReq; import com.tanpu.fund.api.model.req .NetReq;
import com.tanpu.fund.api.model.req.ProductInfoReq; import com.tanpu.fund.api.model.req.ProductInfoReq;
import com.tanpu.fund.api.model.resp.*; import com.tanpu.fund.api.model.resp.*;
import com.tanpu.fund.service.ProductService; import com.tanpu.fund.service.ProductService;
......
package com.tanpu.fund.controller;
import com.tanpu.fund.api.ProductForPcApi;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RestController;
@RestController
@Slf4j
public class ProductForPcController implements ProductForPcApi {
}
package com.tanpu.fund.service;
import com.tanpu.fund.entity.generator.FundCompanyInfo;
import com.tanpu.fund.entity.generator.FundCount;
import com.tanpu.fund.entity.generator.FundPersonnelInfo;
/**
* @author: zyh
*/
public interface ProductCommonService {
FundCount getFundInfo(String fundId);
FundCompanyInfo getFundCompanyInfo(String companyId);
FundPersonnelInfo getFundManager(String fundId);
}
package com.tanpu.fund.service;
/**
* @author: zyh
*/
public interface ProductForPcService {
}
package com.tanpu.fund.service.impl;
import com.tanpu.fund.entity.generator.*;
import com.tanpu.fund.mapper.generator.FundCompanyInfoMapper;
import com.tanpu.fund.mapper.generator.FundCountMapper;
import com.tanpu.fund.mapper.generator.FundManagerMappingMapper;
import com.tanpu.fund.mapper.generator.FundPersonnelInfoMapper;
import com.tanpu.fund.service.ProductCommonService;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
* @author: zyh
*/
@Service
public class ProductCommonServiceImpl implements ProductCommonService {
@Resource
private FundCountMapper fundCountMapper;
@Resource
private FundCompanyInfoMapper fundCompanyInfoMapper;
@Resource
private FundManagerMappingMapper fundManagerMappingMapper;
@Resource
private FundPersonnelInfoMapper fundPersonnelInfoMapper;
@Override
public FundCount getFundInfo(String fundId) {
if (StringUtils.isEmpty(fundId)) {
return null;
}
//查询基金统计信息
FundCountExample fundCountExample = new FundCountExample();
fundCountExample.createCriteria().andFundIdEqualTo(fundId);
List<FundCount> fundCounts = fundCountMapper.selectByExample(fundCountExample);
if (CollectionUtils.isNotEmpty(fundCounts)) {
return fundCounts.get(0);
}
return null;
}
@Override
public FundCompanyInfo getFundCompanyInfo(String companyId) {
if (StringUtils.isEmpty(companyId)) {
return null;
}
//查询基金公司
FundCompanyInfoExample example = new FundCompanyInfoExample();
example.createCriteria().andCompanyIdEqualTo(companyId);
FundCompanyInfo fundCompanyInfo = fundCompanyInfoMapper.selectByPrimaryKey(companyId);
return fundCompanyInfo;
}
@Override
public FundPersonnelInfo getFundManager(String fundId) {
if (StringUtils.isEmpty(fundId)) {
return null;
}
FundManagerMappingExample example = new FundManagerMappingExample();
example.createCriteria().andFundIdEqualTo(fundId);
List<FundManagerMapping> fundManagerMappings = fundManagerMappingMapper.selectByExample(example);
if (CollectionUtils.isNotEmpty(fundManagerMappings)
&& StringUtils.isNotEmpty(fundManagerMappings.get(0).getFundManagerId())) {
return fundPersonnelInfoMapper.selectByPrimaryKey(fundManagerMappings.get(0).getFundManagerId());
}
return null;
}
}
package com.tanpu.fund.service.impl;
import com.tanpu.fund.service.ProductForPcService;
import org.springframework.stereotype.Service;
/**
* @author: zyh
*/
@Service
public class ProductForPcServiceImpl implements ProductForPcService {
}
...@@ -13,7 +13,6 @@ import com.tanpu.common.model.product.resp.DynamicRetreatVO; ...@@ -13,7 +13,6 @@ import com.tanpu.common.model.product.resp.DynamicRetreatVO;
import com.tanpu.common.model.product.resp.FundInfoSimpleListResp; import com.tanpu.common.model.product.resp.FundInfoSimpleListResp;
import com.tanpu.common.model.product.resp.Net; import com.tanpu.common.model.product.resp.Net;
import com.tanpu.common.model.product.resp.ProductInfoVO; import com.tanpu.common.model.product.resp.ProductInfoVO;
import com.tanpu.common.resp.CommonResp;
import com.tanpu.common.utils.BigDecimalUtil; import com.tanpu.common.utils.BigDecimalUtil;
import com.tanpu.fund.api.model.FundInfoVO; import com.tanpu.fund.api.model.FundInfoVO;
import com.tanpu.fund.api.model.req.NetReq; import com.tanpu.fund.api.model.req.NetReq;
...@@ -333,7 +332,7 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -333,7 +332,7 @@ public class ProductServiceImpl implements ProductService, Constant {
ProductInfoVO vo = new ProductInfoVO(); ProductInfoVO vo = new ProductInfoVO();
BeanUtils.copyProperties(f, vo); BeanUtils.copyProperties(f, vo);
vo.setFundId(f.getFundId()); vo.setFundId(f.getFundId());
vo.setNet(new Net(f.getPriceDate().getTime(), BigDecimalUtil.toString(f.getNetNav(), 4))); vo.setNet(new Net(f.getPriceDate().getTime(), BigDecimalUtil.toString(f.getNetNav(), 4), BigDecimalUtil.toString(f.getCumulativeNav(), 4)));
vo.setProductName(map.get(f.getFundId()).getFundShortName()); vo.setProductName(map.get(f.getFundId()).getFundShortName());
vo.setRet1y(multiply100(f.getRet1y())); vo.setRet1y(multiply100(f.getRet1y()));
...@@ -509,7 +508,7 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -509,7 +508,7 @@ public class ProductServiceImpl implements ProductService, Constant {
private NetVO getNetVO(Map<String, FundInfo> infoMap, FundCount f) { private NetVO getNetVO(Map<String, FundInfo> infoMap, FundCount f) {
NetVO netVO = new NetVO(); NetVO netVO = new NetVO();
netVO.setProductId(f.getFundId()); netVO.setProductId(f.getFundId());
netVO.setNet(new Net(f.getPriceDate().getTime(), BigDecimalUtil.toString(f.getCumulativeNav(), 4))); netVO.setNet(new Net(f.getPriceDate().getTime(), BigDecimalUtil.toString(f.getCumulativeNav(), 4), BigDecimalUtil.toString(f.getCumulativeNav(), 4)));
FundInfo fundInfo = infoMap.get(f.getFundId()); FundInfo fundInfo = infoMap.get(f.getFundId());
netVO.setProductName(fundInfo.getFundShortName()); netVO.setProductName(fundInfo.getFundShortName());
...@@ -811,7 +810,7 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -811,7 +810,7 @@ public class ProductServiceImpl implements ProductService, Constant {
if (fundCount != null) { if (fundCount != null) {
vo.setRetIncep(multiply100(fundCount.getRetIncep())); vo.setRetIncep(multiply100(fundCount.getRetIncep()));
vo.setNet(new Net(fundCount.getEndDate() == null ? null : fundCount.getEndDate().getTime(), vo.setNet(new Net(fundCount.getEndDate() == null ? null : fundCount.getEndDate().getTime(),
BigDecimalUtil.toString(fundCount.getCumulativeNav(), 4))); BigDecimalUtil.toString(fundCount.getCumulativeNav(), 4), BigDecimalUtil.toString(fundCount.getCumulativeNav(), 4)));
} }
if (infoMap.get(fundId) != null) { if (infoMap.get(fundId) != null) {
...@@ -1001,7 +1000,7 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -1001,7 +1000,7 @@ public class ProductServiceImpl implements ProductService, Constant {
vo.setRatioId(info.getPrimaryBenchmarkId()); vo.setRatioId(info.getPrimaryBenchmarkId());
vo.setInceptionDate(info.getInceptionDate() == null ? null : info.getInceptionDate().getTime()); vo.setInceptionDate(info.getInceptionDate() == null ? null : info.getInceptionDate().getTime());
vo.setFundName(info.getFundShortName()); vo.setFundName(info.getFundShortName());
vo.setNet(new Net(fundCount.getEndDate().getTime(), BigDecimalUtil.toString(fundCount.getCumulativeNav(), 4))); vo.setNet(new Net(fundCount.getEndDate().getTime(), BigDecimalUtil.toString(fundCount.getCumulativeNav(), 4), BigDecimalUtil.toString(fundCount.getCumulativeNav(), 4)));
String retIncep = multiply100(fundCount.getRetIncep()); String retIncep = multiply100(fundCount.getRetIncep());
vo.setRetIncep(retIncep == null ? "0" : retIncep); vo.setRetIncep(retIncep == null ? "0" : retIncep);
...@@ -1140,7 +1139,7 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -1140,7 +1139,7 @@ public class ProductServiceImpl implements ProductService, Constant {
vo.setIsAppoint(fundCount.getType()); vo.setIsAppoint(fundCount.getType());
// 最新净值 // 最新净值
vo.setNet(new Net(fundCount.getEndDate().getTime(), BigDecimalUtil.toString(fundCount.getNetNav(), 4))); vo.setNet(new Net(fundCount.getEndDate().getTime(), BigDecimalUtil.toString(fundCount.getNetNav(), 4), BigDecimalUtil.toString(fundCount.getCumulativeNav(), 4)));
getMinInvestmentShare(rateMappingMap, fundCount.getFundId(), vo); getMinInvestmentShare(rateMappingMap, fundCount.getFundId(), vo);
......
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