Commit f9a4de2a authored by zp's avatar zp

init

parent 529206e7
Pipeline #3558 failed with stages
# tamp_fund
文章相关微服务
\ No newline at end of file
This diff is collapsed.
package com.tanpu.fund;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;
@EnableAsync
@EnableHystrix
@SpringBootApplication
@EnableFeignClients
@EnableDiscoveryClient
@ComponentScan({
"com.tanpu.common",
"com.tanpu.fund"
})
public class FundApplication {
public static void main(String[] args) {
SpringApplication.run(FundApplication.class, args);
}
}
package com.tanpu.fund.api;
import com.tanpu.common.model.Page;
import com.tanpu.common.model.Pageable;
import com.tanpu.common.model.product.req.ProductListReq;
import com.tanpu.common.model.product.resp.*;
import com.tanpu.common.model.user.resp.SysConstantResp;
import com.tanpu.common.resp.CommonResp;
import com.tanpu.fund.api.model.req.FundQaAskReq;
import com.tanpu.fund.api.model.req.FundQaListReq;
import com.tanpu.fund.api.model.req.NetReq;
import com.tanpu.fund.api.model.req.ProductInfoReq;
import com.tanpu.fund.api.model.resp.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import java.util.List;
@Api(tags = "产品服务")
public interface ProductApi {
/**
* /sys/constant tamp_user 中的接口
* 策略需要维护到sys_constant中
*/
@ApiOperation("根据条件获取探普产品信息")
@PostMapping("/get/product/info")
CommonResp<Page<ProductInfoVO>> getProductInfo(@ApiParam("筛选条件对象") @RequestBody ProductInfoReq req);
@ApiOperation("根据条件获取非探普产品信息")
@PostMapping("/not/tanpu/product/info")
CommonResp<Page<ProductInfoVO>> getNotTanpuProductInfo(@ApiParam("筛选条件对象") @RequestBody ProductInfoReq req);
@ApiOperation("获取产品详情")
@GetMapping("/product/detail")
CommonResp<ProductInfoVO> getProductDetailInfo(@ApiParam("产品id") @RequestParam("id") String id);
@ApiOperation("单位净值")
@GetMapping("/unit/net")
CommonResp<UnitNetVO> getUnitNetInfo(@ApiParam("产品id") @RequestParam("id") String id, @ApiParam("对比基金id") @RequestParam(value = "ratioId", required = false) String ratioId,
@ApiParam("查询时间段 1:近1个月 2:近3个月 3:近6个月 4:近1年 99:成立以来") @RequestParam("type") String type);
@ApiOperation("收益走势")
@GetMapping("/profit/trend")
CommonResp<UnitNetVO> getProfitTrend(@ApiParam("产品id") @RequestParam("id") String id, @ApiParam("对比基金id") @RequestParam(value = "ratioId", required = false) String ratioId,
@ApiParam("查询时间段 1:近1个月 2:近3个月 3:近6个月 4:近1年 98:自定义 99:成立以来") @RequestParam("type") String type,
@ApiParam("开始时间") @RequestParam(value = "beginTime", required = false) Long beginTime,
@ApiParam("开始时间") @RequestParam(value = "endTime", required = false) Long endTime);
@ApiOperation("净值列表查询")
@PostMapping("/get/net/list")
CommonResp<Page<NetVO>> getNetListInfo(@ApiParam("净值列表筛选对象") @RequestBody NetReq req);
@ApiOperation("分红配送")
@GetMapping("/bonus/ratio")
CommonResp<List<BonusRatioVO>> getBonusRatioInfo(@ApiParam("产品id") @RequestParam("id") String id);
@ApiOperation("历史业绩")
@GetMapping("/track/record")
CommonResp<List<TrackRecordVO>> getTrackRecordInfo(@ApiParam("产品id") @RequestParam("id") String id);
@ApiOperation("历史净值")
@GetMapping("/track/net")
CommonResp<Page<TrackNetVO>> getTrackNetListInfo(@ApiParam("产品id") @RequestParam("id") String id, @ApiParam("分页对象") Pageable page);
@ApiOperation("风险评估")
@GetMapping("/get/risk/rating")
CommonResp<List<RiskRatingVO>> getRiskRatingInfo(@ApiParam("产品id") @RequestParam("id") String id);
@ApiOperation("基金经理")
@GetMapping("/fund/manager")
CommonResp<List<FundManagerVO>> getFundManagerInfo(@ApiParam("产品id") @RequestParam("id") String id);
@ApiOperation("基金档案")
@GetMapping("/fund/record")
CommonResp<FundRecordVO> getFundRecordInfo(@ApiParam("产品id") @RequestParam("id") String id);
@ApiOperation("基金公司")
@GetMapping("/fund/company")
CommonResp<FundCompanyVO> getFundCompanyInfo(@ApiParam("基金公司id") @RequestParam("id") String id);
@ApiOperation("产品QA提问")
@PostMapping("/QA/ask")
CommonResp<QAVO> productQaAsk(@ApiParam("问题内容") @RequestBody FundQaAskReq fundQaAskReq);
@ApiOperation("产品QA列表查询")
@PostMapping("/get/product/QA")
CommonResp<Page<QAVO>> getProductQAInfo(@ApiParam("产品QA条件信息") @RequestBody FundQaListReq fundQaAskReq);
@ApiOperation("组合列表")
@GetMapping("/fund/set/list")
CommonResp<Page<FundSetListVO>> getFundSetList(@ApiParam("策略类型") @RequestParam("strategyType") Integer strategyType, @ApiParam("分页信息") Pageable page);
@ApiOperation("组合详情")
@GetMapping("/fund/group/detail")
CommonResp<FundGroupVO> getFundGroupDetail(@ApiParam("组合id") @RequestParam("id") String id);
@ApiOperation("历史持仓日期")
@GetMapping("/track/position/dates")
CommonResp<List<Long>> getTrackPositionDates(@ApiParam(value = "基金ID") @RequestParam("id") String id);
@ApiOperation("历史持仓")
@GetMapping("/track/position")
CommonResp<TrackPositionVO> getTrackPositionDetail(@ApiParam("产品id") @RequestParam("id") String id, @ApiParam("日期") @RequestParam("date") Long date);
@ApiOperation("净值数据导入")
@PostMapping("/net/excel")
CommonResp exportNetExcel(@RequestParam("url") String url);
@ApiOperation(value = "根据产品查询标签")
@GetMapping(value = "/h5/tag/querybyrelid", produces = {"application/json"})
CommonResp<List<ProductLabel>> querytagbyrelid(@RequestParam("relId") String relId);
@ApiOperation("产品解读")
@GetMapping("/explain")
CommonResp<List<FundExplainVO>> getFundExplainInfo(@RequestParam("id") String id);
@ApiOperation("附件查询")
@GetMapping("/business/attachment")
CommonResp<List<AttachmentInfoVO>> getAttachmentInfo(@ApiParam("业务id") @RequestParam("id") String id,
@ApiParam("0 查询所有 1:公告,2:附件,3:探普研报4:赎回指南") @RequestParam("type") Integer type);
@ApiOperation("查询产品策略类型")
@GetMapping("/get/product/queryByconstantGroup")
CommonResp<List<SysConstantResp>> getProductTypes(@ApiParam(value = "产品类型 tampstrategy:探普产品 ppstrategy:私募排排产品 tampstrategy:自建产品") @RequestParam("constantGroup") String constantGroup);
@ApiOperation("根据条件获取探普产品信息")
@PostMapping("/get/product/list")
CommonResp<List<ProductInfoVO>> getProductInfolist(@ApiParam("筛选条件对象") @RequestBody ProductListReq req);
@ApiOperation("根据条件获取非探普产品信息")
@PostMapping("/not/tanpu/product/list")
CommonResp<List<ProductInfoVO>> getNotTanpuProductInfolist(@ApiParam("筛选条件对象") @RequestBody ProductListReq req);
@ApiOperation("动态回撤")
@GetMapping("/dynamic/retreat")
CommonResp<DynamicRetreatVO> getDynamicRetreatInfo(@RequestParam("id") String id);
@ApiOperation("开放日赎回日查询")
@GetMapping("/fund/date")
CommonResp<FundDateResp> getFundDateByFundIdInfo(
@ApiParam(value = "基金id", required = true) @Valid @NotEmpty(message = "基金id不能为空") @RequestParam("fundId") String fundId);
}
package com.tanpu.fund.api;
import com.tanpu.common.model.product.resp.*;
import com.tanpu.common.resp.CommonResp;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
* <p>
* 订单产品信息查询接口定义
*/
public interface ProductOrderApi {
@GetMapping("/get/fund/info")
CommonResp<List<FundInfoResp>> getFundInfos(@RequestParam("list") List<String> list);
@GetMapping("/get/new/fund/info")
CommonResp<List<FundInfoResp>> getNewFundInfos(@RequestParam("list") List<String> list);
@ApiOperation(value = "合同模板", notes = "9主合同 10子合同")
@GetMapping("/fund/contractTemplate")
CommonResp<List<AttachmentInfoVO>> getContractTemplate();
@ApiOperation("获取产品最新净值")
@GetMapping("/get/fund/lastnet")
CommonResp<List<NetBigDecimal>> getFundLastNet(@RequestParam("list") List<String> list);
@ApiOperation("文件预览地址")
@GetMapping("/get/file/preview")
CommonResp<List<FilePreviewResp>> getFilePreviewUrl(@RequestParam("list") List<String> list);
}
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.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;
}
package com.tanpu.fund.config;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import java.util.concurrent.Executor;
import java.util.concurrent.ThreadPoolExecutor;
/**
* 线程池配置类
*/
@Configuration
@EnableAsync
@Slf4j
public class ExecutorConfig {
@Value("${task.core_pool_size}")
private int taskCorePoolSize;
@Value("${task.max_pool_size}")
private int taskMaxPoolSize;
@Value("${task.queue_capacity}")
private int taskQueueCapacity;
@Value("${task.thread_name_prefix}")
private String taskThreadNamePrefix;
@Bean(name = "asyncTaskExecutor")
public Executor asyncTaskExecutor() {
log.info("start asyncUbrScanExecutor");
ThreadPoolTaskExecutor executor = new VisiableThreadPoolTaskExecutor();
//配置核心线程数
executor.setCorePoolSize(taskCorePoolSize);
//配置最大线程数
executor.setMaxPoolSize(taskMaxPoolSize);
//配置队列大小
executor.setQueueCapacity(taskQueueCapacity);
//配置线程池中的线程的名称前缀
executor.setThreadNamePrefix(taskThreadNamePrefix);
// rejection-policy:当pool已经达到max size的时候,如何处理新任务
// CALLER_RUNS:不在新线程中执行任务,而是有调用者所在的线程来执行
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
//执行初始化
executor.initialize();
return executor;
}
}
package com.tanpu.fund.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.ApiKey;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import static com.google.common.collect.Lists.newArrayList;
import static com.google.common.collect.Sets.newHashSet;
@Profile("dev")
@Configuration
@EnableSwagger2
public class Swagger2Config {
ApiInfo apiInfo() {
return new ApiInfoBuilder()
.title("探普云-产品")
.version("1.0.0")
.build();
}
@Bean
public Docket customImplementation(){
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.basePackage("com.tanpu.product"))
.build()
.protocols(newHashSet("http", "https"))
// .protocols(newHashSet("ws", "wss"))
.securitySchemes(newArrayList(basicAuth()))
.apiInfo(apiInfo())
.forCodeGeneration(true);
}
private ApiKey basicAuth() {
ApiKey apiKey = new ApiKey(JWT_AUTH_FLAG, JWT_AUTH_FLAG, "header");
return apiKey;
}
public static final String JWT_AUTH_FLAG = "jwt";
}
package com.tanpu.fund.config;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.util.concurrent.ListenableFuture;
import java.util.concurrent.Callable;
import java.util.concurrent.Future;
import java.util.concurrent.ThreadPoolExecutor;
/**
* 自定义线程池
* 提交线程的时候都会将当前线程池的运行状况打印出来
*/
@Slf4j
public class VisiableThreadPoolTaskExecutor extends ThreadPoolTaskExecutor {
/**
* 打印线程池当前信息
* 任务总数、已完成数、活跃线程数,队列大小打印出来
*
* @param prefix
*/
private void showThreadPoolInfo(String prefix) {
ThreadPoolExecutor threadPoolExecutor = getThreadPoolExecutor();
if (threadPoolExecutor == null) {
return;
}
log.info("{}, {}, taskCount [{}], completedTaskCount [{}], activeCount [{}], queueSize [{}]",
this.getThreadNamePrefix(),
prefix,
threadPoolExecutor.getTaskCount(),
threadPoolExecutor.getCompletedTaskCount(),
threadPoolExecutor.getActiveCount(),
threadPoolExecutor.getQueue().size());
}
@Override
public void execute(Runnable task) {
showThreadPoolInfo("do execute1");
super.execute(task);
}
@Override
public void execute(Runnable task, long startTimeout) {
showThreadPoolInfo("do execute2");
super.execute(task, startTimeout);
}
@Override
public Future<?> submit(Runnable task) {
showThreadPoolInfo("do submit1");
return super.submit(task);
}
@Override
public <T> Future<T> submit(Callable<T> task) {
showThreadPoolInfo("do submit2");
return super.submit(task);
}
@Override
public ListenableFuture<?> submitListenable(Runnable task) {
showThreadPoolInfo("do submitListenable1");
return super.submitListenable(task);
}
@Override
public <T> ListenableFuture<T> submitListenable(Callable<T> task) {
showThreadPoolInfo("do submitListenable2");
return super.submitListenable(task);
}
}
package com.tanpu.fund.config;
import com.tanpu.common.auth.intercept.FaLoginIntercept;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
@Slf4j
public class WebConfig implements WebMvcConfigurer {
@Autowired
private FaLoginIntercept faLoginIntercept;
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/product/**")
.allowedOrigins("*");
}
@Override
public void addInterceptors(InterceptorRegistry registry) {
// 添加一个拦截器,连接以/admin为前缀的 url路径
log.info("添加拦截器FaLoginIntercept");
registry.addInterceptor(faLoginIntercept).addPathPatterns("/**");
}
}
package com.tanpu.fund.config.apollo;
import com.ctrip.framework.apollo.Config;
import com.ctrip.framework.apollo.model.ConfigChangeEvent;
import com.ctrip.framework.apollo.spring.annotation.ApolloConfig;
import com.ctrip.framework.apollo.spring.annotation.ApolloConfigChangeListener;
import com.ctrip.framework.apollo.spring.boot.ApolloAutoConfiguration;
import com.ctrip.framework.apollo.spring.config.PropertySourcesConstants;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeansException;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.cloud.context.environment.EnvironmentChangeEvent;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import javax.annotation.PostConstruct;
import java.util.Set;
/*动态刷新日志参数配置*/
// @Component
@Slf4j
@ConditionalOnProperty(PropertySourcesConstants.APOLLO_BOOTSTRAP_ENABLED)
@AutoConfigureAfter(ApolloAutoConfiguration.class)
public class ApolloRefresherConfiguration implements ApplicationContextAware {
private ApplicationContext applicationContext;
@ApolloConfig
private Config config;
@PostConstruct
private void initialize() {
log.info("初始化配置变更监听");
refresh(config.getPropertyNames());
}
// 刷新参数(刷新"common"和"application"空间中,"logging.level."或"aniu."开头的配置 )
@ApolloConfigChangeListener(value = { "common", "application" }, interestedKeyPrefixes = { "logging.level.",
"tanpu." })
public void onChangeLogLevel(ConfigChangeEvent changeEvent) {
log.info("Refreshing logging levels and tanpu.");
for (String s : changeEvent.changedKeys()) {
log.info("refresh key:{}", s);
}
this.applicationContext.publishEvent(new EnvironmentChangeEvent(changeEvent.changedKeys()));
log.info("Logging levels and tanpu. refreshed");
}
/** 刷新参数配置 */
private void refresh(Set<String> changedKeys) {
log.info("Refreshing logging.level and tanpu. properties");
for (String changedKey : changedKeys) {
log.info("refresh key:{}", changedKey);
}
this.applicationContext.publishEvent(new EnvironmentChangeEvent(changedKeys));
log.info("logging.level properties and tanpu. refreshed");
}
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
this.applicationContext = applicationContext;
}
}
package com.tanpu.fund.config.elastic.anno;
import org.springframework.stereotype.Component;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Component
@Target({ ElementType.TYPE })
@Retention(RetentionPolicy.RUNTIME)
public @interface ElasticSimpleJob {
/********************* DataflowJobConfiguration START ********************/
/**
* 作业名称
*
* @return
*/
String name();
/**
* cron表达式,用于控制作业触发时间
*
* @return
*/
String cron() default "";
/**
* 作业分片总数
*
* @return
*/
int shardingTotalCount() default 1;
/**
* 分片序列号和参数用等号分隔,多个键值对用逗号分隔
* <p>
* 分片序列号从0开始,不可大于或等于作业分片总数
* <p>
* <p>
* 如:
* <p>
* <p>
* 0=a,1=b,2=c
* <p>
*
* @return
*/
String shardingItemParameters() default "";
/**
* 作业自定义参数
* <p>
* 作业自定义参数,可通过传递该参数为作业调度的业务方法传参,用于实现带参数的作业
* <p>
* <p>
* 例:每次获取的数据量、作业实例从数据库读取的主键等
* <p>
*
* @return
*/
String jobParameter() default "";
/**
* 是否开启任务执行失效转移,开启表示如果作业在一次任务执行中途宕机,允许将该次未完成的任务在另一作业节点上补偿执行
*
* @return
*/
boolean failover() default false;
/**
* 是否开启错过任务重新执行
*
* @return
*/
boolean misfire() default false;
/**
* 作业描述信息
*
* @return
*/
String description() default "";
boolean overwrite() default false;
/********************* DataflowJobConfiguration END ********************/
/********************* DataflowJobConfiguration START ********************/
/**
* 是否流式处理数据
* <p>
* 如果流式处理数据, 则fetchData不返回空结果将持续执行作业
* <p>
* <p>
* 如果非流式处理数据, 则处理数据完成后作业结束
* <p>
*
* @return
*/
boolean streamingProcess() default false;
/********************* DataflowJobConfiguration END ********************/
/********************* ScriptJobConfiguration START ********************/
/**
* 脚本型作业执行命令行
*
* @return
*/
String scriptCommandLine() default "";
/********************* ScriptJobConfiguration END ********************/
/********************* LiteJobConfiguration START ********************/
/**
* 监控作业运行时状态
* <p>
* 每次作业执行时间和间隔时间均非常短的情况,建议不监控作业运行时状态以提升效率。
* <p>
* <p>
* 因为是瞬时状态,所以无必要监控。请用户自行增加数据堆积监控。并且不能保证数据重复选取,应在作业中实现幂等性。
* <p>
* <p>
* 每次作业执行时间和间隔时间均较长的情况,建议监控作业运行时状态,可保证数据不会重复选取。
* <p>
*
* @return
*/
boolean monitorExecution() default true;
/**
* 作业监控端口
* <p>
* 建议配置作业监控端口, 方便开发者dump作业信息。
* <p>
* <p>
* 使用方法: echo “dump” | nc 127.0.0.1 9888
* <p>
*
* @return
*/
int monitorPort() default -1;
/**
* 大允许的本机与注册中心的时间误差秒数
* <p>
* 如果时间误差超过配置秒数则作业启动时将抛异常
* <p>
* <p>
* 配置为-1表示不校验时间误差
* <p>
*
* @return
*/
int maxTimeDiffSeconds() default -1;
/**
* 作业分片策略实现类全路径,默认使用平均分配策略
*
* @return
*/
String jobShardingStrategyClass() default "";
/**
* 修复作业服务器不一致状态服务调度间隔时间,配置为小于1的任意值表示不执行修复,单位:分钟
*
* @return
*/
int reconcileIntervalMinutes() default 10;
/**
* 作业事件追踪的数据源Bean引用
*
* @return
*/
String eventTraceRdbDataSource() default "";
/********************* LiteJobConfiguration END ********************/
/**
* 前置后置任务监听实现类,需实现ElasticJobListener接口
*
* @return
*/
String listener() default "";
/**
* 作业是否禁止启动,可用于部署作业时,先禁止启动,部署结束后统一启动
*
* @return
*/
boolean disabled() default false;
/**
* 前置后置任务分布式监听实现类,需继承AbstractDistributeOnceElasticJobListener类
*
* @return
*/
String distributedListener() default "";
/**
* 最后一个作业执行前的执行方法的超时时间,单位:毫秒
*
* @return
*/
long startedTimeoutMilliseconds() default Long.MAX_VALUE;
/**
* 最后一个作业执行后的执行方法的超时时间,单位:毫秒
*
* @return
*/
long completedTimeoutMilliseconds() default Long.MAX_VALUE;
/**
* 自定义异常处理类
*
* @return
*/
String jobExceptionHandler() default "com.dangdang.ddframe.job.executor.handler.impl.DefaultJobExceptionHandler";
/**
* 自定义业务处理线程池
*
* @return
*/
String executorServiceHandler() default "com.dangdang.ddframe.job.executor.handler.impl.DefaultExecutorServiceHandler";
}
//package com.tanpu.product.config.elastic.anno;
//
//import com.tanpu.product.config.elastic.autoconfigure.ElasticJobParserAutoConfiguration;
//import org.springframework.context.annotation.Import;
//
//import java.lang.annotation.*;
//
//@Target({ElementType.TYPE})
//@Retention(RetentionPolicy.RUNTIME)
//@Documented
//@Inherited
//@Import({ElasticJobParserAutoConfiguration.class})
//public @interface EnableElasticJob {
//
//}
package com.tanpu.fund.config.elastic.autoconfigure;
import org.apache.commons.lang3.StringUtils;
import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.env.Environment;
import org.springframework.core.type.AnnotatedTypeMetadata;
/**
* elastic初始化条件判断
*/
public class ElasticCondition implements Condition {
private String serverListName1 = "serverLists";
private String serverListName2 = "server-lists";
@Override
public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
Environment environment = context.getEnvironment();
String serverLists = environment.getProperty(ElasticContants.PROPPREFIX + "." + serverListName1,
environment.getProperty(ElasticContants.PROPPREFIX + "." + serverListName2, ""));
if (StringUtils.isBlank(serverLists)) {
return false;
}
return true;
}
}
package com.tanpu.fund.config.elastic.autoconfigure;
/**
* 常量类
*/
public class ElasticContants {
/**
* 配置统一前缀
*/
public static final String PROPPREFIX = "elastic.job.zk";
}
package com.tanpu.fund.config.elastic.autoconfigure;
/**
* 常量类
*/
public class ElasticJobAttributeTag {
public static final String CRON = "cron";
public static final String SHARDING_TOTAL_COUNT = "shardingTotalCount";
public static final String SHARDING_ITEM_PARAMETERS = "shardingItemParameters";
public static final String JOB_PARAMETER = "jobParameter";
public static final String MONITOR_EXECUTION = "monitorExecution";
public static final String MONITOR_PORT = "monitorPort";
public static final String FAILOVER = "failover";
public static final String MAX_TIME_DIFF_SECONDS = "maxTimeDiffSeconds";
public static final String MISFIRE = "misfire";
public static final String JOB_SHARDING_STRATEGY_CLASS = "jobShardingStrategyClass";
public static final String DESCRIPTION = "description";
public static final String DISABLED = "disabled";
public static final String OVERWRITE = "overwrite";
public static final String LISTENER = "listener";
public static final String DISTRIBUTED_LISTENER = "distributedListener";
public static final String DISTRIBUTED_LISTENER_STARTED_TIMEOUT_MILLISECONDS = "startedTimeoutMilliseconds";
public static final String DISTRIBUTED_LISTENER_COMPLETED_TIMEOUT_MILLISECONDS = "completedTimeoutMilliseconds";
public static final String EXECUTOR_SERVICE_HANDLER = "executorServiceHandler";
public static final String JOB_EXCEPTION_HANDLER = "jobExceptionHandler";
public static final String EVENT_TRACE_RDB_DATA_SOURCE = "eventTraceRdbDataSource";
public static final String RECONCILE_INTERVAL_MINUTES = "reconcileIntervalMinutes";
public static final String SCRIPT_COMMAND_LINE = "scriptCommandLine";
public static final String STREAMING_PROCESS = "streamingProcess";
}
//package com.tanpu.product.config.elastic.autoconfigure;
//
//import com.dangdang.ddframe.job.reg.zookeeper.ZookeeperConfiguration;
//import com.dangdang.ddframe.job.reg.zookeeper.ZookeeperRegistryCenter;
//import com.tanpu.product.config.elastic.parse.ElasticJobConfParser;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.context.properties.EnableConfigurationProperties;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Conditional;
//import org.springframework.context.annotation.Configuration;
//
///**
// * 任务自动配置
// *
// * @author yinjihuan
// * @about http://cxytiandi.com/about
// */
//@Configuration
//@Conditional(ElasticCondition.class)
//@EnableConfigurationProperties(ZookeeperProperties.class)
//public class ElasticJobParserAutoConfiguration {
//
// @Autowired
// private ZookeeperProperties zookeeperProperties;
//
// /**
// * 初始化Zookeeper注册中心
// *
// * @return
// */
// @Bean(initMethod = "init")
// public ZookeeperRegistryCenter zookeeperRegistryCenter() {
// ZookeeperConfiguration zkConfig = new ZookeeperConfiguration(zookeeperProperties.getServerLists(),
// zookeeperProperties.getNamespace());
// zkConfig.setBaseSleepTimeMilliseconds(zookeeperProperties.getBaseSleepTimeMilliseconds());
// zkConfig.setConnectionTimeoutMilliseconds(zookeeperProperties.getConnectionTimeoutMilliseconds());
// zkConfig.setDigest(zookeeperProperties.getDigest());
// zkConfig.setMaxRetries(zookeeperProperties.getMaxRetries());
// zkConfig.setMaxSleepTimeMilliseconds(zookeeperProperties.getMaxSleepTimeMilliseconds());
// zkConfig.setSessionTimeoutMilliseconds(zookeeperProperties.getSessionTimeoutMilliseconds());
// return new ZookeeperRegistryCenter(zkConfig);
// }
//
// /**
// * 任务解析类
// */
// @Bean
// public ElasticJobConfParser elasticJobConfParser() {
// return new ElasticJobConfParser();
// }
//
//}
\ No newline at end of file
package com.tanpu.fund.config.elastic.autoconfigure;
import org.springframework.boot.context.properties.ConfigurationProperties;
@ConfigurationProperties(prefix = ElasticContants.PROPPREFIX)
public class ZookeeperProperties {
/**
* 连接Zookeeper服务器的列表. 包括IP地址和端口号. 多个地址用逗号分隔. 如: host1:2181,host2:2181
*/
private String serverLists;
/**
* 命名空间.
*/
private String namespace;
/**
* 等待重试的间隔时间的初始值. 单位毫秒.
*/
private int baseSleepTimeMilliseconds = 1000;
/**
* 等待重试的间隔时间的最大值. 单位毫秒.
*/
private int maxSleepTimeMilliseconds = 3000;
/**
* 最大重试次数.
*/
private int maxRetries = 3;
/**
* 会话超时时间. 单位毫秒.
*/
private int sessionTimeoutMilliseconds;
/**
* 连接超时时间. 单位毫秒.
*/
private int connectionTimeoutMilliseconds;
/**
* 连接Zookeeper的权限令牌. 缺省为不需要权限验证.
*/
private String digest;
public String getServerLists() {
return serverLists;
}
public void setServerLists(String serverLists) {
this.serverLists = serverLists;
}
public String getNamespace() {
return namespace;
}
public void setNamespace(String namespace) {
this.namespace = namespace;
}
public int getBaseSleepTimeMilliseconds() {
return baseSleepTimeMilliseconds;
}
public void setBaseSleepTimeMilliseconds(int baseSleepTimeMilliseconds) {
this.baseSleepTimeMilliseconds = baseSleepTimeMilliseconds;
}
public int getMaxSleepTimeMilliseconds() {
return maxSleepTimeMilliseconds;
}
public void setMaxSleepTimeMilliseconds(int maxSleepTimeMilliseconds) {
this.maxSleepTimeMilliseconds = maxSleepTimeMilliseconds;
}
public int getMaxRetries() {
return maxRetries;
}
public void setMaxRetries(int maxRetries) {
this.maxRetries = maxRetries;
}
public int getSessionTimeoutMilliseconds() {
return sessionTimeoutMilliseconds;
}
public void setSessionTimeoutMilliseconds(int sessionTimeoutMilliseconds) {
this.sessionTimeoutMilliseconds = sessionTimeoutMilliseconds;
}
public int getConnectionTimeoutMilliseconds() {
return connectionTimeoutMilliseconds;
}
public void setConnectionTimeoutMilliseconds(int connectionTimeoutMilliseconds) {
this.connectionTimeoutMilliseconds = connectionTimeoutMilliseconds;
}
public String getDigest() {
return digest;
}
public void setDigest(String digest) {
this.digest = digest;
}
}
\ No newline at end of file
package com.tanpu.fund.config.log;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.tanpu.common.exception.TanPuException;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import java.net.URLDecoder;
/**
* @description:
* @author: wanglei
* @created: 2020/04/16 22:40
*/
@Aspect
@Configuration
@Slf4j
public class LoggerAspect {
// 定义切点Pointcut
@Pointcut("execution(* com.tanpu.fund.controller..*.*(..))")
public void executeService() {
}
@Around("executeService()")
public Object doAround(ProceedingJoinPoint pjp) throws Throwable {
long start = System.currentTimeMillis();
Object result = null;
try {
RequestAttributes ra = RequestContextHolder.getRequestAttributes();
ServletRequestAttributes sra = (ServletRequestAttributes) ra;
HttpServletRequest request = sra.getRequest();
String url = request.getRequestURI();
String method = request.getMethod();
String params = "";
if ("POST".equals(method) || "PUT".equals(method)) {
Object[] args = pjp.getArgs();
Object[] arguments = new Object[args.length];
for (int i = 0; i < args.length; i++) {
if (args[i] instanceof ServletRequest || args[i] instanceof ServletResponse || args[i] instanceof MultipartFile) {
//ServletRequest不能序列化,从入参里排除,否则报异常:java.lang.IllegalStateException: It is illegal to call this method if the current request is not in asynchronous mode (i.e. isAsyncStarted() returns false)
//ServletResponse不能序列化 从入参里排除,否则报异常:java.lang.IllegalStateException: getOutputStream() has already been called for this response
continue;
}
arguments[i] = args[i];
}
//获取请求参数集合并进行遍历拼接
if (arguments.length > 0) {
params = JSONObject.toJSONString(arguments);
}
} else if ("GET".equals(method)) {
if (StringUtils.isNotBlank(request.getQueryString())) {
params = URLDecoder.decode(request.getQueryString(), "UTF-8");
}
}
log.info("请求开始===地址{},类型:{},参数:{}", url, method, params);
// result的值就是被拦截方法的返回值
result = pjp.proceed();
log.info("返回值:{}", JSON.toJSON(result));
} catch (TanPuException e) {
log.info("处理失败 :{}", e.getMessage());
throw e;
} catch (Throwable e) {
throw e;
} finally {
log.info("耗时:{}", System.currentTimeMillis() - start);
}
return result;
}
}
\ No newline at end of file
package com.tanpu.fund.controller;
import com.tanpu.common.auth.mapping.TanpuInterfaceLoginAuth;
import com.tanpu.common.model.Page;
import com.tanpu.common.model.Pageable;
import com.tanpu.common.model.product.req.ProductListReq;
import com.tanpu.common.model.product.resp.*;
import com.tanpu.common.model.user.resp.SysConstantResp;
import com.tanpu.common.resp.CommonResp;
import com.tanpu.fund.api.ProductApi;
import com.tanpu.fund.api.model.req.FundQaAskReq;
import com.tanpu.fund.api.model.req.FundQaListReq;
import com.tanpu.fund.api.model.req.NetReq;
import com.tanpu.fund.api.model.req.ProductInfoReq;
import com.tanpu.fund.api.model.resp.*;
import com.tanpu.fund.feign.user.FeignClientForFatools;
import com.tanpu.fund.service.FundCombineInfoService;
import com.tanpu.fund.service.FundHistoryHoldService;
import com.tanpu.fund.service.FundQAService;
import com.tanpu.fund.service.ProductService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
@RestController
@Slf4j
public class ProductController implements ProductApi {
@Resource
private FundHistoryHoldService fundHistoryHoldService;
@Resource
private ProductService productService;
@Resource
private FundCombineInfoService fundCombineInfoService;
@Resource
private FundQAService fundQAService;
@Resource
private FeignClientForFatools feignClientForFatools;
@Override
public CommonResp<Page<ProductInfoVO>> getProductInfo(ProductInfoReq req) {
return CommonResp.success(this.productService.getProductList(req));
}
@Override
public CommonResp<Page<ProductInfoVO>> getNotTanpuProductInfo(ProductInfoReq req) {
return CommonResp.success(this.productService.getNotTanpuProduct(req));
}
@Override
public CommonResp<ProductInfoVO> getProductDetailInfo(String id) {
return CommonResp.success(this.productService.getProductDetail(id));
}
@Override
public CommonResp<UnitNetVO> getUnitNetInfo(String id, String ratioId, String type) {
return CommonResp.success(this.productService.getUnitNet(id, ratioId, type));
}
@Override
public CommonResp<UnitNetVO> getProfitTrend(String id, String ratioId, String type, Long beginTime, Long endTime) {
return CommonResp.success(this.productService.getProfitTrend(id, ratioId, type, beginTime, endTime));
}
@Override
public CommonResp<Page<NetVO>> getNetListInfo(NetReq req) {
return CommonResp.success(this.productService.getNetList(req));
}
@Override
public CommonResp<List<BonusRatioVO>> getBonusRatioInfo(String id) {
return CommonResp.success(this.productService.getBonusRatio(id));
}
@Override
public CommonResp<List<TrackRecordVO>> getTrackRecordInfo(String id) {
return CommonResp.success(this.productService.getTrackRecord(id));
}
@Override
public CommonResp<Page<TrackNetVO>> getTrackNetListInfo(String id, Pageable page) {
return CommonResp.success(this.productService.getTrackNetList(id, page));
}
@Override
public CommonResp<List<RiskRatingVO>> getRiskRatingInfo(String id) {
return CommonResp.success(this.productService.getRiskRating(id));
}
@Override
public CommonResp<List<FundManagerVO>> getFundManagerInfo(String id) {
return CommonResp.success(this.productService.getFundManager(id));
}
@Override
public CommonResp<FundRecordVO> getFundRecordInfo(String id) {
return CommonResp.success(this.productService.getFundRecord(id));
}
@Override
public CommonResp<FundCompanyVO> getFundCompanyInfo(String id) {
return CommonResp.success(this.productService.getFundCompany(id));
}
@Override
@TanpuInterfaceLoginAuth
public CommonResp<QAVO> productQaAsk(FundQaAskReq fundQaAskReq) {
if (StringUtils.isEmpty(fundQaAskReq.getFundId())
|| StringUtils.isEmpty(fundQaAskReq.getContent())) {
return CommonResp.error(CommonResp.PARAMETER_INVALID_STATUS_CODE, CommonResp.PARAMETER_INVALID_MESSAGE);
}
QAVO qavo = this.fundQAService.productQaAsk(fundQaAskReq);
return CommonResp.success(qavo);
}
@Override
public CommonResp<Page<QAVO>> getProductQAInfo(FundQaListReq fundQaAskReq) {
Page<QAVO> productQAInfo = this.fundQAService.getProductQAInfo(fundQaAskReq.getFundId(), fundQaAskReq.getPage());
return CommonResp.success(productQAInfo);
}
@Override
public CommonResp<Page<FundSetListVO>> getFundSetList(Integer strategyType, Pageable page) {
if (strategyType == null) {
return CommonResp.error(CommonResp.PARAMETER_INVALID_STATUS_CODE, CommonResp.PARAMETER_INVALID_MESSAGE);
}
Page<FundSetListVO> fundSetListVOPage = this.fundCombineInfoService.queryFundCombines(strategyType, page);
return CommonResp.success(fundSetListVOPage);
}
@Override
public CommonResp<FundGroupVO> getFundGroupDetail(String id) {
FundGroupVO detail = this.fundCombineInfoService.detail(id);
return CommonResp.success(detail);
}
@Override
public CommonResp<List<Long>> getTrackPositionDates(String id) {
List<Long> trackPositionDates = this.fundHistoryHoldService.getTrackPositionDates(id);
return CommonResp.success(trackPositionDates);
}
@Override
public CommonResp<TrackPositionVO> getTrackPositionDetail(String id, Long date) {
TrackPositionVO trackPositionDetail = this.fundHistoryHoldService.getTrackPositionDetail(id, date);
return CommonResp.success(trackPositionDetail);
}
@Override
public CommonResp exportNetExcel(String url) {
if (StringUtils.isEmpty(url)) {
return CommonResp.error();
} else {
return CommonResp.success();
}
}
@Override
public CommonResp<List<ProductLabel>> querytagbyrelid(String relId) {
return this.feignClientForFatools.querytagbyrelid(relId);
}
@Override
public CommonResp<List<FundExplainVO>> getFundExplainInfo(String id) {
return CommonResp.success(this.productService.getFundExplain(id));
}
@Override
public CommonResp<List<AttachmentInfoVO>> getAttachmentInfo(String id, Integer type) {
return CommonResp.success(this.productService.getAttachment(id, type));
}
@Override
public CommonResp<List<SysConstantResp>> getProductTypes(String constantGroup) {
return this.feignClientForFatools.queryLabels(constantGroup);
}
@Override
public CommonResp<List<ProductInfoVO>> getProductInfolist(ProductListReq req) {
List<ProductInfoVO> productInfolist = this.productService.getProductInfolist(req);
return CommonResp.success(productInfolist);
}
@Override
public CommonResp<List<ProductInfoVO>> getNotTanpuProductInfolist(ProductListReq req) {
List<ProductInfoVO> notTanpuProductInfolist = this.productService.getNotTanpuProductInfolist(req);
return CommonResp.success(notTanpuProductInfolist);
}
@Override
public CommonResp<DynamicRetreatVO> getDynamicRetreatInfo(String id) {
return CommonResp.success(this.productService.getDynamicRetreat(id));
}
@Override
public CommonResp<FundDateResp> getFundDateByFundIdInfo(String fundId) {
return CommonResp.success(this.productService.getFundDateByFundId(fundId));
}
}
package com.tanpu.fund.controller;
import com.tanpu.common.model.product.resp.*;
import com.tanpu.common.resp.CommonResp;
import com.tanpu.fund.api.ProductOrderApi;
import com.tanpu.fund.service.ProductOrderService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
@RestController
public class ProductOrderController implements ProductOrderApi {
@Resource
private ProductOrderService productOrderService;
@Override
public CommonResp<List<FundInfoResp>> getFundInfos(List<String> list) {
return CommonResp.success(this.productOrderService.getFundInfos(list));
}
@Override
public CommonResp<List<FundInfoResp>> getNewFundInfos(List<String> list) {
return CommonResp.success(this.productOrderService.getNewFundInfos(list));
}
@Override
public CommonResp<List<AttachmentInfoVO>> getContractTemplate() {
return CommonResp.success(productOrderService.getContractTemplate());
}
@Override
public CommonResp<List<NetBigDecimal>> getFundLastNet(List<String> list) {
if (CollectionUtils.isEmpty(list)) {
return CommonResp.error(CommonResp.PARAMETER_INVALID_STATUS_CODE, CommonResp.PARAMETER_INVALID_MESSAGE);
}
return CommonResp.success(this.productOrderService.getFundLastNet(list));
}
@Override
public CommonResp<List<FilePreviewResp>> getFilePreviewUrl(List<String> list) {
return CommonResp.success(this.productOrderService.getFilePreview(list));
}
}
package com.tanpu.fund.entity.customize;
import lombok.Builder;
import lombok.Data;
import lombok.ToString;
import java.util.List;
import java.util.Map;
@Data
@Builder
@ToString
public class FundNavCount {
private String navType;
private List<Map<String, Object>> fundNavList;
}
package com.tanpu.fund.entity.generator;
import java.math.BigDecimal;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
/**
* 公司基本信息表
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class CompanyInfo {
private String id;
/**
* 公司id
*/
private String pCompanyId;
/**
* 公司中文全称
*/
private String companyName;
/**
* 公司中文简称
*/
private String companyShortName;
/**
* 基金管理人全称(英文)
*/
private String companyEnglishName;
/**
* 公司类型:1-私募证券投资、2-公募基金公司、3-银行、4-证券公司、5-信托公司、6-审计机构,7-法律顾问,8-投资顾问,9-行政管理人,10-上市公司,11-期货公司,12-基金公司子公司,13工作室,14-私募股权投资,15-证券公司子公司,16-期货公司子公司,17-私募创业投资,-1-私募其他投资
*/
private Integer companyType;
/**
* 组织机构代码
*/
private String organizationNumber;
/**
* 公司成立日期
*/
private Date establishDate;
/**
* 公司注册国家:1-中国大陆、2-香港、3-新加坡、4-开曼群岛、5-台湾、6-英属维尔京群岛BVI、-1-其他
*/
private Integer domicileId;
/**
* 公司注册地址
*/
private String companyAddress;
/**
* 办公地址
*/
private String companyAddress2;
/**
* 城市
*/
private String city;
/**
* 省
*/
private String province;
/**
* 国家
*/
private String country;
/**
* 注册城市
*/
private String regCity;
/**
* 注册省
*/
private String regProvince;
/**
* 注册国家
*/
private String regCountry;
/**
* 联系电话
*/
private String contactPhone;
/**
* 邮政编码
*/
private String postCode;
/**
* 传真
*/
private String fax;
/**
* 邮箱
*/
private String email;
/**
* 公司网址
*/
private String website;
/**
* 公司注册资本,<量纲:万元>
*/
private BigDecimal registeredCapital;
/**
* 是否有海外基金,0-否,1-是,-1-其他
*/
private Integer offshoreFund;
/**
* 公司状态:1-运行;2-注销
*/
private Integer companyStatus;
/**
* 公司注册资本货币单位:1-人民币,2-港币,3-美元,-1-其他
*/
private Integer baseCurrencyCrc;
/**
* 备案编码
*/
private String registerNumber;
/**
* 备案状态:0-未备案,1-备案注销,2-备案存续
*/
private Integer registerStatus;
/**
* 备案日期
*/
private Date registerDate;
/**
* 备案地址
*/
private String registerNumberAddress;
/**
* 是否会员:1-是,0-否
*/
private Byte isMember;
/**
* 入会时间
*/
private Date joinDate;
/**
* 会员类型:1-普通会员、2-联席会员、3-观察会员、4-特别会员
*/
private Integer memberType;
/**
* 管理基金主要类别(与中基协同步)
*/
private String fundCategoryOri;
/**
* 业务类型
*/
private String businessType;
/**
* 企业性质:1 中外合作企业 2中外合资企业 3内资企业 4境外机构 5外商独资企业 6政府机构
*/
private Integer natureBusinessType;
/**
* 注册资本实缴比例
*/
private BigDecimal capitalPaidRate;
/**
* 公司logo
*/
private String logo;
/**
* 公司是否在前台可见
*/
private Integer isvisible;
/**
* 实缴资本(万元)(人民币)
*/
private BigDecimal paidCapital;
/**
* 公司资产规模 1:0-1亿 2:1-10亿 3:10-20亿 4:20-50亿 5:50-100亿 6:100亿以上
*/
private Integer companyAssetSize;
/**
* 法人代表
*/
private String legalRepresentative;
/**
* 是否认证 0:否 1:是
*/
private Integer isQualify;
/**
* 法人从业资格获得方式
*/
private String getQualifyMethod;
/**
* 员工人数
*/
private Integer employeeCnts;
/**
* 信信息
*/
private String integrityInfo;
/**
* 提示信息
*/
private String specialTips;
/**
* 协会网站链接
*/
private String amacLink;
/**
* 创建时间
*/
private Date createTime;
/**
* 创建人
*/
private String createBy;
/**
* 修改时间
*/
private Date updateTime;
/**
* 修改人
*/
private String updateBy;
/**
* 删除标识
*/
private Integer deleteTag;
/**
* 公司简介
*/
private String companyProfile;
/**
* 投资理念
*/
private String philosopy;
/**
* 法人代表履历
*/
private String representativeExperience;
}
\ No newline at end of file
package com.tanpu.fund.entity.generator;
import java.math.BigDecimal;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
/**
* 公司管理资产及人员变动统计
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class CompanyTnaPersonnel {
/**
* 公司id
*/
private String companyId;
/**
* 统计日期
*/
private Date statDate;
/**
* 信托管理总资产规模,<量纲:亿元>
*/
private BigDecimal trustFundAssetSize;
/**
* 专户管理总资产规模,<量纲:亿元>
*/
private BigDecimal specialAccountAssetSize;
/**
* 有限合伙管理总资产规模,<量纲:亿元>
*/
private BigDecimal ltdcoFundAssetSize;
/**
* 海外基金管理总资产规模,<量纲:亿元>
*/
private BigDecimal offshoreFundAssetSize;
/**
* 基金总数
*/
private Integer fundNum;
/**
* 公司人数
*/
private Integer staffNum;
/**
* 投研人员数
*/
private Integer analystNum;
/**
* 管理总资产规模,<量纲:亿元>
*/
private BigDecimal totalAssetSize;
private String createBy;
private Date createTime;
private String updateBy;
private Date updateTime;
private Integer deleteTag;
}
\ No newline at end of file
package com.tanpu.fund.entity.generator;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Builder;
import lombok.Data;
/**
* 合同及指南管理
*/
@Data
@Builder
public class ContractTemplateManage {
/**
* 唯一主键
*/
private String id;
/**
* 产品id
*/
private String fundId;
/**
* 交易规则
*/
private String tradingRules;
/**
* 基金总费用-认/申购费
*/
private String expenseSubscription;
/**
* 认购费用
*/
private BigDecimal expenseRatio;
/**
* 基金总费用-管理费
*/
private String expenseManage;
/**
* 基金管理费用
*/
private BigDecimal expenseManageRatio;
/**
* 基金总费用-业绩报酬
*/
private String expenseAchievement;
/**
* 基金总费用-业绩报酬比例
*/
private BigDecimal expenseAchievementRatio;
/**
* 理财师分成-认/申购费
*/
private String ifaSubscription;
/**
* 理财师分成-认/申购费比例
*/
private BigDecimal ifaSubscriptionRatio;
/**
* 理财师分成-管理费
*/
private String ifaManage;
/**
* 理财师分成-管理费比例
*/
private BigDecimal ifaManageRatio;
/**
* 理财师分成-业绩报酬
*/
private String ifaAchievement;
/**
* 理财师分成-业绩报酬比例
*/
private BigDecimal ifaAchievementRatio;
private Date createTime;
private String creartBy;
private Date updateTime;
private String updateBy;
/**
* 删除标志位:0:未删除,1:已删除
*/
private Integer deleteTag;
}
\ No newline at end of file
package com.tanpu.fund.entity.generator;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
/**
* 文件描述
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class FileDesc {
private String id;
/**
* 文件id
*/
private String relId;
private String createBy;
private Date createTime;
private String updateBy;
private Date updateTime;
private Integer deleteTag;
private String info;
}
\ No newline at end of file
package com.tanpu.fund.entity.generator;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 基金托管银行信息
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class FundBank {
private String fundId;
/**
* 银行code
*/
private String bankCode;
private String bankId;
/**
* 银行名称
*/
private String bankName;
/**
* 账号id
*/
private String fundAccount;
/**
* 户名
*/
private String accountName;
private String createBy;
private Date createTime;
private String updateBy;
private Date updateTime;
private Integer deleteTag;
}
\ No newline at end of file
package com.tanpu.fund.entity.generator;
import com.tanpu.common.id.AutoId;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class FundCombineInfo {
public static final String TABLE_NAME = "fund_combine_info";
/**
*
*/
@AutoId(value = AutoId.IdType.SNOWFLAKE)
private String id;
/**
* 组合基金id
*/
private String pFundId;
/**
* 基金id
*/
private String fundId;
/**
* 最新变动日期
*/
private Date changeDate;
/**
* 占比
*/
private BigDecimal proportionRatio;
/**
* 较上次推荐持仓变动
*/
private BigDecimal compareLast;
/**
* 组合基金标识 0:当前组合 1:历史组合
*/
private Integer flag;
/**
*
*/
private Date createTime;
/**
*
*/
private String createBy;
/**
*
*/
private Date updateTime;
/**
*
*/
private String updateBy;
/**
*
*/
private Integer deleteTag;
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", pFundId=").append(pFundId);
sb.append(", fundId=").append(fundId);
sb.append(", changeDate=").append(changeDate);
sb.append(", proportionRatio=").append(proportionRatio);
sb.append(", compareLast=").append(compareLast);
sb.append(", flag=").append(flag);
sb.append(", createTime=").append(createTime);
sb.append(", createBy=").append(createBy);
sb.append(", updateTime=").append(updateTime);
sb.append(", updateBy=").append(updateBy);
sb.append(", deleteTag=").append(deleteTag);
sb.append("]");
return sb.toString();
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table fund_combine_info
*
* @mbg.generated Thu Sep 17 20:59:50 CST 2020
*/
public enum Column {
id("id", "id", "VARCHAR", false),
pFundId("p_fund_id", "pFundId", "VARCHAR", false),
fundId("fund_id", "fundId", "VARCHAR", false),
changeDate("change_date", "changeDate", "DATE", false),
proportionRatio("proportion_ratio", "proportionRatio", "DECIMAL", false),
compareLast("compare_last", "compareLast", "DECIMAL", false),
flag("flag", "flag", "INTEGER", false),
createTime("create_time", "createTime", "TIMESTAMP", false),
createBy("create_by", "createBy", "VARCHAR", false),
updateTime("update_time", "updateTime", "TIMESTAMP", false),
updateBy("update_by", "updateBy", "VARCHAR", false),
deleteTag("delete_tag", "deleteTag", "INTEGER", false);
private static final String BEGINNING_DELIMITER = "\"";
private static final String ENDING_DELIMITER = "\"";
private final String column;
private final boolean isColumnNameDelimited;
private final String javaProperty;
private final String jdbcType;
public String value() {
return this.column;
}
public String getValue() {
return this.column;
}
public String getJavaProperty() {
return this.javaProperty;
}
public String getJdbcType() {
return this.jdbcType;
}
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
this.column = column;
this.javaProperty = javaProperty;
this.jdbcType = jdbcType;
this.isColumnNameDelimited = isColumnNameDelimited;
}
public String desc() {
return this.getEscapedColumnName() + " DESC";
}
public String asc() {
return this.getEscapedColumnName() + " ASC";
}
public static Column[] excludes(Column ... excludes) {
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
if (excludes != null && excludes.length > 0) {
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
}
return columns.toArray(new Column[]{});
}
public static Column[] all() {
return Column.values();
}
public String getEscapedColumnName() {
if (this.isColumnNameDelimited) {
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
} else {
return this.column;
}
}
public String getAliasedEscapedColumnName() {
return this.getEscapedColumnName();
}
}
}
\ No newline at end of file
package com.tanpu.fund.entity.generator;
import java.math.BigDecimal;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
/**
* 组合基金变动历史
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class FundCombineInfoHistory {
private String id;
/**
* 组合基金id
*/
private String pFundId;
/**
* 基金id
*/
private String fundId;
/**
* 变动日期
*/
private Date changeDate;
/**
* 占比
*/
private BigDecimal proportionRatio;
/**
* 较上次推荐持仓变动
*/
private BigDecimal compareLast;
private Date createTime;
private String createBy;
private Date updateTime;
private String updateBy;
private Integer deleteTag;
}
\ No newline at end of file
This diff is collapsed.
package com.tanpu.fund.entity.generator;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author: zhoupeng
* <p>
* =========================================
* =========================================
* ======== ========
* ======= ========== ======= =======
* ====== ===== == ==== ======
* ===== ===== == === =====
* ===== ===== == === =====
* ===== ===== == === =====
* ====== ========== == ======
* ======= =======
* =========================================
* =========================================
* <p>
* @email: zhoupeng_08@163.com
*/
/**
* 基金开放日赎回日
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class FundDate {
private String id;
private String fundId;
/**
* 1:开放日 2:临时开发日 3:赎回日
*/
private Integer type;
/**
* 日期
*/
private Date date;
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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