Commit c079d52f authored by 张亚辉's avatar 张亚辉

策略类型

parent 0d959728
package com.tanpu.fund.enums;
public enum ProStrategyEnums {
SHARES(1, "股票策略"),
MACROSCOPIC(2, "宏观策略"),
FUTURES(3, "管理期货"),
EVENTDRIVEN(4, "事件驱动"),
RELATIVEVALUE(5, "相对价值策略"),
FIXEDINCOME(6, "固定收益策略"),
COMBINEFUND(7, "组合基金"),
REUNITEWIT(8, "复合策略"),
OTHER(-1, "复合策略");
private Integer type;
private String name;
ProStrategyEnums(Integer type, String name) {
this.type = type;
this.name = name;
}
public Integer getType() {
return type;
}
public String getName() {
return name;
}
public static String getName(Integer code) {
ProStrategyEnums[] types = values();
for (ProStrategyEnums p : types) {
if (code.equals(p.getType())) {
return p.getName();
}
}
return null;
}
}
...@@ -8,6 +8,7 @@ import com.tanpu.common.auth.UserInfoThreadLocalHolder; ...@@ -8,6 +8,7 @@ import com.tanpu.common.auth.UserInfoThreadLocalHolder;
import com.tanpu.common.enums.BizEnums; import com.tanpu.common.enums.BizEnums;
import com.tanpu.common.enums.Constant; import com.tanpu.common.enums.Constant;
import com.tanpu.common.enums.SysConstEnums; import com.tanpu.common.enums.SysConstEnums;
import com.tanpu.common.enums.product.ProductEnums;
import com.tanpu.common.model.Page; import com.tanpu.common.model.Page;
import com.tanpu.common.model.Pageable; import com.tanpu.common.model.Pageable;
import com.tanpu.common.model.product.FundInfoVO; import com.tanpu.common.model.product.FundInfoVO;
...@@ -20,7 +21,6 @@ import com.tanpu.common.resp.CommonResp; ...@@ -20,7 +21,6 @@ import com.tanpu.common.resp.CommonResp;
import com.tanpu.common.utils.BigDecimalUtil; import com.tanpu.common.utils.BigDecimalUtil;
import com.tanpu.fund.entity.generator.*; import com.tanpu.fund.entity.generator.*;
import com.tanpu.fund.enums.FilterTypeEnum; import com.tanpu.fund.enums.FilterTypeEnum;
import com.tanpu.fund.enums.ProStrategyEnums;
import com.tanpu.fund.feign.diagnose.FeignClientForDiagnose; import com.tanpu.fund.feign.diagnose.FeignClientForDiagnose;
import com.tanpu.fund.feign.user.FeignClientForFatools; import com.tanpu.fund.feign.user.FeignClientForFatools;
import com.tanpu.fund.mapper.generator.*; import com.tanpu.fund.mapper.generator.*;
...@@ -564,7 +564,7 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -564,7 +564,7 @@ public class ProductServiceImpl implements ProductService, Constant {
FundCountExample.Criteria criteria = example.createCriteria() FundCountExample.Criteria criteria = example.createCriteria()
// .andStatusEqualTo(ONE_NUM).andDataSourcesEqualTo(ONE_NUM) // .andStatusEqualTo(ONE_NUM).andDataSourcesEqualTo(ONE_NUM)
// .andDeleteTagEqualTo(ZERO_NUM) // .andDeleteTagEqualTo(ZERO_NUM)
.andStrategyNotEqualTo(SEVEN_NUM); .andSubstrategyNotEqualTo(ProductEnums.FundSubStrategyEnum.COMBINATION.subStrategy);
if (CollectionUtils.isNotEmpty(req.getList())) { if (CollectionUtils.isNotEmpty(req.getList())) {
criteria.andSubstrategyIn(req.getList().stream().map(Integer::parseInt).collect(Collectors.toList())); criteria.andSubstrategyIn(req.getList().stream().map(Integer::parseInt).collect(Collectors.toList()));
...@@ -979,7 +979,7 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -979,7 +979,7 @@ public class ProductServiceImpl implements ProductService, Constant {
// 产品类型 // 产品类型
{ {
vo.setFundType(fundInfo.getFundType()); vo.setFundType(fundInfo.getFundType());
vo.setFundTypeValue(ProStrategyEnums.getName(fundInfo.getFundType())); vo.setFundTypeValue(ProductEnums.FundSubStrategyEnum.getBySubStrategy(fundInfo.getFundType()));
} }
return vo; return vo;
...@@ -1265,7 +1265,7 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -1265,7 +1265,7 @@ public class ProductServiceImpl implements ProductService, Constant {
FundCountExample example = new FundCountExample(); FundCountExample example = new FundCountExample();
FundCountExample.Criteria criteria = example.createCriteria().andDataSourcesEqualTo(ONE_NUM) FundCountExample.Criteria criteria = example.createCriteria().andDataSourcesEqualTo(ONE_NUM)
// .andStatusEqualTo(ONE_NUM) // .andStatusEqualTo(ONE_NUM)
.andStrategyNotEqualTo(7) .andSubstrategyNotEqualTo(ProductEnums.FundSubStrategyEnum.COMBINATION.subStrategy)
.andDeleteTagEqualTo(ZERO_NUM); .andDeleteTagEqualTo(ZERO_NUM);
if (CollectionUtils.isNotEmpty(req.getList())) { if (CollectionUtils.isNotEmpty(req.getList())) {
...@@ -1301,7 +1301,7 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -1301,7 +1301,7 @@ public class ProductServiceImpl implements ProductService, Constant {
FundCountExample example = new FundCountExample(); FundCountExample example = new FundCountExample();
FundCountExample.Criteria criteria = example.createCriteria().andDataSourcesEqualTo(ONE_NUM) FundCountExample.Criteria criteria = example.createCriteria().andDataSourcesEqualTo(ONE_NUM)
// .andStatusEqualTo(ONE_NUM) // .andStatusEqualTo(ONE_NUM)
.andStrategyNotEqualTo(7).andDeleteTagEqualTo(ZERO_NUM); .andSubstrategyNotEqualTo(ProductEnums.FundSubStrategyEnum.COMBINATION.subStrategy).andDeleteTagEqualTo(ZERO_NUM);
if (!CollectionUtils.isEmpty(req.getFundIds())) { if (!CollectionUtils.isEmpty(req.getFundIds())) {
criteria.andFundIdIn(req.getFundIds()); criteria.andFundIdIn(req.getFundIds());
......
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