Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cash-loan-flow-boss
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QG
cash-loan-flow-boss
Commits
fa07e22d
Commit
fa07e22d
authored
Apr 23, 2020
by
鹿朋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
审批添加fundProductId字段
parent
041f9514
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
140 additions
and
2 deletions
+140
-2
OrderServiceImpl.java
.../cashloanflowboss/api/order/service/OrderServiceImpl.java
+4
-1
OrderUtil.java
...quantgroup/cashloanflowboss/api/order/util/OrderUtil.java
+1
-1
FinanceProduct.java
...roup/cashloanflowboss/spi/xyqb/entity/FinanceProduct.java
+102
-0
FinanceProductRepository.java
...lowboss/spi/xyqb/repository/FinanceProductRepository.java
+18
-0
XYQBCenterService.java
.../cashloanflowboss/spi/xyqb/service/XYQBCenterService.java
+8
-0
XYQBCenterServiceImpl.java
...hloanflowboss/spi/xyqb/service/XYQBCenterServiceImpl.java
+7
-0
No files found.
src/main/java/cn/quantgroup/cashloanflowboss/api/order/service/OrderServiceImpl.java
View file @
fa07e22d
...
...
@@ -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
)
{
...
...
src/main/java/cn/quantgroup/cashloanflowboss/api/order/util/OrderUtil.java
View file @
fa07e22d
...
...
@@ -23,7 +23,7 @@ import java.util.List;
*/
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\",\"fundProductId\":
1050
}]}]}]"
;
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
...
...
src/main/java/cn/quantgroup/cashloanflowboss/spi/xyqb/entity/FinanceProduct.java
0 → 100644
View file @
fa07e22d
package
cn
.
quantgroup
.
cashloanflowboss
.
spi
.
xyqb
.
entity
;
import
lombok.Data
;
import
javax.persistence.*
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.sql.Timestamp
;
/**
* 金融产品
*
* @author lupeng
* @since 2020/04/23
*/
@Entity
@Data
@Table
(
name
=
"finance_product"
)
public
class
FinanceProduct
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1L
;
/**
* 主键id
*/
@Id
@Column
(
name
=
"id"
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Long
id
;
/**
* 资方id
*/
@Column
(
name
=
"fund_corp_id"
)
private
Long
fundCorpId
;
/**
* 月利率
*/
@Column
(
name
=
"monthly_interest_rate"
)
private
BigDecimal
monthlyInterestRate
;
/**
* 还款类型:1:等额本金:0:等额本息
*/
@Column
(
name
=
"repayment_type"
)
private
Integer
repaymentType
;
/**
* 计息规则
*/
@Column
(
name
=
"repayment_rule"
)
private
String
repaymentRule
;
/**
* 数据有效性标志位
*/
@Column
(
name
=
"is_active"
)
private
Integer
isActive
;
/**
* 描述
*/
@Column
(
name
=
"remark"
)
private
String
remark
;
/**
* 创建时间
*/
@Column
(
name
=
"created_at"
)
private
Timestamp
createdAt
;
/**
* 更新时间
*/
@Column
(
name
=
"updated_at"
)
private
Timestamp
updatedAt
;
/**
* {1:"0.0001",2:"0.00012",0:"0.00011"}0表示任何其他期
*/
@Column
(
name
=
"service_fee_config"
)
private
String
serviceFeeConfig
;
/**
* 展示日利率
*/
@Column
(
name
=
"show_day_interest"
)
private
BigDecimal
showDayInterest
;
/**
* 展示月利率
*/
@Column
(
name
=
"show_month_interest"
)
private
BigDecimal
showMonthInterest
;
/**
* 展示年利率
*/
@Column
(
name
=
"show_year_interest"
)
private
BigDecimal
showYearInterest
;
}
src/main/java/cn/quantgroup/cashloanflowboss/spi/xyqb/repository/FinanceProductRepository.java
0 → 100644
View file @
fa07e22d
package
cn
.
quantgroup
.
cashloanflowboss
.
spi
.
xyqb
.
repository
;
import
cn.quantgroup.cashloanflowboss.spi.xyqb.entity.FinanceProduct
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.Query
;
/**
* @author lupeng
* @since 2020/04/23
*/
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
);
}
src/main/java/cn/quantgroup/cashloanflowboss/spi/xyqb/service/XYQBCenterService.java
View file @
fa07e22d
...
...
@@ -53,4 +53,12 @@ public interface XYQBCenterService {
Tuple
<
Boolean
,
String
>
cleanUserActiveOrder
(
Long
userId
);
ServiceResult
<
RepaymentPlansResultModel
>
findRepaymentPlan
(
Long
loanId
);
/**
* 查询金融产品通过资方id
* @param fundCorpId
* @return
*/
FinanceProduct
getByFundCorpId
(
Long
fundCorpId
);
}
src/main/java/cn/quantgroup/cashloanflowboss/spi/xyqb/service/XYQBCenterServiceImpl.java
View file @
fa07e22d
...
...
@@ -52,6 +52,8 @@ public class XYQBCenterServiceImpl implements XYQBCenterService {
private
LoanApplicationHistoryRepository
loanApplicationHistoryRepository
;
@Autowired
private
QuotaProductRepository
quotaProductRepository
;
@Autowired
private
FinanceProductRepository
financeProductRepository
;
@Autowired
private
JolyneService
jolyneService
;
...
...
@@ -272,4 +274,9 @@ public class XYQBCenterServiceImpl implements XYQBCenterService {
log
.
info
(
"查询还款计划,请求参数 paramMap={}"
,
paramMap
);
return
xyqbCenter
.
getXyqbRepaymentPlans
(
paramMap
);
}
@Override
public
FinanceProduct
getByFundCorpId
(
Long
fundCorpId
)
{
return
financeProductRepository
.
findByFundCorpId
(
fundCorpId
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment