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
7acede24
Commit
7acede24
authored
Sep 09, 2019
by
suntao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
放款二次风控 操作
parent
966a23f3
Pipeline
#32
failed with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
5 deletions
+63
-5
OrderService.java
...roup/cashloanflowboss/api/order/service/OrderService.java
+39
-5
ClothoCenter.java
...roup/cashloanflowboss/spi/clotho/client/ClothoCenter.java
+8
-0
ClothoCenterService.java
...hloanflowboss/spi/clotho/service/ClothoCenterService.java
+16
-0
No files found.
src/main/java/cn/quantgroup/cashloanflowboss/api/order/service/OrderService.java
View file @
7acede24
...
...
@@ -25,6 +25,7 @@ import cn.quantgroup.cashloanflowboss.spi.clf.repository.ClfOrderMappingReposito
import
cn.quantgroup.cashloanflowboss.spi.clf.service.CLFCenterService
;
import
cn.quantgroup.cashloanflowboss.spi.clotho.service.ClothoCenterService
;
import
cn.quantgroup.cashloanflowboss.spi.jolyne.JolyneCenter
;
import
cn.quantgroup.cashloanflowboss.spi.user.service.UserSysService
;
import
cn.quantgroup.cashloanflowboss.spi.user.service.XyqbUserService
;
import
cn.quantgroup.cashloanflowboss.spi.xyqb.entity.Contract
;
import
cn.quantgroup.cashloanflowboss.spi.xyqb.entity.FundLending
;
...
...
@@ -94,14 +95,14 @@ public class OrderService {
@Value
(
"${debug.model}"
)
private
Boolean
debugModel
;
@Autowired
private
ClfOrderMappingRepository
clfOrderMappingRepository
;
@Value
(
"${debug.model}"
)
private
Boolean
debugModel
;
public
Page
<
OrderVo
>
orderList
(
Long
channelId
,
String
channelOrderNo
,
String
applyNo
,
Long
loanId
,
Integer
pageNumber
,
Integer
pageSize
)
{
...
...
@@ -180,6 +181,8 @@ public class OrderService {
*/
public
Tuple
<
Boolean
,
Boolean
>
approveOpt
(
ApproveVo
approveVo
)
{
log
.
info
(
"approveOpt,审批操作入参,approveVo={}"
,
JSONTools
.
serialize
(
approveVo
));
if
(
StringUtils
.
isEmpty
(
approveVo
.
getAmount
()))
{
// 如果UI 金额为空 默认4000
approveVo
.
setAmount
(
"4000"
);
...
...
@@ -256,6 +259,7 @@ public class OrderService {
data
.
put
(
"financeProducts"
,
fundFormat
);
// 发起审批
log
.
info
(
"[approveOpt] 向clotho发起审批,data={}"
,
JSONTools
.
serialize
(
data
));
String
approveStringResult
=
clothoCenterService
.
approve
(
data
);
Boolean
corpPolicyValidate
=
false
;
try
{
...
...
@@ -328,7 +332,7 @@ public class OrderService {
optHistoryLog
.
setCreateTime
(
new
Date
());
// 更新待放款时间
// 更新待放款时间
(5分钟之前)
FundLending
fundLending
=
xyqbCenterService
.
findFundLendingByLoanId
(
orderMapping
.
getLoanId
());
if
(
fundLending
!=
null
)
{
LocalDateTime
localDateTime
=
LocalDateTime
.
now
();
...
...
@@ -337,6 +341,36 @@ public class OrderService {
xyqbCenterService
.
saveFundLending
(
fundLending
);
}
// 二次风控回调
XUser
xUser
=
xyqbUserService
.
findXUserById
(
orderMapping
.
getQgUserId
());
if
(
xUser
==
null
)
{
log
.
info
(
"[order_lending]二次风控失败,未找到user channelOrderNumber={}"
,
lendingFormModel
.
getChannelOrderNumber
());
optHistoryLog
.
setOptLogDetail
(
"放款操作失败,二次风控失败,未找到user"
);
optHistoryLog
.
setOptResult
(
false
);
optHistoryLogService
.
save
(
optHistoryLog
);
return
false
;
}
ChannelConf
channelConf
=
channelConfRepository
.
getByChannelId
(
lendingFormModel
.
getChannelId
());
if
(
channelConf
==
null
)
{
log
.
info
(
"[order_lending]二次风控失败,未找到channelConf配置 channelOrderNumber={}"
,
lendingFormModel
.
getChannelOrderNumber
());
optHistoryLog
.
setOptLogDetail
(
"放款操作失败,二次风控失败,未找到channelConf配置"
);
optHistoryLog
.
setOptResult
(
false
);
optHistoryLogService
.
save
(
optHistoryLog
);
return
false
;
}
Boolean
auditNotify
=
clothoCenterService
.
orderAuditNotify
(
xUser
.
getUuid
(),
orderMapping
.
getLoanId
(),
true
,
channelConf
.
getBizType
());
if
(
auditNotify
)
{
log
.
info
(
"[order_lending]放款操作,二次风控成功,继续,channelOrderNumber={}, result={}"
,
lendingFormModel
.
getChannelOrderNumber
(),
result
);
}
else
{
log
.
info
(
"[order_lending]二次风控失败,二次风控失败,clotho返回失败 channelOrderNumber={}"
,
lendingFormModel
.
getChannelOrderNumber
());
optHistoryLog
.
setOptLogDetail
(
"放款操作失败,二次风控失败,clotho返回失败"
);
optHistoryLog
.
setOptResult
(
false
);
optHistoryLogService
.
save
(
optHistoryLog
);
return
false
;
}
if
(
orderApprove
.
getFundType
()
==
0
)
{
// 如果是非存管
result
=
this
.
xyqbCenterService
.
payResultNotify
(
orderMapping
.
getLoanId
(),
lendingFormModel
.
getResult
());
...
...
src/main/java/cn/quantgroup/cashloanflowboss/spi/clotho/client/ClothoCenter.java
View file @
7acede24
...
...
@@ -22,6 +22,9 @@ public interface ClothoCenter {
@PostMapping
(
value
=
"/external/quota/auth_amount_audit/notify"
,
consumes
=
"application/x-www-form-urlencoded"
)
String
approve
(
@RequestParam
Map
approveData
);
@PostMapping
(
value
=
"/external/quota/order_audit/notify"
,
consumes
=
"application/x-www-form-urlencoded"
)
String
orderAuditNotify
(
@RequestParam
Map
notify
);
/**
* 生成放款MQ消息
*
...
...
@@ -66,6 +69,11 @@ public interface ClothoCenter {
return
"error1"
;
}
@Override
public
String
orderAuditNotify
(
Map
notify
)
{
return
null
;
}
@Override
public
String
generatorLendingMessage
(
Map
data
)
{
throw
new
ClothoCenterException
();
...
...
src/main/java/cn/quantgroup/cashloanflowboss/spi/clotho/service/ClothoCenterService.java
View file @
7acede24
...
...
@@ -26,6 +26,22 @@ public class ClothoCenterService {
@Value
(
"${debug.model}"
)
public
Boolean
debugModel
;
public
Boolean
orderAuditNotify
(
String
uuid
,
Long
loanId
,
boolean
auditResult
,
int
bizType
)
{
Map
notify
=
new
HashMap
();
notify
.
put
(
"code"
,
0
);
notify
.
put
(
"msg"
,
"success"
);
notify
.
put
(
"bizChannel"
,
1
);
notify
.
put
(
"uuid"
,
uuid
);
notify
.
put
(
"bizNo"
,
loanId
);
notify
.
put
(
"bizType"
,
bizType
);
notify
.
put
(
"auditResult"
,
auditResult
);
return
"success"
.
equals
(
clothoCenter
.
orderAuditNotify
(
notify
));
}
/**
* 生成放款MQ消息
*
...
...
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