Commit e12c0821 authored by 王向伟's avatar 王向伟

渠道配置兼容多项channelApplyInfoStrategy

parent a158c791
...@@ -4,6 +4,7 @@ import cn.quantgroup.cashloanflowboss.spi.clf.entity.ChannelApplyInfoStrategy; ...@@ -4,6 +4,7 @@ import cn.quantgroup.cashloanflowboss.spi.clf.entity.ChannelApplyInfoStrategy;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.util.List;
/** /**
...@@ -20,7 +21,7 @@ public class ChannelConfBaseModel { ...@@ -20,7 +21,7 @@ public class ChannelConfBaseModel {
private Integer fundId; private Integer fundId;
private Integer p2pFundId; private Integer p2pFundId;
private ChannelApplyInfoStrategy channelApplyInfoStrategy; private List<ChannelApplyInfoStrategy> channelApplyInfoStrategyList;
/** /**
* 对应productId * 对应productId
*/ */
......
...@@ -11,6 +11,7 @@ import cn.quantgroup.cashloanflowboss.spi.clf.entity.ClfOrderCallBack; ...@@ -11,6 +11,7 @@ import cn.quantgroup.cashloanflowboss.spi.clf.entity.ClfOrderCallBack;
import cn.quantgroup.cashloanflowboss.spi.clf.model.KANoticeType; import cn.quantgroup.cashloanflowboss.spi.clf.model.KANoticeType;
import cn.quantgroup.cashloanflowboss.spi.clf.service.CLFCenterService; import cn.quantgroup.cashloanflowboss.spi.clf.service.CLFCenterService;
import cn.quantgroup.cashloanflowboss.utils.IgnorePropertiesUtil; import cn.quantgroup.cashloanflowboss.utils.IgnorePropertiesUtil;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
...@@ -73,8 +74,8 @@ public class ChannelConfServiceImpl implements ChannelConfService { ...@@ -73,8 +74,8 @@ public class ChannelConfServiceImpl implements ChannelConfService {
channelConfVo = ChannelConfUtil.getChannelConfVoByClf(channelConfiguration, approve, orderStatus, repaymentPlan); channelConfVo = ChannelConfUtil.getChannelConfVoByClf(channelConfiguration, approve, orderStatus, repaymentPlan);
} }
ChannelApplyInfoStrategy channelApplyInfoStrategyByChannelId = clfCenterService.findChannelApplyInfoStrategyByChannelId(channelId); List<ChannelApplyInfoStrategy> channelApplyInfoStrategyByChannelId = clfCenterService.findChannelApplyInfoStrategyByChannelId(channelId);
channelConfVo.getBasicInfo().setChannelApplyInfoStrategy(channelApplyInfoStrategyByChannelId); channelConfVo.getBasicInfo().setChannelApplyInfoStrategyList(channelApplyInfoStrategyByChannelId);
return channelConfVo; return channelConfVo;
} }
...@@ -130,15 +131,13 @@ public class ChannelConfServiceImpl implements ChannelConfService { ...@@ -130,15 +131,13 @@ public class ChannelConfServiceImpl implements ChannelConfService {
//保存进件配置项 //保存进件配置项
Long channelId = basicInfo.getChannelId(); Long channelId = basicInfo.getChannelId();
ChannelApplyInfoStrategy channelApplyInfoStrategy = basicInfo.getChannelApplyInfoStrategy(); List<ChannelApplyInfoStrategy> channelApplyInfoStrategyList = basicInfo.getChannelApplyInfoStrategyList();
if (channelApplyInfoStrategy != null) { if (CollectionUtils.isNotEmpty(channelApplyInfoStrategyList)) {
ChannelApplyInfoStrategy strategy = clfCenterService.findChannelApplyInfoStrategyByChannelId(channelId); for (ChannelApplyInfoStrategy strategy : channelApplyInfoStrategyList) {
if (strategy != null) { clfCenterService.saveChannelApplyInfoStrategy(strategy);
channelApplyInfoStrategy.setId(strategy.getId());
}
clfCenterService.saveChannelApplyInfoStrategy(channelApplyInfoStrategy);
} }
}
return true; return true;
} }
......
...@@ -5,6 +5,8 @@ import cn.quantgroup.cashloanflowboss.spi.clf.entity.ChannelApplyInfoStrategy; ...@@ -5,6 +5,8 @@ import cn.quantgroup.cashloanflowboss.spi.clf.entity.ChannelApplyInfoStrategy;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.List;
/** /**
* @author Wang Xiangwei * @author Wang Xiangwei
* @version 2020/2/25 * @version 2020/2/25
...@@ -13,5 +15,5 @@ import org.springframework.stereotype.Repository; ...@@ -13,5 +15,5 @@ import org.springframework.stereotype.Repository;
@Repository @Repository
public interface ChannelApplyInfoStrategyRepository extends JpaRepository<ChannelApplyInfoStrategy, Long> { public interface ChannelApplyInfoStrategyRepository extends JpaRepository<ChannelApplyInfoStrategy, Long> {
ChannelApplyInfoStrategy findByChannelId(Long channelId); List<ChannelApplyInfoStrategy> findByChannelId(Long channelId);
} }
...@@ -38,7 +38,7 @@ public interface CLFCenterService { ...@@ -38,7 +38,7 @@ public interface CLFCenterService {
void reloadKAConfiguration(); void reloadKAConfiguration();
ChannelApplyInfoStrategy findChannelApplyInfoStrategyByChannelId(Long channelId); List<ChannelApplyInfoStrategy> findChannelApplyInfoStrategyByChannelId(Long channelId);
void saveChannelApplyInfoStrategy(ChannelApplyInfoStrategy channelApplyInfoStrategy); void saveChannelApplyInfoStrategy(ChannelApplyInfoStrategy channelApplyInfoStrategy);
......
...@@ -147,7 +147,7 @@ public class CLFCenterServiceImpl implements CLFCenterService { ...@@ -147,7 +147,7 @@ public class CLFCenterServiceImpl implements CLFCenterService {
} }
@Override @Override
public ChannelApplyInfoStrategy findChannelApplyInfoStrategyByChannelId(Long channelId) { public List<ChannelApplyInfoStrategy> findChannelApplyInfoStrategyByChannelId(Long channelId) {
return channelApplyInfoStrategyRepository.findByChannelId(channelId); return channelApplyInfoStrategyRepository.findByChannelId(channelId);
} }
......
...@@ -121,7 +121,7 @@ public class KoalaCenterService { ...@@ -121,7 +121,7 @@ public class KoalaCenterService {
} }
} }
public String cancelPreAudit(Map<Object, Object> data) { public String cancelPreLoanHasLoanId(Map<Object, Object> data) {
if (Application.isDebug()) { if (Application.isDebug()) {
String result = koalaCenter.cancelPreAudit(data); String result = koalaCenter.cancelPreAudit(data);
log.info("koala 有loanId贷前关单 result={}",result); log.info("koala 有loanId贷前关单 result={}",result);
......
...@@ -5,7 +5,6 @@ import cn.quantgroup.cashloanflowboss.api.channel.model.ChannelConfVo; ...@@ -5,7 +5,6 @@ import cn.quantgroup.cashloanflowboss.api.channel.model.ChannelConfVo;
import cn.quantgroup.cashloanflowboss.api.channel.service.ChannelConfService; import cn.quantgroup.cashloanflowboss.api.channel.service.ChannelConfService;
import cn.quantgroup.cashloanflowboss.spi.clf.entity.ChannelApplyInfoStrategy; import cn.quantgroup.cashloanflowboss.spi.clf.entity.ChannelApplyInfoStrategy;
import cn.quantgroup.cashloanflowboss.spi.clf.service.CLFCenterService; import cn.quantgroup.cashloanflowboss.spi.clf.service.CLFCenterService;
import cn.quantgroup.cashloanflowboss.spi.xyqb.service.XYQBCenterService;
import org.junit.Test; import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -39,9 +38,9 @@ public class ChannelApplyInfoStrategyTest extends CashLoanFlowBossApplicationTes ...@@ -39,9 +38,9 @@ public class ChannelApplyInfoStrategyTest extends CashLoanFlowBossApplicationTes
strategy.setMobile(true); strategy.setMobile(true);
clfCenterService.saveChannelApplyInfoStrategy(strategy); clfCenterService.saveChannelApplyInfoStrategy(strategy);
ChannelApplyInfoStrategy strategy1 = clfCenterService.findChannelApplyInfoStrategyByChannelId(12L); // ChannelApplyInfoStrategy strategy1 = clfCenterService.findChannelApplyInfoStrategyByChannelId(12L);
strategy.setId(strategy1.getId()); // strategy.setId(strategy1.getId());
strategy.setChannelName("测试更新"); strategy.setChannelName("测试更新");
clfCenterService.saveChannelApplyInfoStrategy(strategy); clfCenterService.saveChannelApplyInfoStrategy(strategy);
} }
...@@ -50,13 +49,14 @@ public class ChannelApplyInfoStrategyTest extends CashLoanFlowBossApplicationTes ...@@ -50,13 +49,14 @@ public class ChannelApplyInfoStrategyTest extends CashLoanFlowBossApplicationTes
public void testGetChannelInfo(){ public void testGetChannelInfo(){
ChannelConfVo channelConf = channelConfService.getChannelConf(159881L); ChannelConfVo channelConf = channelConfService.getChannelConf(159881L);
ChannelApplyInfoStrategy channelApplyInfoStrategy = channelConf.getBasicInfo().getChannelApplyInfoStrategy(); //ChannelApplyInfoStrategy channelApplyInfoStrategy = channelConf.getBasicInfo().getChannelApplyInfoStrategyList();
channelApplyInfoStrategy.setChannelUserId(true); //channelApplyInfoStrategy.setChannelUserId(true);
channelConfService.editChannelConfInfo(channelConf); channelConfService.editChannelConfInfo(channelConf);
//数据恢复 //数据恢复
channelApplyInfoStrategy.setChannelUserId(false); //channelApplyInfoStrategy.setChannelUserId(false);
channelConfService.editChannelConfInfo(channelConf); channelConfService.editChannelConfInfo(channelConf);
......
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