Commit ececcde2 authored by shangying's avatar shangying

Merge branch 'master' into oneclickdatanewV1

# Conflicts:
#	src/main/java/cn/quantgroup/cashloanflowboss/spi/xyqb/entity/FinanceProduct.java
parents 99e2d646 7bf68893
...@@ -29,6 +29,7 @@ import cn.quantgroup.cashloanflowboss.spi.jolyne.JolyneService; ...@@ -29,6 +29,7 @@ import cn.quantgroup.cashloanflowboss.spi.jolyne.JolyneService;
import cn.quantgroup.cashloanflowboss.spi.opapi.OPCenter; import cn.quantgroup.cashloanflowboss.spi.opapi.OPCenter;
import cn.quantgroup.cashloanflowboss.spi.user.service.XyqbUserService; import cn.quantgroup.cashloanflowboss.spi.user.service.XyqbUserService;
import cn.quantgroup.cashloanflowboss.spi.xyqb.entity.Contract; import cn.quantgroup.cashloanflowboss.spi.xyqb.entity.Contract;
import cn.quantgroup.cashloanflowboss.spi.xyqb.entity.FinanceProduct;
import cn.quantgroup.cashloanflowboss.spi.xyqb.entity.LoanApplicationHistory; import cn.quantgroup.cashloanflowboss.spi.xyqb.entity.LoanApplicationHistory;
import cn.quantgroup.cashloanflowboss.spi.xyqb.entity.QuotaProduct; import cn.quantgroup.cashloanflowboss.spi.xyqb.entity.QuotaProduct;
import cn.quantgroup.cashloanflowboss.spi.xyqb.repository.CancelPreLoanRepository; import cn.quantgroup.cashloanflowboss.spi.xyqb.repository.CancelPreLoanRepository;
...@@ -212,9 +213,11 @@ public class OrderServiceImpl implements OrderService{ ...@@ -212,9 +213,11 @@ public class OrderServiceImpl implements OrderService{
return new Tuple(false, "审批失败,boss渠道配置为空"); return new Tuple(false, "审批失败,boss渠道配置为空");
} }
Integer fundId = ChannelConfUtil.getFundIdByType(approveVo.getFundType(), channelConf); Integer fundId = ChannelConfUtil.getFundIdByType(approveVo.getFundType(), channelConf);
FinanceProduct financeProduct = xyqbCenterService.getByFundCorpId(Long.valueOf(fundId));
log.info("approveOpt审批,fundProductId={}", financeProduct.getId());
// 资方 及 期数额度规则 // 资方 及 期数额度规则
String fundFormat = String.format(OrderUtil.financeProductsFormat, approveVo.getAmount(), approveVo.getAmount(), String fundFormat = String.format(OrderUtil.financeProductsFormat, approveVo.getAmount(), approveVo.getAmount(),
approveVo.getPeriod(), fundId); approveVo.getPeriod(), fundId, financeProduct.getId());
saveOrUpdateOrderApprove(approveVo, orderMapping, fundId); saveOrUpdateOrderApprove(approveVo, orderMapping, fundId);
ClfChannelConfiguration clfChannelConfiguration = clfCenterService.findChannelConfigurationByChannelId(orderMapping.getRegisteredFrom()); ClfChannelConfiguration clfChannelConfiguration = clfCenterService.findChannelConfigurationByChannelId(orderMapping.getRegisteredFrom());
if (clfChannelConfiguration == null) { if (clfChannelConfiguration == null) {
...@@ -660,12 +663,8 @@ public class OrderServiceImpl implements OrderService{ ...@@ -660,12 +663,8 @@ public class OrderServiceImpl implements OrderService{
case "WITHDRAW_APPROVING" : case "WITHDRAW_APPROVING" :
return getWithdrawApprovingTuple(tuple, buttonList, buttonBeforeCancel); return getWithdrawApprovingTuple(tuple, buttonList, buttonBeforeCancel);
case "WITHDRAW" : case "WITHDRAW" :
return getWithdrawTuple(orderMapping, tuple, buttonList, buttonBeforeCancel);
case "PAY_ING" : case "PAY_ING" :
tuple.setKey("放款中(等待几分钟)"); return getWithdrawTuple(orderMapping, tuple, buttonList, buttonBeforeCancel);
buttonList.add(buttonBeforeCancel);
tuple.setValue(buttonList);
return tuple;
case "FUND_WAITING_WITHDRAW" : case "FUND_WAITING_WITHDRAW" :
tuple.setKey("放款到存管账户,待存管提现"); tuple.setKey("放款到存管账户,待存管提现");
OrderVo.OptButton cancelAfterButton0 = new OrderVo.OptButton(); OrderVo.OptButton cancelAfterButton0 = new OrderVo.OptButton();
......
...@@ -22,8 +22,8 @@ import java.util.List; ...@@ -22,8 +22,8 @@ import java.util.List;
* @author: suntao * @author: suntao
*/ */
public class OrderUtil { public class OrderUtil {
public static final String financeProductsFormat = "[{\"min\":%s,\"max\":%s,\"terms\":[{\"term\":%s,\"fundInfo\":[{\"fundId\":%s,\"rate\":\"0\",\"rateType\":1,\"priority\":\"1\",\"feeType\":\"1\"}]}]}]"; // public static final String financeProductsFormat = "[{\"min\":%s,\"max\":%s,\"terms\":[{\"term\":%s,\"fundInfo\":[{\"fundId\":%s,\"rate\":\"0\",\"rateType\":1,\"priority\":\"1\",\"feeType\":\"1\"}]}]}]";
public static final String financeProductsFormat = "[{\"min\":%s,\"max\":%s,\"terms\":[{\"term\":%s,\"fundInfo\":[{\"fundId\":%s,\"rate\":\"0\",\"rateType\":1,\"priority\":\"1\",\"feeType\":\"1\",\"fundProductId\":%s}]}]}]";
/** /**
* *
* @param kaNoticeType * @param kaNoticeType
......
package cn.quantgroup.cashloanflowboss.spi.xyqb.repository;
import cn.quantgroup.cashloanflowboss.spi.xyqb.entity.FinanceProduct;
import cn.quantgroup.cashloanflowboss.spi.xyqb.source.XYQBDataSource;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
/**
* @author lupeng
* @since 2020/04/23
*/
@XYQBDataSource
@Repository
public interface FinanceProductRepository extends JpaRepository<FinanceProduct, Long> {
@Query(value = "select * from finance_product where fund_corp_id = ?1 and is_active = 1 limit 1", nativeQuery = true)
FinanceProduct findByFundCorpId(Long fundCorpId);
}
...@@ -60,4 +60,12 @@ public interface XYQBCenterService { ...@@ -60,4 +60,12 @@ public interface XYQBCenterService {
Tuple<Boolean,String> cleanUserActiveOrder(Long userId); Tuple<Boolean,String> cleanUserActiveOrder(Long userId);
ServiceResult<RepaymentPlansResultModel> findRepaymentPlan(Long loanId); ServiceResult<RepaymentPlansResultModel> findRepaymentPlan(Long loanId);
/**
* 查询金融产品通过资方id
* @param fundCorpId
* @return
*/
FinanceProduct getByFundCorpId(Long fundCorpId);
} }
...@@ -53,6 +53,8 @@ public class XYQBCenterServiceImpl implements XYQBCenterService { ...@@ -53,6 +53,8 @@ public class XYQBCenterServiceImpl implements XYQBCenterService {
private LoanApplicationHistoryRepository loanApplicationHistoryRepository; private LoanApplicationHistoryRepository loanApplicationHistoryRepository;
@Autowired @Autowired
private QuotaProductRepository quotaProductRepository; private QuotaProductRepository quotaProductRepository;
@Autowired
private FinanceProductRepository financeProductRepository;
@Autowired @Autowired
private JolyneService jolyneService; private JolyneService jolyneService;
...@@ -307,4 +309,9 @@ public class XYQBCenterServiceImpl implements XYQBCenterService { ...@@ -307,4 +309,9 @@ public class XYQBCenterServiceImpl implements XYQBCenterService {
log.info("查询还款计划,请求参数 paramMap={}", paramMap); log.info("查询还款计划,请求参数 paramMap={}", paramMap);
return xyqbCenter.getXyqbRepaymentPlans(paramMap); return xyqbCenter.getXyqbRepaymentPlans(paramMap);
} }
@Override
public FinanceProduct getByFundCorpId(Long fundCorpId) {
return financeProductRepository.findByFundCorpId(fundCorpId);
}
} }
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