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;
import cn.quantgroup.cashloanflowboss.spi.opapi.OPCenter;
import cn.quantgroup.cashloanflowboss.spi.user.service.XyqbUserService;
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.QuotaProduct;
import cn.quantgroup.cashloanflowboss.spi.xyqb.repository.CancelPreLoanRepository;
......@@ -212,9 +213,11 @@ public class OrderServiceImpl implements OrderService{
return new Tuple(false, "审批失败,boss渠道配置为空");
}
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(),
approveVo.getPeriod(), fundId);
approveVo.getPeriod(), fundId, financeProduct.getId());
saveOrUpdateOrderApprove(approveVo, orderMapping, fundId);
ClfChannelConfiguration clfChannelConfiguration = clfCenterService.findChannelConfigurationByChannelId(orderMapping.getRegisteredFrom());
if (clfChannelConfiguration == null) {
......@@ -660,12 +663,8 @@ public class OrderServiceImpl implements OrderService{
case "WITHDRAW_APPROVING" :
return getWithdrawApprovingTuple(tuple, buttonList, buttonBeforeCancel);
case "WITHDRAW" :
return getWithdrawTuple(orderMapping, tuple, buttonList, buttonBeforeCancel);
case "PAY_ING" :
tuple.setKey("放款中(等待几分钟)");
buttonList.add(buttonBeforeCancel);
tuple.setValue(buttonList);
return tuple;
return getWithdrawTuple(orderMapping, tuple, buttonList, buttonBeforeCancel);
case "FUND_WAITING_WITHDRAW" :
tuple.setKey("放款到存管账户,待存管提现");
OrderVo.OptButton cancelAfterButton0 = new OrderVo.OptButton();
......
......@@ -22,8 +22,8 @@ import java.util.List;
* @author: suntao
*/
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
......
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 {
Tuple<Boolean,String> cleanUserActiveOrder(Long userId);
ServiceResult<RepaymentPlansResultModel> findRepaymentPlan(Long loanId);
/**
* 查询金融产品通过资方id
* @param fundCorpId
* @return
*/
FinanceProduct getByFundCorpId(Long fundCorpId);
}
......@@ -53,6 +53,8 @@ public class XYQBCenterServiceImpl implements XYQBCenterService {
private LoanApplicationHistoryRepository loanApplicationHistoryRepository;
@Autowired
private QuotaProductRepository quotaProductRepository;
@Autowired
private FinanceProductRepository financeProductRepository;
@Autowired
private JolyneService jolyneService;
......@@ -307,4 +309,9 @@ public class XYQBCenterServiceImpl implements XYQBCenterService {
log.info("查询还款计划,请求参数 paramMap={}", 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