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
8a88df58
Commit
8a88df58
authored
Sep 26, 2019
by
suntao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
推送记录 通知类型 转中文
parent
5634c66d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
82 deletions
+26
-82
OrderServiceImpl.java
.../cashloanflowboss/api/order/service/OrderServiceImpl.java
+14
-25
OrderUtil.java
...quantgroup/cashloanflowboss/api/order/util/OrderUtil.java
+11
-56
CallbackRecordVoModel.java
...cashloanflowboss/spi/clf/model/CallbackRecordVoModel.java
+1
-1
No files found.
src/main/java/cn/quantgroup/cashloanflowboss/api/order/service/OrderServiceImpl.java
View file @
8a88df58
...
...
@@ -4,7 +4,6 @@ import cn.quantgroup.cashloanflowboss.api.optlog.model.OptEnumName;
import
cn.quantgroup.cashloanflowboss.api.optlog.service.OptHistoryLogServiceImpl
;
import
cn.quantgroup.cashloanflowboss.core.annotation.opt.OperationAnno
;
import
cn.quantgroup.cashloanflowboss.core.base.Tuple
;
import
cn.quantgroup.cashloanflowboss.core.tuple.ThreeTuple
;
import
cn.quantgroup.cashloanflowboss.spi.clf.entity.CallbackFailRecord
;
import
cn.quantgroup.cashloanflowboss.spi.clf.model.LoanProgress
;
...
...
@@ -460,7 +459,6 @@ public class OrderServiceImpl implements OrderService{
if
(
orderMapping
==
null
)
{
return
historyOrderStatusVoModel
;
}
OrderApprove
orderApprove
=
orderApproveRepository
.
findByCreditNumber
(
orderMapping
.
getApplyNo
());
ServiceResult
<
XyqbHistoryOrderStatusServiceResultModel
>
xyqbOrderHistoryStatusResult
=
xyqbCenterService
.
getXyqbOrderHistoryStatus
(
orderMapping
.
getApplyNo
(),
orderMapping
.
getLoanId
());
if
(
xyqbOrderHistoryStatusResult
.
isSuccess
())
{
...
...
@@ -469,7 +467,7 @@ public class OrderServiceImpl implements OrderService{
List
<
VoOrderStatus
>
historyStatusList
=
new
ArrayList
<>();
for
(
QueryXyqbOrderStatus
queryXyqbOrderStatus
:
data
.
getHistoryStatus
())
{
VoOrderStatus
voOrderStatus
=
new
VoOrderStatus
();
Tuple
<
String
,
String
>
stautsName
=
OrderUtil
.
KaNoticeTypeNameConvertChnName
(
queryXyqbOrderStatus
.
getStatus
()
,
orderApprove
);
Tuple
<
String
,
String
>
stautsName
=
OrderUtil
.
KaNoticeTypeNameConvertChnName
(
queryXyqbOrderStatus
.
getStatus
());
voOrderStatus
.
setStatus
(
stautsName
.
getValue
());
voOrderStatus
.
setUpdateTime
(
new
Date
(
queryXyqbOrderStatus
.
getUpdateTime
()));
historyStatusList
.
add
(
voOrderStatus
);
...
...
@@ -584,7 +582,10 @@ public class OrderServiceImpl implements OrderService{
callbackRecordVoModel
.
setApplyNo
(
orderMapping
.
getApplyNo
());
callbackRecordVoModel
.
setLoanId
(
orderMapping
.
getLoanId
());
callbackRecordVoModel
.
setTermNo
(
callbackRecord
.
getTermNo
());
callbackRecordVoModel
.
setNoticeType
(
callbackRecord
.
getNoticeType
());
Tuple
<
String
,
String
>
stringStringTuple
=
OrderUtil
.
KaNoticeTypeNameConvertChnName
(
callbackRecord
.
getNoticeType
());
callbackRecordVoModel
.
setNoticeType
(
stringStringTuple
!=
null
?
stringStringTuple
.
getValue
()
:
callbackRecord
.
getNoticeType
().
name
());
callbackRecordVoModel
.
setCallbackStatus
(
callbackRecord
.
getCallbackStatus
());
callbackRecordVoModel
.
setChannelId
(
callbackRecord
.
getChannelId
());
callbackRecordVoModel
.
setCreatedAt
(
callbackRecord
.
getCreatedAt
());
...
...
@@ -602,7 +603,10 @@ public class OrderServiceImpl implements OrderService{
callbackFailRecordVoModel
.
setApplyNo
(
orderMapping
.
getApplyNo
());
callbackFailRecordVoModel
.
setLoanId
(
orderMapping
.
getLoanId
());
callbackFailRecordVoModel
.
setTermNo
(
callbackFailRecord
.
getTermNo
());
callbackFailRecordVoModel
.
setNoticeType
(
callbackFailRecord
.
getNoticeType
());
Tuple
<
String
,
String
>
stringStringTuple
=
OrderUtil
.
KaNoticeTypeNameConvertChnName
(
callbackFailRecord
.
getNoticeType
());
callbackFailRecordVoModel
.
setNoticeType
(
stringStringTuple
!=
null
?
stringStringTuple
.
getValue
()
:
callbackFailRecord
.
getNoticeType
().
name
());
callbackFailRecordVoModel
.
setCallbackStatus
(
callbackFailRecord
.
getCallbackStatus
());
callbackFailRecordVoModel
.
setChannelId
(
callbackFailRecord
.
getChannelId
());
callbackFailRecordVoModel
.
setRetryTimes
(
callbackFailRecord
.
getRetryTimes
());
...
...
@@ -717,10 +721,10 @@ public class OrderServiceImpl implements OrderService{
buttonPaySucc
.
setAction
(
OrderVo
.
OptButtonAction
.
pay_succ
.
name
());
buttonPaySucc
.
setName
(
OrderVo
.
OptButtonAction
.
pay_succ
.
getDesc
());
buttonList
.
add
(
buttonPaySucc
);
OrderVo
.
OptButton
buttonPayFail
=
new
OrderVo
.
OptButton
();
buttonPayFail
.
setAction
(
OrderVo
.
OptButtonAction
.
pay_fail
.
name
());
buttonPayFail
.
setName
(
OrderVo
.
OptButtonAction
.
pay_fail
.
getDesc
());
buttonList
.
add
(
buttonPayFail
);
//
OrderVo.OptButton buttonPayFail = new OrderVo.OptButton();
//
buttonPayFail.setAction(OrderVo.OptButtonAction.pay_fail.name());
//
buttonPayFail.setName(OrderVo.OptButtonAction.pay_fail.getDesc());
//
buttonList.add(buttonPayFail);
buttonList
.
add
(
buttonBeforeCancel
);
}
tuple
.
setValue
(
buttonList
);
...
...
@@ -740,22 +744,7 @@ public class OrderServiceImpl implements OrderService{
tuple
.
setValue
(
buttonList
);
return
tuple
;
case
"FUND_SUCC"
:
OrderApprove
orderApprove2
=
orderApproveRepository
.
findByCreditNumber
(
orderMapping
.
getApplyNo
());
if
(
orderApprove2
!=
null
&&
orderApprove2
.
getFundType
()
!=
0
)
{
// 是存管
tuple
.
setKey
(
"放款到存管,待存管提现"
);
OrderVo
.
OptButton
cancelAfterButton
=
new
OrderVo
.
OptButton
();
cancelAfterButton
.
setAction
(
OrderVo
.
OptButtonAction
.
cancel_after
.
name
());
cancelAfterButton
.
setName
(
OrderVo
.
OptButtonAction
.
cancel_after
.
getDesc
());
buttonList
.
add
(
cancelAfterButton
);
OrderVo
.
OptButton
withdrawSecondButton
=
new
OrderVo
.
OptButton
();
withdrawSecondButton
.
setAction
(
OrderVo
.
OptButtonAction
.
withdraw_second
.
name
());
withdrawSecondButton
.
setName
(
OrderVo
.
OptButtonAction
.
withdraw_second
.
getDesc
());
buttonList
.
add
(
withdrawSecondButton
);
}
else
{
tuple
.
setKey
(
"放款成功"
);
}
tuple
.
setValue
(
buttonList
);
return
tuple
;
case
"FUND_WITHDRAW_SUCC"
:
tuple
.
setKey
(
"存管提现成功"
);
...
...
src/main/java/cn/quantgroup/cashloanflowboss/api/order/util/OrderUtil.java
View file @
8a88df58
...
...
@@ -29,50 +29,11 @@ public class OrderUtil {
* @param kaNoticeType
* @return 状态英文,状态中文
*/
public
static
Tuple
<
String
,
String
>
KaNoticeTypeConvertChnName
(
KANoticeType
kaNoticeType
,
OrderApprove
orderApprove
)
{
if
(
kaNoticeType
!=
null
)
{
switch
(
kaNoticeType
.
name
())
{
case
"CREDIT_SUCC"
:
// 授信成功 需要 审批
return
new
Tuple
(
"CREDIT_SUCC"
,
"授信成功"
);
case
"APPROVE_ING"
:
if
(
orderApprove
==
null
)
{
return
new
Tuple
(
"APPROVE_ING"
,
"授信成功,待审批"
);
}
else
{
return
new
Tuple
(
"APPROVE_ING"
,
"审批中"
);
public
static
Tuple
<
String
,
String
>
KaNoticeTypeNameConvertChnName
(
KANoticeType
kaNoticeType
)
{
if
(
kaNoticeType
==
null
)
{
return
new
Tuple
(
""
,
"未知"
);
}
case
"REJECT"
:
return
new
Tuple
(
kaNoticeType
.
name
(),
"审批拒绝"
);
case
"FUAD_ASSIFN_SUCC"
:
return
new
Tuple
(
kaNoticeType
.
name
(),
"审批通过,待提现"
);
case
"WITHDRAW"
:
// 提现申请成功 需要放款
return
new
Tuple
(
kaNoticeType
.
name
(),
"申请提现成功"
);
case
"PAY_ING"
:
return
new
Tuple
(
"PAY_ING"
,
"放款中"
);
case
"FUND_SUCC"
:
if
(
orderApprove
!=
null
&&
orderApprove
.
getFundType
()
!=
0
)
{
// 是存管
return
new
Tuple
(
kaNoticeType
.
name
(),
"放款到存管,待提现"
);
}
else
{
return
new
Tuple
(
kaNoticeType
.
name
(),
"放款成功"
);
}
case
"FUND_WITHDRAW_SUCC"
:
return
new
Tuple
(
kaNoticeType
.
name
(),
"存管提现成功"
);
case
"FUND_FAIL"
:
return
new
Tuple
(
kaNoticeType
.
name
(),
"放款失败"
);
case
"ALL_REPAID"
:
return
new
Tuple
(
kaNoticeType
.
name
(),
"已结清"
);
case
"CANCEL_LOAN"
:
return
new
Tuple
(
kaNoticeType
.
name
(),
"已关单"
);
case
"CANCEL_AFTER_LOAN"
:
return
new
Tuple
(
kaNoticeType
.
name
(),
"存管提现超时或贷后关单"
);
default
:
return
new
Tuple
(
kaNoticeType
.
name
(),
"未知状态"
);
}
}
return
new
Tuple
(
kaNoticeType
.
name
(),
"未知状态"
);
return
KaNoticeTypeNameConvertChnName
(
kaNoticeType
.
name
());
}
/**
...
...
@@ -80,26 +41,25 @@ public class OrderUtil {
* @param kaNoticeType
* @return 状态英文,状态中文
*/
public
static
Tuple
<
String
,
String
>
KaNoticeTypeNameConvertChnName
(
String
kaNoticeType
,
OrderApprove
orderApprove
)
{
public
static
Tuple
<
String
,
String
>
KaNoticeTypeNameConvertChnName
(
String
kaNoticeType
)
{
if
(
StringUtils
.
isNotEmpty
(
kaNoticeType
))
{
switch
(
kaNoticeType
)
{
case
"CREDIT_SUCC"
:
// 授信成功 需要 审批
return
new
Tuple
(
"CREDIT_SUCC"
,
"授信成功"
);
case
"APPROVE_ING"
:
if
(
orderApprove
==
null
)
{
return
new
Tuple
(
"APPROVE_ING"
,
"授信成功"
);
}
else
{
//
if (orderApprove == null) {
//
return new Tuple("APPROVE_ING", "授信成功");
//
} else {
return
new
Tuple
(
"APPROVE_ING"
,
"审批中"
);
}
//
}
case
"REJECT"
:
return
new
Tuple
(
kaNoticeType
,
"审批拒绝"
);
case
"FUAD_ASSIFN_SUCC"
:
return
new
Tuple
(
kaNoticeType
,
"审批通过"
);
case
"WITHDRAW_APPROVING"
:
// 等待二次风控审批 审批中
return
new
Tuple
(
kaNoticeType
,
"
提现(二次)
审批中"
);
return
new
Tuple
(
kaNoticeType
,
"
二次风控
审批中"
);
case
"WITHDRAW"
:
// 提现申请成功 需要放款
return
new
Tuple
(
kaNoticeType
,
"申请提现成功"
);
...
...
@@ -108,12 +68,7 @@ public class OrderUtil {
case
"FUND_WAITING_WITHDRAW"
:
return
new
Tuple
(
"FUND_WAITING_WITHDRAW"
,
"放款到存管账户,待二次提现"
);
case
"FUND_SUCC"
:
if
(
orderApprove
!=
null
&&
orderApprove
.
getFundType
()
!=
0
)
{
// 是存管
return
new
Tuple
(
kaNoticeType
,
"放款到存管"
);
}
else
{
return
new
Tuple
(
kaNoticeType
,
"放款成功"
);
}
case
"FUND_WITHDRAW_SUCC"
:
return
new
Tuple
(
kaNoticeType
,
"存管提现成功"
);
case
"FUND_FAIL"
:
...
...
src/main/java/cn/quantgroup/cashloanflowboss/spi/clf/model/CallbackRecordVoModel.java
View file @
8a88df58
...
...
@@ -24,7 +24,7 @@ public class CallbackRecordVoModel {
private
Long
termNo
;
private
KANoticeType
noticeType
;
private
String
noticeType
;
private
Integer
callbackStatus
;
...
...
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