Commit e8f68eb9 authored by liwenbin's avatar liwenbin

增加获取所有已进行资方配置的渠道

parent e5a934f2
...@@ -123,6 +123,14 @@ public class FundModuleController { ...@@ -123,6 +123,14 @@ public class FundModuleController {
return simulation(JSON.parseArray(configConditions,FundConfigCondition.class),configId); return simulation(JSON.parseArray(configConditions,FundConfigCondition.class),configId);
} }
@RequestMapping("/get_all_channel")
public GlobalResponse getAllConfigingChannels() {
Stopwatch stopwatch = Stopwatch.createStarted();
GlobalResponse response = fundModuleService.getAllConfigChannel();
log.info("资方模块接口, 获取所有已进行资方配置的渠道号结束, response : {}, 耗时 : {}", JSON.toJSONString(response), stopwatch.stop().elapsed(TimeUnit.MILLISECONDS));
return response;
}
private GlobalResponse saveChannelFundsConfigCommon(Integer type, Long id, String bizChannel, String funds, String remarks, private GlobalResponse saveChannelFundsConfigCommon(Integer type, Long id, String bizChannel, String funds, String remarks,
String auditor, String proposer, int oldOrNew) { String auditor, String proposer, int oldOrNew) {
log.info("资方模块接口, 新增或修改资方配置开始, type : {}, id : {}, bizChannel : {}, funds : {}, remarks : {}, auditor : {}, proposer : {}", type, id, bizChannel, funds, remarks, auditor, proposer); log.info("资方模块接口, 新增或修改资方配置开始, type : {}, id : {}, bizChannel : {}, funds : {}, remarks : {}, auditor : {}, proposer : {}", type, id, bizChannel, funds, remarks, auditor, proposer);
......
...@@ -4,6 +4,7 @@ import com.quantgroup.asset.distribution.model.response.GlobalResponse; ...@@ -4,6 +4,7 @@ import com.quantgroup.asset.distribution.model.response.GlobalResponse;
import com.quantgroup.asset.distribution.service.jpa.entity.FundModuleChannelFundConfig; import com.quantgroup.asset.distribution.service.jpa.entity.FundModuleChannelFundConfig;
import com.quantgroup.asset.distribution.service.jpa.entity.FundModuleChannelFundConfigNew; import com.quantgroup.asset.distribution.service.jpa.entity.FundModuleChannelFundConfigNew;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
...@@ -26,4 +27,6 @@ public interface IFundModuleChannelFundConfigNewService { ...@@ -26,4 +27,6 @@ public interface IFundModuleChannelFundConfigNewService {
public FundModuleChannelFundConfigNew auditPassConfig(Long preId, Long auditId); public FundModuleChannelFundConfigNew auditPassConfig(Long preId, Long auditId);
public void clearChannelFundConfigCache(String bizChannel); public void clearChannelFundConfigCache(String bizChannel);
public List<String> getAllConfigChanels();
} }
...@@ -104,6 +104,12 @@ public interface IFundModuleService { ...@@ -104,6 +104,12 @@ public interface IFundModuleService {
*/ */
public GlobalResponse audit(Long id, Integer auditStatus); public GlobalResponse audit(Long id, Integer auditStatus);
/**
* 获取所有已进行资方配置的渠道
* @return
*/
public GlobalResponse getAllConfigChannel();
GlobalResponse getAllConditionsOfFundConfig(Long configId); GlobalResponse getAllConditionsOfFundConfig(Long configId);
GlobalResponse simulationCases(List<FundConfigCondition> configConditions,Long configId); GlobalResponse simulationCases(List<FundConfigCondition> configConditions,Long configId);
......
...@@ -155,6 +155,11 @@ public class FundModuleChannelFundConfigNewServiceImpl implements IFundModuleCha ...@@ -155,6 +155,11 @@ public class FundModuleChannelFundConfigNewServiceImpl implements IFundModuleCha
log.info("渠道资方配置缓存清除, bizChannel : {}", bizChannel); log.info("渠道资方配置缓存清除, bizChannel : {}", bizChannel);
} }
@Override
public List<String> getAllConfigChanels() {
return fundModuleChannelFundConfigNewRepository.getAllBizChannel();
}
/** /**
* 更改配置enable状态 * 更改配置enable状态
* @param id * @param id
......
...@@ -7,6 +7,7 @@ import java.util.concurrent.TimeUnit; ...@@ -7,6 +7,7 @@ import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.google.common.collect.Lists;
import com.quantgroup.asset.distribution.enums.RuleOperator; import com.quantgroup.asset.distribution.enums.RuleOperator;
import com.quantgroup.asset.distribution.exception.QGException; import com.quantgroup.asset.distribution.exception.QGException;
import com.quantgroup.asset.distribution.model.entity.fund.ChannelFundConfigNew; import com.quantgroup.asset.distribution.model.entity.fund.ChannelFundConfigNew;
...@@ -194,6 +195,16 @@ public class FundModuleServiceImpl implements IFundModuleService{ ...@@ -194,6 +195,16 @@ public class FundModuleServiceImpl implements IFundModuleService{
} }
} }
@HandleException
@Override
public GlobalResponse getAllConfigChannel() {
List<String> channels = fundModuleChannelFundConfigNewService.getAllConfigChanels();
if (channels == null) {
channels = Lists.newArrayList();
}
return GlobalResponse.success(channels);
}
@HandleException @HandleException
@Override @Override
public GlobalResponse getAllConditionsOfFundConfig(Long configId){ public GlobalResponse getAllConditionsOfFundConfig(Long configId){
......
...@@ -4,6 +4,7 @@ import com.quantgroup.asset.distribution.service.jpa.entity.FundModuleChannelFun ...@@ -4,6 +4,7 @@ import com.quantgroup.asset.distribution.service.jpa.entity.FundModuleChannelFun
import com.quantgroup.asset.distribution.service.jpa.entity.FundModuleChannelFundConfigNew; import com.quantgroup.asset.distribution.service.jpa.entity.FundModuleChannelFundConfigNew;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import java.util.List; import java.util.List;
...@@ -35,4 +36,6 @@ public interface IFundModuleChannelFundConfigNewRepository extends JpaRepository ...@@ -35,4 +36,6 @@ public interface IFundModuleChannelFundConfigNewRepository extends JpaRepository
*/ */
public FundModuleChannelFundConfigNew findById(Long id); public FundModuleChannelFundConfigNew findById(Long id);
@Query(value = "select biz_channel from fund_module_channel_fund_config_new where enable = 1", nativeQuery = true)
public List<String> getAllBizChannel();
} }
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