Commit 400be065 authored by 王向伟's avatar 王向伟

添加节点顺序和非通知节点配置

parent c1bd44ab
......@@ -128,5 +128,11 @@ public class ChannelConf extends Primary {
@Column(name = "extend_data")
private String extendData;
@Column(name = "callback_no_push_progress")
private String callbackNoPushProgress;
@Column(name = "pre_progress")
private String preProgress;
}
......@@ -18,6 +18,8 @@ public class ChannelConfBaseModel {
private String env;
private Integer fundId;
private Integer p2pFundId;
private String callbackNoPushProgress;
private String preProgress;
/**
......
package cn.quantgroup.cashloanflowboss.api.channel.util;
import java.sql.Timestamp;
import cn.quantgroup.cashloanflowboss.spi.clf.model.KANoticeType;
import cn.quantgroup.cashloanflowboss.spi.clf.entity.ClfOrderCallBack;
import cn.quantgroup.cashloanflowboss.spi.clf.model.CallbackRouter;
import cn.quantgroup.cashloanflowboss.spi.clf.entity.ClfCallbackConfiguration;
import cn.quantgroup.cashloanflowboss.spi.clf.model.EncType;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import cn.quantgroup.cashloanflowboss.api.channel.entity.ChannelConf;
import cn.quantgroup.cashloanflowboss.api.channel.model.ChannelConfAddModel;
import cn.quantgroup.cashloanflowboss.api.channel.model.ChannelConfBaseModel;
import cn.quantgroup.cashloanflowboss.api.channel.model.ChannelConfVo;
import cn.quantgroup.cashloanflowboss.spi.clf.entity.ClfCallbackConfiguration;
import cn.quantgroup.cashloanflowboss.spi.clf.entity.ClfChannelConfiguration;
import cn.quantgroup.cashloanflowboss.spi.clf.entity.ClfOrderCallBack;
import cn.quantgroup.cashloanflowboss.spi.clf.model.CallbackRouter;
import cn.quantgroup.cashloanflowboss.spi.clf.model.EncType;
import cn.quantgroup.cashloanflowboss.spi.clf.model.KANoticeType;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
/**
* function:
* date: 2019/8/2
......@@ -79,9 +79,9 @@ public class ChannelConfUtil {
channelConfiguration.setSpiderCenterChannelCode(basicInfo.getRiskCode());
channelConfiguration.setSpiderCenterMerchantChannelCode(basicInfo.getAuthCode());
if(Objects.nonNull(basicInfo.getBizType())){
channelConfiguration.setXyqbProductId(basicInfo.getBizType()+"");
}else {
if (Objects.nonNull(basicInfo.getBizType())) {
channelConfiguration.setXyqbProductId(basicInfo.getBizType() + "");
} else {
channelConfiguration.setXyqbProductId(null);
}
return channelConfiguration;
......@@ -223,7 +223,7 @@ public class ChannelConfUtil {
}
}
public static ChannelConfVo getChannelConfVoByClf(ClfChannelConfiguration channelConfiguration, ClfOrderCallBack approve, ClfOrderCallBack orderStatus, ClfOrderCallBack repaymentPlan) {
public static ChannelConfVo getChannelConfVoByClf(ClfChannelConfiguration channelConfiguration, ClfOrderCallBack approve, ClfOrderCallBack orderStatus, ClfOrderCallBack repaymentPlan, ClfCallbackConfiguration callbackConfiguration) {
ChannelConfVo channelConfVo = new ChannelConfVo();
ChannelConfBaseModel channelConfBaseModel = new ChannelConfBaseModel();
if (channelConfiguration != null) {
......@@ -233,7 +233,7 @@ public class ChannelConfUtil {
channelConfBaseModel.setEnv("");
channelConfBaseModel.setFundId(0);
channelConfBaseModel.setP2pFundId(0);
if(StringUtils.isNotEmpty(channelConfiguration.getXyqbProductId())){
if (StringUtils.isNotEmpty(channelConfiguration.getXyqbProductId())) {
channelConfBaseModel.setBizType(Integer.valueOf(channelConfiguration.getXyqbProductId()));
}
channelConfBaseModel.setAesKey(channelConfiguration.getAesKey());
......@@ -242,6 +242,11 @@ public class ChannelConfUtil {
channelConfBaseModel.setRiskCode(channelConfiguration.getSpiderCenterChannelCode());
}
if (callbackConfiguration != null) {
channelConfBaseModel.setCallbackNoPushProgress(callbackConfiguration.getCallbackNoPushProgress());
channelConfBaseModel.setPreProgress(callbackConfiguration.getPreProgress());
}
ChannelConfAddModel channelConfAddModel = new ChannelConfAddModel();
channelConfAddModel.setEnvPath("");
......
......@@ -61,7 +61,6 @@ public class CashLoanFlowBossDataSourceConfiguration {
@Primary
@Bean(name = "bossEntityManager")
public LocalContainerEntityManagerFactoryBean entityManager(EntityManagerFactoryBuilder builder) {
return builder.dataSource(createDataSource())
.packages("cn.quantgroup.cashloanflowboss.api")
.persistenceUnit(uniquename)
......
package cn.quantgroup.cashloanflowboss.spi.clf.entity;
import cn.quantgroup.cashloanflowboss.spi.clf.model.CallbackRouter;
import lombok.*;
import org.apache.commons.lang3.StringUtils;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Map;
import java.util.Set;
/**
* Created by liqing on 2017/5/5 0005.
*/
@Setter
@Getter
@Entity
@Table(name = "callback_configuration", catalog = "cash_loan_flow")
public class CallbackConfiguration implements Serializable {
private static final long serialVersionUID = -1L;
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(name = "channel_id")
private Long channelId;
@Column(name = "is_loan_makeup")
private Boolean isLoanMakeup;
@Column(name = "is_repay_makeup")
private Boolean isRepayMakeup;
@Column(name = "loan_makeup_strategy")
private String loanMakeupStrategy;
@Column(name = "repay_makeup_strategy")
private String repayMakeupStrategy;
@Column(name = "is_active")
private Boolean isActive;
@Column(name = "only_new_user")
private Boolean onlyNewUser;
@Column(name = "callback_service_name")
private String callbackServiceName;
@Column(name = "callback_no_push_progress")
private String callbackNoPushProgress;
@Column(name = "pre_progress")
private String preProgress;
@Column(name = "retry_max_times")
private Long retryMaxTimes;
@Enumerated(EnumType.ORDINAL)
@Column(name = "callback_router")
private CallbackRouter callbackRouter;
// @Transient
// private LoanMakeupStrategyModel loanMakeupStrategyModel;
// @Transient
// private RepayMakeupStrategyModel repayMakeupStrategyModel;
//
// public void generateMakeupStrategyModel() {
// if (StringUtils.isNotBlank(loanMakeupStrategy)) {
// loanMakeupStrategyModel = Constants.GSON.fromJson(loanMakeupStrategy, LoanMakeupStrategyModel.class);
// }
// if (StringUtils.isNotBlank(repayMakeupStrategy)) {
// repayMakeupStrategyModel = Constants.GSON.fromJson(repayMakeupStrategy, RepayMakeupStrategyModel.class);
// }
// }
//
// public LoanMakeupStrategyModel getLoanMakeupStrategyModel() {
// if (loanMakeupStrategyModel == null) {
// loanMakeupStrategyModel = Constants.GSON.fromJson(loanMakeupStrategy, LoanMakeupStrategyModel.class);
// }
// return loanMakeupStrategyModel;
// }
//
// public RepayMakeupStrategyModel getRepayMakeupStrategyModel() {
// if (repayMakeupStrategyModel == null) {
// repayMakeupStrategyModel = Constants.GSON.fromJson(repayMakeupStrategy, RepayMakeupStrategyModel.class);
// }
// return repayMakeupStrategyModel;
// }
//
// @Setter
// @Getter
// @Builder
// @NoArgsConstructor
// @AllArgsConstructor
// public static class LoanMakeupStrategyModel implements Serializable {
// private static final long serialVersionUID = -1L;
//
// private Map<Integer, Integer> preProgressMap; // 前一个应推送的状态映射
// private Map<Integer, Integer> pushStatusMap; // 应推送的状态映射
// private Set<Integer> allStatus; // 所有需要关注的状态
// private Long hourAgo; // 关注hourAgo小时之内发生变更的状态
// private Integer maxCount; // 最多一次补偿数量
//
// public String toJson() {
// return Constants.GSON.toJson(this);
// }
// }
//
// @Setter
// @Getter
// @Builder
// @NoArgsConstructor
// @AllArgsConstructor
// public static class RepayMakeupStrategyModel implements Serializable {
// private static final long serialVersionUID = -1L;
//
// private Long hourAgo; // 关注hourAgo小时之内发生收到的还款
// private Integer maxCount; // 最多一次补偿数量
//
// public String toJson() {
// return Constants.GSON.toJson(this);
// }
// }
}
......@@ -14,4 +14,5 @@ import org.springframework.stereotype.Repository;
@CashLoanFlowDataSource
@Repository
public interface ClfCallbackConfigurationRepository extends JpaRepository<ClfCallbackConfiguration, Long> {
ClfCallbackConfiguration findByChannelId(Long channelId);
}
package cn.quantgroup.cashloanflowboss.spi.clf.repository;
import cn.quantgroup.cashloanflowboss.core.persistence.CashLoanFlowDataSource;
import cn.quantgroup.cashloanflowboss.spi.clf.entity.CallbackConfiguration;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* Created by liqing on 2017/5/5 0005.
*/
@CashLoanFlowDataSource
@Repository
public interface ICallbackConfigurationRepository extends JpaRepository<CallbackConfiguration, Long> {
List<CallbackConfiguration> findByChannelId(Long channelId);
}
......@@ -42,7 +42,7 @@ public interface CLFCenterService {
void saveChannelApplyInfoStrategy(ChannelApplyInfoStrategy channelApplyInfoStrategy);
List<CallbackConfiguration> findCallbackConfigurationByChannelId(Long channelId);
ClfCallbackConfiguration findCallbackConfigurationByChannelId(Long channelId);
List<ClfChannelConfiguration> findAll();
......
......@@ -49,8 +49,6 @@ public class CLFCenterServiceImpl implements CLFCenterService {
private ChannelApplyInfoStrategyRepository channelApplyInfoStrategyRepository;
@Autowired
private ICallbackConfigurationRepository callbackConfigurationRepository;
@Autowired
private ChannelSecurityKeyRepository channelSecurityKeyRepository;
......@@ -177,8 +175,8 @@ public class CLFCenterServiceImpl implements CLFCenterService {
@Override
public List<CallbackConfiguration> findCallbackConfigurationByChannelId(Long channelId) {
return callbackConfigurationRepository.findByChannelId(channelId);
public ClfCallbackConfiguration findCallbackConfigurationByChannelId(Long channelId) {
return clfCallbackConfigurationRepository.findByChannelId(channelId);
}
......
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