Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
customer-service
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QG
customer-service
Commits
8e4bc1fe
Commit
8e4bc1fe
authored
Jun 03, 2020
by
xiaozhe.chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
运营系统替换中台接口
parent
e01fddf6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
85 additions
and
2 deletions
+85
-2
IIceService.java
...main/java/cn/quantgroup/customer/service/IIceService.java
+6
-0
IceServiceImpl.java
...a/cn/quantgroup/customer/service/impl/IceServiceImpl.java
+69
-0
OrderServiceImpl.java
...cn/quantgroup/customer/service/impl/OrderServiceImpl.java
+10
-2
No files found.
src/main/java/cn/quantgroup/customer/service/IIceService.java
View file @
8e4bc1fe
package
cn
.
quantgroup
.
customer
.
service
;
package
cn
.
quantgroup
.
customer
.
service
;
import
cn.quantgroup.customer.model.order.ApplyOrder
;
import
cn.quantgroup.customer.model.order.ApplyOrder
;
import
cn.quantgroup.customer.model.order.FlowNode
;
import
cn.quantgroup.customer.model.order.LoanOrder
;
import
cn.quantgroup.customer.rest.param.applyorder.ApplyOrderQuery
;
import
cn.quantgroup.customer.rest.param.applyorder.ApplyOrderQuery
;
import
cn.quantgroup.customer.rest.vo.JsonResult
;
import
cn.quantgroup.customer.rest.vo.JsonResult
;
import
java.util.List
;
public
interface
IIceService
{
public
interface
IIceService
{
JsonResult
<
ApplyOrder
>
findApplyOrders
(
ApplyOrderQuery
applyOrderQuery
);
JsonResult
<
ApplyOrder
>
findApplyOrders
(
ApplyOrderQuery
applyOrderQuery
);
JsonResult
<
LoanOrder
>
findLoanOrder
(
Long
loanId
);
JsonResult
<
List
<
FlowNode
>>
findFlowChart
(
String
orderNo
);
}
}
src/main/java/cn/quantgroup/customer/service/impl/IceServiceImpl.java
View file @
8e4bc1fe
package
cn
.
quantgroup
.
customer
.
service
.
impl
;
package
cn
.
quantgroup
.
customer
.
service
.
impl
;
import
cn.quantgroup.customer.model.order.ApplyOrder
;
import
cn.quantgroup.customer.model.order.ApplyOrder
;
import
cn.quantgroup.customer.model.order.FlowNode
;
import
cn.quantgroup.customer.model.order.LoanOrder
;
import
cn.quantgroup.customer.rest.param.applyorder.ApplyOrderQuery
;
import
cn.quantgroup.customer.rest.param.applyorder.ApplyOrderQuery
;
import
cn.quantgroup.customer.rest.vo.JsonResult
;
import
cn.quantgroup.customer.rest.vo.JsonResult
;
import
cn.quantgroup.customer.service.IIceService
;
import
cn.quantgroup.customer.service.IIceService
;
...
@@ -14,6 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -14,6 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.Objects
;
...
@@ -64,4 +67,70 @@ public class IceServiceImpl implements IIceService {
...
@@ -64,4 +67,70 @@ public class IceServiceImpl implements IIceService {
JsonResult
<
ApplyOrder
>
jsonResult
=
JSONTools
.
deserialize
(
result
,
typeToken
);
JsonResult
<
ApplyOrder
>
jsonResult
=
JSONTools
.
deserialize
(
result
,
typeToken
);
return
jsonResult
;
return
jsonResult
;
}
}
@Override
public
JsonResult
<
LoanOrder
>
findLoanOrder
(
Long
loanId
)
{
String
logPre
=
"IceService.findLoanOrder"
;
log
.
info
(
"{} 提现订单详情 loanId={}"
,
logPre
,
loanId
);
String
url
=
iceUrl
+
"/ex/customer_sys/loan/detail"
;
if
(
Objects
.
isNull
(
loanId
))
{
log
.
error
(
"{} 借款订单号为空 orderNo={}"
,
logPre
,
loanId
);
return
JsonResult
.
buildErrorStateResult
(
"借款订单号为空"
,
null
);
}
Map
<
String
,
Object
>
param
=
Maps
.
newHashMap
();
param
.
put
(
"loanId"
,
loanId
.
toString
());
Map
<
String
,
String
>
header
=
Maps
.
newHashMap
();
header
.
put
(
"Content-Type"
,
"application/x-www-form-urlencoded"
);
String
result
=
null
;
try
{
result
=
httpService
.
post
(
url
,
header
,
param
);
}
catch
(
Exception
e
)
{
log
.
error
(
"{} 远程调用异常 url={},param={}"
,
logPre
,
url
,
param
,
e
);
return
JsonResult
.
buildErrorStateResult
(
"网络异常"
,
null
);
}
if
(
StringUtils
.
isBlank
(
result
))
{
log
.
error
(
"{} 调用信用钱包失败 url={}, header={},param={},result={}"
,
logPre
,
url
,
header
,
param
,
result
);
return
JsonResult
.
buildErrorStateResult
(
"提现订单详情查询失败"
,
null
);
}
TypeReference
<
JsonResult
<
LoanOrder
>>
typeToken
=
new
TypeReference
<
JsonResult
<
LoanOrder
>>()
{
};
JsonResult
<
LoanOrder
>
jsonResult
=
JSONTools
.
deserialize
(
result
,
typeToken
);
return
jsonResult
;
}
@Override
public
JsonResult
<
List
<
FlowNode
>>
findFlowChart
(
String
orderNo
)
{
String
logPre
=
"IceService.findFlowChart"
;
log
.
info
(
"{} 流程日志查询 orderNo={}"
,
logPre
,
orderNo
);
String
url
=
iceUrl
+
"/ex/customer_sys/query/flow"
;
if
(
StringUtils
.
isEmpty
(
orderNo
))
{
log
.
error
(
"{} 申请订单号为空 orderNo={}"
,
logPre
,
orderNo
);
return
JsonResult
.
buildErrorStateResult
(
"申请订单号为空"
,
null
);
}
Map
<
String
,
Object
>
param
=
Maps
.
newHashMap
();
param
.
put
(
"orderNo"
,
orderNo
);
Map
<
String
,
String
>
header
=
Maps
.
newHashMap
();
header
.
put
(
"Content-Type"
,
"application/x-www-form-urlencoded"
);
String
result
=
null
;
try
{
result
=
httpService
.
post
(
url
,
header
,
param
);
}
catch
(
Exception
e
)
{
log
.
error
(
"{} 通讯异常 url={},param={}"
,
logPre
,
url
,
param
,
e
);
return
JsonResult
.
buildErrorStateResult
(
"通讯异常"
,
null
);
}
if
(
StringUtils
.
isBlank
(
result
))
{
log
.
error
(
"{} 调用信用钱包失败 url={}, header={},param={},result={}"
,
logPre
,
url
,
header
,
param
,
result
);
return
JsonResult
.
buildErrorStateResult
(
"流程日志查询失败"
,
null
);
}
TypeReference
<
JsonResult
<
List
<
FlowNode
>>>
typeToken
=
new
TypeReference
<
JsonResult
<
List
<
FlowNode
>>>()
{
};
JsonResult
<
List
<
FlowNode
>>
jsonResult
=
JSONTools
.
deserialize
(
result
,
typeToken
);
return
jsonResult
;
}
}
}
src/main/java/cn/quantgroup/customer/service/impl/OrderServiceImpl.java
View file @
8e4bc1fe
...
@@ -44,6 +44,10 @@ public class OrderServiceImpl implements IOrderService {
...
@@ -44,6 +44,10 @@ public class OrderServiceImpl implements IOrderService {
@Autowired
@Autowired
private
ISidecarService
sidecarService
;
private
ISidecarService
sidecarService
;
@Autowired
private
IIceService
iceService
;
@Override
@Override
public
JsonResult
<
List
<
FlowNode
>>
findFlowChart
(
String
applyOrderNo
)
{
public
JsonResult
<
List
<
FlowNode
>>
findFlowChart
(
String
applyOrderNo
)
{
...
@@ -58,7 +62,9 @@ public class OrderServiceImpl implements IOrderService {
...
@@ -58,7 +62,9 @@ public class OrderServiceImpl implements IOrderService {
log
.
info
(
"{},申请订单号查询orderMapping applyOrderNo={},data={}"
,
logPre
,
applyOrderNo
,
head
);
log
.
info
(
"{},申请订单号查询orderMapping applyOrderNo={},data={}"
,
logPre
,
applyOrderNo
,
head
);
}
}
JsonResult
<
List
<
FlowNode
>>
flowChart
=
xyqbService
.
findFlowChart
(
applyOrderNo
);
//JsonResult<List<FlowNode>> flowChart = xyqbService.findFlowChart(applyOrderNo);
//todo 替换中台接口
JsonResult
<
List
<
FlowNode
>>
flowChart
=
iceService
.
findFlowChart
(
applyOrderNo
);
if
(!
flowChart
.
isSuccess
())
{
if
(!
flowChart
.
isSuccess
())
{
log
.
error
(
"{} 流程图查询失败 result={}"
,
logPre
,
flowChart
);
log
.
error
(
"{} 流程图查询失败 result={}"
,
logPre
,
flowChart
);
return
flowChart
;
return
flowChart
;
...
@@ -83,7 +89,9 @@ public class OrderServiceImpl implements IOrderService {
...
@@ -83,7 +89,9 @@ public class OrderServiceImpl implements IOrderService {
public
JsonResult
<
LoanOrderDetail
>
getLoanOrderDetail
(
Long
loanId
)
{
public
JsonResult
<
LoanOrderDetail
>
getLoanOrderDetail
(
Long
loanId
)
{
String
logPre
=
"OrderServiceImpl.getLoanOrderDetail"
;
String
logPre
=
"OrderServiceImpl.getLoanOrderDetail"
;
log
.
info
(
"{} 提现详情 loanId={}"
,
logPre
,
loanId
);
log
.
info
(
"{} 提现详情 loanId={}"
,
logPre
,
loanId
);
JsonResult
<
LoanOrder
>
loanOrder
=
xyqbService
.
findLoanOrder
(
loanId
);
//JsonResult<LoanOrder> loanOrder = xyqbService.findLoanOrder(loanId);
//todo 替换中台接口
JsonResult
<
LoanOrder
>
loanOrder
=
iceService
.
findLoanOrder
(
loanId
);
if
(!
loanOrder
.
isSuccess
())
{
if
(!
loanOrder
.
isSuccess
())
{
log
.
error
(
"{} 提现订单查询失败 loanId={}, result={}"
,
logPre
,
loanId
,
loanOrder
);
log
.
error
(
"{} 提现订单查询失败 loanId={}, result={}"
,
logPre
,
loanId
,
loanOrder
);
...
...
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