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
e01fddf6
Commit
e01fddf6
authored
Jun 03, 2020
by
xiaozhe.chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
运营系统替换中台接口
parent
446ea102
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
83 additions
and
2 deletions
+83
-2
IIceService.java
...main/java/cn/quantgroup/customer/service/IIceService.java
+9
-0
IceServiceImpl.java
...a/cn/quantgroup/customer/service/impl/IceServiceImpl.java
+67
-0
UserServiceImpl.java
.../cn/quantgroup/customer/service/impl/UserServiceImpl.java
+7
-2
No files found.
src/main/java/cn/quantgroup/customer/service/IIceService.java
0 → 100644
View file @
e01fddf6
package
cn
.
quantgroup
.
customer
.
service
;
import
cn.quantgroup.customer.model.order.ApplyOrder
;
import
cn.quantgroup.customer.rest.param.applyorder.ApplyOrderQuery
;
import
cn.quantgroup.customer.rest.vo.JsonResult
;
public
interface
IIceService
{
JsonResult
<
ApplyOrder
>
findApplyOrders
(
ApplyOrderQuery
applyOrderQuery
);
}
src/main/java/cn/quantgroup/customer/service/impl/IceServiceImpl.java
0 → 100644
View file @
e01fddf6
package
cn
.
quantgroup
.
customer
.
service
.
impl
;
import
cn.quantgroup.customer.model.order.ApplyOrder
;
import
cn.quantgroup.customer.rest.param.applyorder.ApplyOrderQuery
;
import
cn.quantgroup.customer.rest.vo.JsonResult
;
import
cn.quantgroup.customer.service.IIceService
;
import
cn.quantgroup.customer.service.http.IHttpService
;
import
cn.quantgroup.customer.util.JSONTools
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.google.common.collect.Maps
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
java.util.Map
;
import
java.util.Objects
;
@Slf4j
@Service
(
"iceService"
)
public
class
IceServiceImpl
implements
IIceService
{
@Value
(
"${mo.ice.http}"
)
private
String
iceUrl
;
private
final
IHttpService
httpService
;
@Autowired
public
IceServiceImpl
(
IHttpService
httpService
)
{
this
.
httpService
=
httpService
;
}
@Override
public
JsonResult
<
ApplyOrder
>
findApplyOrders
(
ApplyOrderQuery
applyOrderQuery
)
{
String
logPre
=
"IceService.findApplyOrders"
;
log
.
info
(
"{} 申请订单查询 applyOrderQuery={}"
,
logPre
,
applyOrderQuery
);
String
orderNo
=
applyOrderQuery
.
getOrderNo
();
Long
loanId
=
applyOrderQuery
.
getLoanId
();
Long
userId
=
applyOrderQuery
.
getUserId
();
String
url
=
iceUrl
+
"/ex/customer_sys/query/applyOrder"
;
Map
<
String
,
Object
>
param
=
Maps
.
newHashMap
();
if
(
StringUtils
.
isNotEmpty
(
orderNo
))
{
param
.
put
(
"orderNo"
,
orderNo
);
}
if
(
Objects
.
nonNull
(
userId
))
{
param
.
put
(
"userId"
,
userId
.
toString
());
}
if
(
Objects
.
nonNull
(
loanId
))
{
param
.
put
(
"loanId"
,
loanId
.
toString
());
}
Map
<
String
,
String
>
header
=
Maps
.
newHashMap
();
header
.
put
(
"Content-Type"
,
"application/x-www-form-urlencoded"
);
String
result
=
httpService
.
post
(
url
,
header
,
param
);
log
.
info
(
"{} 用户申请订单列表 url={}, header={},param={},result={}"
,
logPre
,
url
,
header
,
param
,
result
);
if
(
StringUtils
.
isBlank
(
result
))
{
log
.
error
(
"{} 调用信用钱包失败 url={}, header={},param={},result={}"
,
logPre
,
url
,
header
,
param
,
result
);
return
JsonResult
.
buildErrorStateResult
(
"申请订单查询失败"
,
null
);
}
TypeReference
<
JsonResult
<
ApplyOrder
>>
typeToken
=
new
TypeReference
<
JsonResult
<
ApplyOrder
>>()
{
};
JsonResult
<
ApplyOrder
>
jsonResult
=
JSONTools
.
deserialize
(
result
,
typeToken
);
return
jsonResult
;
}
}
src/main/java/cn/quantgroup/customer/service/impl/UserServiceImpl.java
View file @
e01fddf6
...
@@ -20,6 +20,7 @@ import cn.quantgroup.customer.rest.param.user.UserCombinationParam;
...
@@ -20,6 +20,7 @@ import cn.quantgroup.customer.rest.param.user.UserCombinationParam;
import
cn.quantgroup.customer.rest.param.user.UserQueryParam
;
import
cn.quantgroup.customer.rest.param.user.UserQueryParam
;
import
cn.quantgroup.customer.rest.vo.JsonResult
;
import
cn.quantgroup.customer.rest.vo.JsonResult
;
import
cn.quantgroup.customer.rest.vo.MoResult
;
import
cn.quantgroup.customer.rest.vo.MoResult
;
import
cn.quantgroup.customer.service.IIceService
;
import
cn.quantgroup.customer.service.IKaService
;
import
cn.quantgroup.customer.service.IKaService
;
import
cn.quantgroup.customer.service.IUserService
;
import
cn.quantgroup.customer.service.IUserService
;
import
cn.quantgroup.customer.service.IXyqbService
;
import
cn.quantgroup.customer.service.IXyqbService
;
...
@@ -69,14 +70,16 @@ public class UserServiceImpl implements IUserService {
...
@@ -69,14 +70,16 @@ public class UserServiceImpl implements IUserService {
private
final
IXyqbService
xyqbService
;
private
final
IXyqbService
xyqbService
;
private
final
IKaService
kaService
;
private
final
IKaService
kaService
;
private
final
IIceService
iceService
;
@Autowired
@Autowired
public
UserServiceImpl
(
UserRepo
userRepo
,
IHttpService
httpService
,
UserSdkImpl
userSdk
,
IXyqbService
xyqbService
,
IKaService
kaService
)
{
public
UserServiceImpl
(
UserRepo
userRepo
,
IHttpService
httpService
,
UserSdkImpl
userSdk
,
IXyqbService
xyqbService
,
IKaService
kaService
,
IIceService
iceService
)
{
this
.
userRepo
=
userRepo
;
this
.
userRepo
=
userRepo
;
this
.
httpService
=
httpService
;
this
.
httpService
=
httpService
;
this
.
userSdk
=
userSdk
;
this
.
userSdk
=
userSdk
;
this
.
xyqbService
=
xyqbService
;
this
.
xyqbService
=
xyqbService
;
this
.
kaService
=
kaService
;
this
.
kaService
=
kaService
;
this
.
iceService
=
iceService
;
}
}
@Override
@Override
...
@@ -495,7 +498,9 @@ public class UserServiceImpl implements IUserService {
...
@@ -495,7 +498,9 @@ public class UserServiceImpl implements IUserService {
applyOrderQuery
.
setLoanId
(
loanId
);
applyOrderQuery
.
setLoanId
(
loanId
);
applyOrderQuery
.
setOrderNo
(
applyNo
);
applyOrderQuery
.
setOrderNo
(
applyNo
);
//申请订单查询
//申请订单查询
JsonResult
<
ApplyOrder
>
applyOrders
=
xyqbService
.
findApplyOrders
(
applyOrderQuery
);
//JsonResult<ApplyOrder> applyOrders = xyqbService.findApplyOrders(applyOrderQuery);
//todo 替换中台接口
JsonResult
<
ApplyOrder
>
applyOrders
=
iceService
.
findApplyOrders
(
applyOrderQuery
);
return
applyOrders
;
return
applyOrders
;
}
}
...
...
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