Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
asset-distribution
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
data-spider
asset-distribution
Commits
e8cfb407
Commit
e8cfb407
authored
Sep 02, 2019
by
liwenbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
授信流程优化需求
parent
959e022c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
4 deletions
+37
-4
QGExceptionType.java
...ntgroup/asset/distribution/exception/QGExceptionType.java
+2
-1
AssetDistributeServiceImpl.java
...n/service/distribute/impl/AssetDistributeServiceImpl.java
+3
-1
INotifyService.java
...oup/asset/distribution/service/notify/INotifyService.java
+5
-0
NotifyServiceImpl.java
...t/distribution/service/notify/impl/NotifyServiceImpl.java
+27
-2
No files found.
src/main/java/com/quantgroup/asset/distribution/exception/QGExceptionType.java
View file @
e8cfb407
...
...
@@ -34,7 +34,8 @@ public enum QGExceptionType {
NO_DISTRIBUTE_NODE
(
2026
,
"未找到分发节点, uuid : %s, assetNo %s, records : %s"
),
NOTIFY_FUND_SERVER_ERROR
(
2041
,
"通知资金系统失败, uuid : %s, bizNo : %s, assetNo : %s"
),
NOT_FOUND_FUND_SERVER_RESULT_BIZNO
(
2042
,
"未找到资金结果通知订单, bizNo : %s, status : %s"
);
NOT_FOUND_FUND_SERVER_RESULT_BIZNO
(
2042
,
"未找到资金结果通知订单, bizNo : %s, status : %s"
),
NOTIFY_BUSINESS_FLOW_ERROR
(
2042
,
"通知业务流系统订单终态失败, bizNo : %s, status : %s"
);
...
...
src/main/java/com/quantgroup/asset/distribution/service/distribute/impl/AssetDistributeServiceImpl.java
View file @
e8cfb407
...
...
@@ -211,7 +211,9 @@ public class AssetDistributeServiceImpl implements IAssetDistributeService{
Stopwatch
stopwatch
=
Stopwatch
.
createStarted
();
// 1、更改分配记录状态
assetDistributeRecordService
.
updateAssetDistributeStatus
(
bizNo
,
fundingResult
==
FundingResult
.
FUAD_ASSIGN_SUCC
?
StatusConstants
.
SUCCESS
:
StatusConstants
.
FAIL
);
// 2、重新进行分发, 目前还没有,等接了助贷资金路由以后再增加
// 2、通知业务流系统
notifyService
.
notifyBusinessFlow
(
bizNo
,
fundingResult
==
FundingResult
.
FUAD_ASSIGN_SUCC
?
StatusConstants
.
SUCCESS
:
StatusConstants
.
FAIL
);
// 3、重新进行分发, 目前还没有,等接了助贷资金路由以后再增加
log
.
info
(
"资产分发接收资金结果处理结束, bizNo : {}, fundingResult : {}, 耗时 : {}"
,
bizNo
,
fundingResult
.
getCode
(),
stopwatch
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
));
}
catch
(
QGException
qe
)
{
log
.
error
(
"资产分发接收资金结果处理出现错误 : {}, bizNo : {}, fundingResult : {}"
,
qe
.
qgExceptionType
.
code
+
"->"
+
qe
.
detail
,
bizNo
,
fundingResult
.
getCode
())
;
...
...
src/main/java/com/quantgroup/asset/distribution/service/notify/INotifyService.java
View file @
e8cfb407
...
...
@@ -14,4 +14,9 @@ public interface INotifyService {
* @param assetForm
*/
public
void
notifyFundServer
(
AssetForm
assetForm
);
/**
* 通知业务流系统
*/
public
void
notifyBusinessFlow
(
String
bizNo
,
Integer
status
);
}
src/main/java/com/quantgroup/asset/distribution/service/notify/impl/NotifyServiceImpl.java
View file @
e8cfb407
package
com
.
quantgroup
.
asset
.
distribution
.
service
.
notify
.
impl
;
import
java.util.HashMap
;
import
java.util.Map
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.quantgroup.asset.distribution.exception.QGException
;
import
com.quantgroup.asset.distribution.exception.QGExceptionType
;
import
com.quantgroup.asset.distribution.model.form.AssetForm
;
import
com.quantgroup.asset.distribution.service.alarm.IAlarmService
;
import
com.quantgroup.asset.distribution.service.distribute.IDistributeFailLogService
;
import
com.quantgroup.asset.distribution.service.httpclient.IHttpService
;
import
com.quantgroup.asset.distribution.service.notify.INotifyService
;
...
...
@@ -25,9 +25,13 @@ public class NotifyServiceImpl implements INotifyService{
@Value
(
"${isDebug}"
)
private
Boolean
isDebug
;
@Value
(
"${business.flow.url}"
)
private
String
businessFlowURL
;
@Autowired
private
IHttpService
httpService
;
@Autowired
private
IAlarmService
alarmService
;
@Override
public
void
notifyFundServer
(
AssetForm
assetForm
)
{
...
...
@@ -43,4 +47,25 @@ public class NotifyServiceImpl implements INotifyService{
throw
new
QGException
(
QGExceptionType
.
NOTIFY_FUND_SERVER_ERROR
,
assetForm
.
getUuid
(),
assetForm
.
getBizNo
(),
assetForm
.
getAssetNo
());
}
}
@Override
public
void
notifyBusinessFlow
(
String
bizNo
,
Integer
status
)
{
try
{
if
(
isDebug
)
{
return
;
}
log
.
info
(
"通知业务流系统订单终态开始, bizNo : {}, status : {}"
,
bizNo
,
status
);
String
response
=
httpService
.
post
(
businessFlowURL
+
"/ex/inner/accept_info"
,
new
HashMap
<
String
,
String
>(){{
put
(
"applyNo"
,
bizNo
);
put
(
"status"
,
status
+
""
);
put
(
"type"
,
"5"
);
}});
log
.
info
(
"通知业务流系统订单终态结束, bizNo : {}, status : {}, response : {}"
,
bizNo
,
status
,
response
);
JSONObject
data
=
null
;
if
(
StringUtils
.
isEmpty
(
response
)
||
(
data
=
JSON
.
parseObject
(
response
)).
getInteger
(
"code"
)
!=
0
)
{
throw
new
QGException
(
QGExceptionType
.
NOTIFY_BUSINESS_FLOW_ERROR
,
bizNo
,
status
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"资产分发订单终态通知业务流系统异常, bizNo : {}, status : {}"
,
bizNo
,
status
);
alarmService
.
dingtalkAlarm
(
"Warn"
,
"通知业务流系统订单终态异常"
,
"bizNo : "
+
bizNo
+
" , "
+
"status : "
+
status
);
}
}
}
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