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
b3d6b32c
Commit
b3d6b32c
authored
Mar 11, 2020
by
王向伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
综合查询修改
parent
eeffdbe1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
34 deletions
+44
-34
UserServiceImpl.java
.../cn/quantgroup/customer/service/impl/UserServiceImpl.java
+44
-34
No files found.
src/main/java/cn/quantgroup/customer/service/impl/UserServiceImpl.java
View file @
b3d6b32c
...
@@ -369,61 +369,37 @@ public class UserServiceImpl implements IUserService {
...
@@ -369,61 +369,37 @@ public class UserServiceImpl implements IUserService {
log
.
error
(
"{},参数验证失败,{}"
,
logPre
,
tuple
.
getValue
());
log
.
error
(
"{},参数验证失败,{}"
,
logPre
,
tuple
.
getValue
());
return
JsonResult
.
buildErrorStateResult
(
tuple
.
getValue
(),
null
);
return
JsonResult
.
buildErrorStateResult
(
tuple
.
getValue
(),
null
);
}
}
//查询用户
JsonResult
<
List
<
ApplyOrder
>>
applyOrders
;
JsonResult
userInfo
;
JsonResult
userInfo
;
if
(
"
2
"
.
equals
(
tuple
.
getValue
()))
{
if
(
"
1
"
.
equals
(
tuple
.
getValue
()))
{
//
用户
参数查询
//
订单
参数查询
OrderQueryParam
orderQueryParam
=
new
OrderQueryParam
();
OrderQueryParam
orderQueryParam
=
new
OrderQueryParam
();
orderQueryParam
.
setApplyOrderNo
(
userCombinationParam
.
getOrderNo
());
orderQueryParam
.
setApplyOrderNo
(
userCombinationParam
.
getOrderNo
());
orderQueryParam
.
setLoanId
(
userCombinationParam
.
getLoanId
());
orderQueryParam
.
setLoanId
(
userCombinationParam
.
getLoanId
());
orderQueryParam
.
setChannelId
(
userCombinationParam
.
getChannelId
());
orderQueryParam
.
setChannelId
(
userCombinationParam
.
getChannelId
());
orderQueryParam
.
setChannelOrderNo
(
userCombinationParam
.
getChannelOrderNo
());
orderQueryParam
.
setChannelOrderNo
(
userCombinationParam
.
getChannelOrderNo
());
userInfo
=
this
.
findUserInfoByOrderParam
(
orderQueryParam
);
userInfo
=
this
.
findUserInfoByOrderParam
(
orderQueryParam
);
}
else
{
applyOrders
=
findApplyOrders
(
orderQueryParam
);
//订单参数查询
}
else
{
//用户参数查询
UserQueryParam
userQueryParam
=
new
UserQueryParam
();
UserQueryParam
userQueryParam
=
new
UserQueryParam
();
userQueryParam
.
setIdNo
(
userCombinationParam
.
getIdNo
());
userQueryParam
.
setIdNo
(
userCombinationParam
.
getIdNo
());
userQueryParam
.
setPhoneNo
(
userCombinationParam
.
getPhoneNo
());
userQueryParam
.
setPhoneNo
(
userCombinationParam
.
getPhoneNo
());
userQueryParam
.
setUserId
(
userCombinationParam
.
getUserId
());
userQueryParam
.
setUserId
(
userCombinationParam
.
getUserId
());
userQueryParam
.
setUuid
(
userCombinationParam
.
getUuid
());
userQueryParam
.
setUuid
(
userCombinationParam
.
getUuid
());
userInfo
=
this
.
findUserInfo
(
userQueryParam
);
userInfo
=
this
.
findUserInfo
(
userQueryParam
);
applyOrders
=
findApplyOrders
(
userQueryParam
);
}
}
if
(!
userInfo
.
isSuccess
())
{
if
(!
userInfo
.
isSuccess
())
{
return
userInfo
;
return
userInfo
;
}
}
UserBasicInfo
userBasicInfo
=
(
UserBasicInfo
)
userInfo
.
getData
();
//查询订单
ApplyOrderQuery
applyOrderQuery
=
new
ApplyOrderQuery
();
if
(
"2"
.
equals
(
tuple
.
getValue
())){
applyOrderQuery
.
setUserId
(
userBasicInfo
.
getUserId
());
}
else
{
Long
loanId
=
userCombinationParam
.
getLoanId
();
String
applyNo
=
userCombinationParam
.
getOrderNo
();
//申请订单查询(如果查询参数是渠道订单号)将渠道订单号转为借款订单号和申请订单号
if
(
StringUtils
.
isNotBlank
(
userCombinationParam
.
getChannelOrderNo
()))
{
OrderQueryParam
orderQueryParam
=
new
OrderQueryParam
();
orderQueryParam
.
setChannelId
(
userCombinationParam
.
getChannelId
());
orderQueryParam
.
setChannelOrderNo
(
userCombinationParam
.
getChannelOrderNo
());
JsonResult
<
LoanOrderMapping
>
orderMappingJsonResult
=
kaService
.
findOrderMapping
(
orderQueryParam
);
LoanOrderMapping
data
;
if
(!
orderMappingJsonResult
.
isSuccess
()
||
Objects
.
isNull
(
data
=
orderMappingJsonResult
.
getData
()))
{
log
.
error
(
"{} 根据渠道号查询orderMapping失败 result={}"
,
logPre
,
orderMappingJsonResult
);
return
orderMappingJsonResult
;
}
loanId
=
data
.
getLoanId
();
applyNo
=
data
.
getApplyNo
();
}
applyOrderQuery
.
setLoanId
(
loanId
);
applyOrderQuery
.
setOrderNo
(
applyNo
);
}
//申请订单查询
JsonResult
<
List
<
ApplyOrder
>>
applyOrders
=
xyqbService
.
findApplyOrders
(
applyOrderQuery
);
if
(!
applyOrders
.
isSuccess
())
{
if
(!
applyOrders
.
isSuccess
())
{
return
applyOrders
;
return
applyOrders
;
}
}
UserBasicInfo
userBasicInfo
=
(
UserBasicInfo
)
userInfo
.
getData
();
List
<
ApplyOrder
>
applyOrderList
=
applyOrders
.
getData
();
List
<
ApplyOrder
>
applyOrderList
=
applyOrders
.
getData
();
//通过申请订单号获得渠道订单号
//通过申请订单号获得渠道订单号
List
<
String
>
applyOrderNoList
=
applyOrderList
.
stream
().
map
(
e
->
e
.
getApplyOrderNo
()).
distinct
().
collect
(
Collectors
.
toList
());
List
<
String
>
applyOrderNoList
=
applyOrderList
.
stream
().
map
(
e
->
e
.
getApplyOrderNo
()).
distinct
().
collect
(
Collectors
.
toList
());
...
@@ -431,17 +407,51 @@ public class UserServiceImpl implements IUserService {
...
@@ -431,17 +407,51 @@ public class UserServiceImpl implements IUserService {
if
(!
mapJsonResult
.
isSuccess
())
{
if
(!
mapJsonResult
.
isSuccess
())
{
return
mapJsonResult
;
return
mapJsonResult
;
}
}
Map
<
String
,
String
>
data
=
mapJsonResult
.
getData
();
Map
<
String
,
String
>
data
=
mapJsonResult
.
getData
();
applyOrderList
.
forEach
(
e
->
e
.
setChannelOrderNo
(
data
.
get
(
e
.
getApplyOrderNo
())));
applyOrderList
.
forEach
(
e
->
e
.
setChannelOrderNo
(
data
.
get
(
e
.
getApplyOrderNo
())));
UserCombination
userCombination
=
new
UserCombination
();
UserCombination
userCombination
=
new
UserCombination
();
userCombination
.
setUserInfo
(
userBasicInfo
);
userCombination
.
setUserInfo
(
userBasicInfo
);
userCombination
.
setApplyOrderList
(
applyOrderList
);
userCombination
.
setApplyOrderList
(
applyOrderList
);
return
JsonResult
.
buildSuccessResult
(
""
,
userCombination
);
return
JsonResult
.
buildSuccessResult
(
""
,
userCombination
);
}
}
//订单信息综合查询
private
JsonResult
findApplyOrders
(
OrderQueryParam
orderQueryParam
)
{
String
logPre
=
"UserService.findApplyOrders"
;
ApplyOrderQuery
applyOrderQuery
=
new
ApplyOrderQuery
();
Long
loanId
=
orderQueryParam
.
getLoanId
();
String
applyNo
=
orderQueryParam
.
getApplyOrderNo
();
//申请订单查询(如果查询参数是渠道订单号)将渠道订单号转为借款订单号和申请订单号
if
(
StringUtils
.
isNotBlank
(
orderQueryParam
.
getChannelOrderNo
()))
{
JsonResult
<
LoanOrderMapping
>
orderMappingJsonResult
=
kaService
.
findOrderMapping
(
orderQueryParam
);
LoanOrderMapping
data
;
if
(!
orderMappingJsonResult
.
isSuccess
()
||
Objects
.
isNull
(
data
=
orderMappingJsonResult
.
getData
()))
{
log
.
error
(
"{} 根据渠道号查询orderMapping失败 result={}"
,
logPre
,
orderMappingJsonResult
);
return
orderMappingJsonResult
;
}
loanId
=
data
.
getLoanId
();
applyNo
=
data
.
getApplyNo
();
}
applyOrderQuery
.
setLoanId
(
loanId
);
applyOrderQuery
.
setOrderNo
(
applyNo
);
//申请订单查询
JsonResult
<
List
<
ApplyOrder
>>
applyOrders
=
xyqbService
.
findApplyOrders
(
applyOrderQuery
);
return
applyOrders
;
}
//用户信息综合查询
private
JsonResult
findApplyOrders
(
UserQueryParam
userQueryParam
)
{
ApplyOrderQuery
applyOrderQuery
=
new
ApplyOrderQuery
();
applyOrderQuery
.
setUserId
(
userQueryParam
.
getUserId
());
//申请订单查询
JsonResult
<
List
<
ApplyOrder
>>
applyOrders
=
xyqbService
.
findApplyOrders
(
applyOrderQuery
);
return
applyOrders
;
}
@Override
@Override
public
JsonResult
findUserInfoByOrderParam
(
OrderQueryParam
orderQueryParam
)
{
public
JsonResult
findUserInfoByOrderParam
(
OrderQueryParam
orderQueryParam
)
{
...
...
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