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
9c70a352
Commit
9c70a352
authored
Mar 11, 2020
by
王向伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
综合查询修改
parent
b5da5a41
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
164 additions
and
92 deletions
+164
-92
OrderQueryParam.java
...oup/customer/rest/param/ordermapping/OrderQueryParam.java
+1
-1
UserQueryParam.java
...n/quantgroup/customer/rest/param/user/UserQueryParam.java
+25
-0
IKaService.java
src/main/java/cn/quantgroup/customer/service/IKaService.java
+2
-2
IUserService.java
...ain/java/cn/quantgroup/customer/service/IUserService.java
+6
-2
KaServiceImpl.java
...va/cn/quantgroup/customer/service/impl/KaServiceImpl.java
+9
-9
OrderServiceImpl.java
...cn/quantgroup/customer/service/impl/OrderServiceImpl.java
+2
-2
UserServiceImpl.java
.../cn/quantgroup/customer/service/impl/UserServiceImpl.java
+119
-76
No files found.
src/main/java/cn/quantgroup/customer/rest/param/ordermapping/Order
Mapping
QueryParam.java
→
src/main/java/cn/quantgroup/customer/rest/param/ordermapping/OrderQueryParam.java
View file @
9c70a352
...
...
@@ -7,7 +7,7 @@ import lombok.Data;
* @version 2020/3/9
*/
@Data
public
class
Order
Mapping
QueryParam
{
public
class
OrderQueryParam
{
private
Long
loanId
;
...
...
src/main/java/cn/quantgroup/customer/rest/param/user/UserQueryParam.java
0 → 100644
View file @
9c70a352
package
cn
.
quantgroup
.
customer
.
rest
.
param
.
user
;
import
lombok.Data
;
/**
* 用户查询参数
* @author Wang Xiangwei
* @version 2020/3/11
*/
@Data
public
class
UserQueryParam
{
/**
* 注册手机号
*/
private
String
phoneNo
;
/**
* 用户注册身份证号
*/
private
String
idNo
;
private
Long
userId
;
private
String
uuid
;
}
src/main/java/cn/quantgroup/customer/service/IKaService.java
View file @
9c70a352
package
cn
.
quantgroup
.
customer
.
service
;
import
cn.quantgroup.customer.model.kaordermapping.LoanOrderMapping
;
import
cn.quantgroup.customer.rest.param.ordermapping.Order
Mapping
QueryParam
;
import
cn.quantgroup.customer.rest.param.ordermapping.OrderQueryParam
;
import
cn.quantgroup.customer.rest.vo.JsonResult
;
import
java.util.List
;
...
...
@@ -13,7 +13,7 @@ import java.util.Map;
*/
public
interface
IKaService
{
JsonResult
<
LoanOrderMapping
>
findOrderMapping
(
Order
MappingQueryParam
orderMapping
QueryParam
);
JsonResult
<
LoanOrderMapping
>
findOrderMapping
(
Order
QueryParam
order
QueryParam
);
/**
* key 申请订单号 value 渠道订单号
...
...
src/main/java/cn/quantgroup/customer/service/IUserService.java
View file @
9c70a352
package
cn
.
quantgroup
.
customer
.
service
;
import
cn.quantgroup.customer.rest.param.ordermapping.OrderQueryParam
;
import
cn.quantgroup.customer.rest.param.phone.ModifyPhoneAudit
;
import
cn.quantgroup.customer.rest.param.phone.ModifyPhoneFeedback
;
import
cn.quantgroup.customer.rest.param.phone.ModifyPhoneQuery
;
import
cn.quantgroup.customer.rest.param.user.UserCombinationParam
;
import
cn.quantgroup.customer.rest.param.user.UserQueryParam
;
import
cn.quantgroup.customer.rest.vo.JsonResult
;
import
org.springframework.security.core.userdetails.UserDetailsService
;
import
org.springframework.stereotype.Service
;
...
...
@@ -22,10 +24,12 @@ public interface IUserService extends UserDetailsService {
/**
* 用户基本信息
* @param user
Combination
Param
* @param user
Query
Param
* @return
*/
JsonResult
findUserInfo
(
UserCombinationParam
userCombinationParam
);
JsonResult
findUserInfo
(
UserQueryParam
userQueryParam
);
JsonResult
findUserInfoByOrderParam
(
OrderQueryParam
orderQueryParam
);
JsonResult
findUserCombination
(
UserCombinationParam
userCombinationParam
);
...
...
src/main/java/cn/quantgroup/customer/service/impl/KaServiceImpl.java
View file @
9c70a352
...
...
@@ -3,7 +3,7 @@ package cn.quantgroup.customer.service.impl;
import
cn.quantgroup.customer.enums.ErrorCodeEnum
;
import
cn.quantgroup.customer.exception.BusinessException
;
import
cn.quantgroup.customer.model.kaordermapping.LoanOrderMapping
;
import
cn.quantgroup.customer.rest.param.ordermapping.Order
Mapping
QueryParam
;
import
cn.quantgroup.customer.rest.param.ordermapping.OrderQueryParam
;
import
cn.quantgroup.customer.rest.vo.JsonResult
;
import
cn.quantgroup.customer.service.IKaService
;
import
cn.quantgroup.customer.service.http.IHttpService
;
...
...
@@ -39,18 +39,18 @@ public class KaServiceImpl implements IKaService {
private
IHttpService
httpService
;
@Override
public
JsonResult
<
LoanOrderMapping
>
findOrderMapping
(
Order
MappingQueryParam
orderMapping
QueryParam
)
{
public
JsonResult
<
LoanOrderMapping
>
findOrderMapping
(
Order
QueryParam
order
QueryParam
)
{
String
logPre
=
"KaServiceImpl.findOrderMapping"
;
log
.
info
(
"{},获得orderMapping order
MappingQueryParam={}"
,
logPre
,
orderMapping
QueryParam
);
log
.
info
(
"{},获得orderMapping order
QueryParam={}"
,
logPre
,
order
QueryParam
);
if
(
Objects
.
isNull
(
order
Mapping
QueryParam
))
{
log
.
error
(
"{} 查询参数为空 order
MappingQueryParam={}"
,
logPre
,
orderMapping
QueryParam
);
if
(
Objects
.
isNull
(
orderQueryParam
))
{
log
.
error
(
"{} 查询参数为空 order
QueryParam={}"
,
logPre
,
order
QueryParam
);
return
JsonResult
.
buildErrorStateResult
(
"查询参数为空"
,
null
);
}
String
applyOrderNo
=
order
Mapping
QueryParam
.
getApplyOrderNo
();
String
channelOrderNo
=
order
Mapping
QueryParam
.
getChannelOrderNo
();
Long
loanId
=
order
Mapping
QueryParam
.
getLoanId
();
String
applyOrderNo
=
orderQueryParam
.
getApplyOrderNo
();
String
channelOrderNo
=
orderQueryParam
.
getChannelOrderNo
();
Long
loanId
=
orderQueryParam
.
getLoanId
();
String
url
=
kaSysUrl
+
"/external/get/orderMapping"
;
...
...
@@ -83,7 +83,7 @@ public class KaServiceImpl implements IKaService {
}
catch
(
Exception
e
)
{
log
.
error
(
"{} 网络通讯异常,order
MappingQueryParam:{},ex:{}"
,
orderMapping
QueryParam
,
ExceptionUtils
.
getStackTrace
(
e
));
log
.
error
(
"{} 网络通讯异常,order
QueryParam:{},ex:{}"
,
order
QueryParam
,
ExceptionUtils
.
getStackTrace
(
e
));
throw
new
BusinessException
(
ErrorCodeEnum
.
NET_ERROR
);
}
...
...
src/main/java/cn/quantgroup/customer/service/impl/OrderServiceImpl.java
View file @
9c70a352
...
...
@@ -2,7 +2,7 @@ package cn.quantgroup.customer.service.impl;
import
cn.quantgroup.customer.model.kaordermapping.LoanOrderMapping
;
import
cn.quantgroup.customer.model.order.*
;
import
cn.quantgroup.customer.rest.param.ordermapping.Order
Mapping
QueryParam
;
import
cn.quantgroup.customer.rest.param.ordermapping.OrderQueryParam
;
import
cn.quantgroup.customer.rest.vo.JsonResult
;
import
cn.quantgroup.customer.service.IKaService
;
import
cn.quantgroup.customer.service.IOrderService
;
...
...
@@ -32,7 +32,7 @@ public class OrderServiceImpl implements IOrderService {
public
JsonResult
<
List
<
FlowNode
>>
findFlowChart
(
String
applyOrderNo
)
{
String
logPre
=
"OrderServiceImpl.findFlowChart"
;
log
.
info
(
"{} 查询流程图 applyOrderNo={}"
,
logPre
,
applyOrderNo
);
Order
MappingQueryParam
param
=
new
OrderMapping
QueryParam
();
Order
QueryParam
param
=
new
Order
QueryParam
();
param
.
setApplyOrderNo
(
applyOrderNo
);
JsonResult
<
LoanOrderMapping
>
orderMappingResult
=
kaService
.
findOrderMapping
(
param
);
LoanOrderMapping
head
=
null
;
...
...
src/main/java/cn/quantgroup/customer/service/impl/UserServiceImpl.java
View file @
9c70a352
...
...
@@ -11,11 +11,12 @@ import cn.quantgroup.customer.model.xyqbuser.UserBasicInfo;
import
cn.quantgroup.customer.model.xyqbuser.UserCombination
;
import
cn.quantgroup.customer.repo.UserRepo
;
import
cn.quantgroup.customer.rest.param.applyorder.ApplyOrderQuery
;
import
cn.quantgroup.customer.rest.param.ordermapping.Order
Mapping
QueryParam
;
import
cn.quantgroup.customer.rest.param.ordermapping.OrderQueryParam
;
import
cn.quantgroup.customer.rest.param.phone.ModifyPhoneAudit
;
import
cn.quantgroup.customer.rest.param.phone.ModifyPhoneFeedback
;
import
cn.quantgroup.customer.rest.param.phone.ModifyPhoneQuery
;
import
cn.quantgroup.customer.rest.param.user.UserCombinationParam
;
import
cn.quantgroup.customer.rest.param.user.UserQueryParam
;
import
cn.quantgroup.customer.rest.vo.JsonResult
;
import
cn.quantgroup.customer.service.IKaService
;
import
cn.quantgroup.customer.service.IUserService
;
...
...
@@ -152,32 +153,27 @@ public class UserServiceImpl implements IUserService {
@Override
public
JsonResult
findUserInfo
(
User
CombinationParam
userCombination
Param
)
{
public
JsonResult
findUserInfo
(
User
QueryParam
userQuery
Param
)
{
final
String
LOG_PRE
=
"UserServiceImpl.findUserInfo"
;
log
.
info
(
"{} 查询用户信息 userCombinationParam={}"
,
LOG_PRE
,
userCombinationParam
);
Tuple
<
Boolean
,
String
>
tuple
=
validate
(
userCombinationParam
);
log
.
info
(
"{} 查询用户信息 userCombinationParam={}"
,
LOG_PRE
,
userQueryParam
);
if
(!
tuple
.
getKey
())
{
log
.
error
(
"{},参数验证失败,{}"
,
LOG_PRE
,
tuple
.
getValue
());
return
JsonResult
.
buildErrorStateResult
(
tuple
.
getValue
(),
null
);
}
//通过userId查询
if
(
!
Objects
.
isNull
(
userCombination
Param
.
getUserId
()))
{
log
.
info
(
"{} 通过userId查询 userId={}"
,
LOG_PRE
,
user
Combination
Param
.
getUserId
());
UserSysResult
<
XUserDetail
>
userDetailByUserId
=
userSdk
.
getService
().
findUserDetailByUserId
(
user
Combination
Param
.
getUserId
());
if
(
Objects
.
nonNull
(
userQuery
Param
.
getUserId
()))
{
log
.
info
(
"{} 通过userId查询 userId={}"
,
LOG_PRE
,
user
Query
Param
.
getUserId
());
UserSysResult
<
XUserDetail
>
userDetailByUserId
=
userSdk
.
getService
().
findUserDetailByUserId
(
user
Query
Param
.
getUserId
());
return
getUserBasicInfoResult
(
userDetailByUserId
);
}
if
(
StringUtils
.
isNotBlank
(
user
Combination
Param
.
getPhoneNo
()))
{
log
.
info
(
"{} 通过phoneNo查询 phoneNo={}"
,
LOG_PRE
,
user
Combination
Param
.
getPhoneNo
());
UserSysResult
<
XUserDetail
>
userDetailByPhone
=
userSdk
.
getService
().
findUserDetailByPhone
(
user
Combination
Param
.
getPhoneNo
());
if
(
StringUtils
.
isNotBlank
(
user
Query
Param
.
getPhoneNo
()))
{
log
.
info
(
"{} 通过phoneNo查询 phoneNo={}"
,
LOG_PRE
,
user
Query
Param
.
getPhoneNo
());
UserSysResult
<
XUserDetail
>
userDetailByPhone
=
userSdk
.
getService
().
findUserDetailByPhone
(
user
Query
Param
.
getPhoneNo
());
return
getUserBasicInfoResult
(
userDetailByPhone
);
}
if
(
StringUtils
.
isNotBlank
(
user
Combination
Param
.
getUuid
()))
{
log
.
info
(
"{} 通过uuid查询 uuid={}"
,
LOG_PRE
,
user
Combination
Param
.
getUuid
());
UserSysResult
<
XUserFullInfo
>
userFullInfoByUuid
=
userSdk
.
getService
().
findUserFullInfoByUuid
(
user
Combination
Param
.
getUuid
());
if
(
StringUtils
.
isNotBlank
(
user
Query
Param
.
getUuid
()))
{
log
.
info
(
"{} 通过uuid查询 uuid={}"
,
LOG_PRE
,
user
Query
Param
.
getUuid
());
UserSysResult
<
XUserFullInfo
>
userFullInfoByUuid
=
userSdk
.
getService
().
findUserFullInfoByUuid
(
user
Query
Param
.
getUuid
());
Object
jsonResultData
=
getJsonResultData
(
userFullInfoByUuid
);
if
(
jsonResultData
instanceof
XUserFullInfo
)
{
XUserFullInfo
xUserFullInfo
=
(
XUserFullInfo
)
jsonResultData
;
...
...
@@ -189,29 +185,11 @@ public class UserServiceImpl implements IUserService {
}
if
(
Objects
.
nonNull
(
userCombinationParam
.
getLoanId
())
||
StringUtils
.
isNotBlank
(
userCombinationParam
.
getChannelOrderNo
())
||
StringUtils
.
isNotBlank
(
userCombinationParam
.
getOrderNo
()))
{
//通过ka获得userId然后通过userId查询
OrderMappingQueryParam
param
=
new
OrderMappingQueryParam
();
param
.
setApplyOrderNo
(
userCombinationParam
.
getOrderNo
());
param
.
setChannelOrderNo
(
userCombinationParam
.
getChannelOrderNo
());
param
.
setLoanId
(
userCombinationParam
.
getLoanId
());
param
.
setChannelId
(
userCombinationParam
.
getChannelId
());
JsonResult
<
LoanOrderMapping
>
orderMapping
=
kaService
.
findOrderMapping
(
param
);
if
(!
orderMapping
.
isSuccess
()
||
Objects
.
isNull
(
orderMapping
.
getData
()))
{
log
.
error
(
"{} 查询用户失败 param={} result={}"
,
LOG_PRE
,
param
,
orderMapping
);
return
orderMapping
;
}
Long
qgUserId
=
orderMapping
.
getData
().
getQgUserId
();
UserSysResult
<
XUserDetail
>
userDetailByUserId
=
userSdk
.
getService
().
findUserDetailByUserId
(
qgUserId
);
return
getUserBasicInfoResult
(
userDetailByUserId
);
}
if
(
Objects
.
nonNull
(
userCombinationParam
.
getIdNo
()))
{
//通过身份证号获得
if
(
Objects
.
nonNull
(
userQueryParam
.
getIdNo
()))
{
//通过业务系统获得
log
.
info
(
"{} 通过phoneNo查询 idNo={}"
,
LOG_PRE
,
user
Combination
Param
.
getIdNo
());
return
findUserDetailByIdNo
(
user
Combination
Param
.
getIdNo
());
log
.
info
(
"{} 通过phoneNo查询 idNo={}"
,
LOG_PRE
,
user
Query
Param
.
getIdNo
());
return
findUserDetailByIdNo
(
user
Query
Param
.
getIdNo
());
}
return
JsonResult
.
buildErrorStateResult
(
"无有效查询参数"
,
null
);
...
...
@@ -302,11 +280,12 @@ public class UserServiceImpl implements IUserService {
* 每类参数只能有一个 如 订单类参数只能有一个(有申请订单号就不能有借款订单号和渠道订单号) 用户类同理
*
* @param userCombinationParam
* @return
* @return
Tuple<Boolean, String> false 参数验证失败 value失败描述 true表示参数验证成功 value 表示使用哪类参数 1 表示order 2 表示user
*/
private
Tuple
<
Boolean
,
String
>
validate
(
UserCombinationParam
userCombinationParam
)
{
Tuple
<
Boolean
,
String
>
result
=
new
Tuple
<>();
int
paramCount
=
0
;
int
userParam
=
0
;
int
orderParam
=
0
;
result
.
setKey
(
false
);
if
(
Objects
.
isNull
(
userCombinationParam
))
{
result
.
setValue
(
"对象为空"
);
...
...
@@ -318,12 +297,12 @@ public class UserServiceImpl implements IUserService {
result
.
setValue
(
"查询参数渠道订单号和渠道号要同时存在"
);
return
result
;
}
paramCount
++;
orderParam
++;
}
if
(
StringUtils
.
isNotBlank
(
userCombinationParam
.
getIdNo
()))
{
if
(
IdcardUtils
.
validateIdCard18
(
userCombinationParam
.
getIdNo
())
||
IdcardUtils
.
validateIdCard15
(
userCombinationParam
.
getIdNo
()))
{
paramCount
++;
userParam
++;
}
else
{
result
.
setValue
(
"身份证号格式有误"
);
return
result
;
...
...
@@ -331,16 +310,16 @@ public class UserServiceImpl implements IUserService {
}
if
(
StringUtils
.
isNotBlank
(
userCombinationParam
.
getOrderNo
()))
{
paramCount
++;
orderParam
++;
}
if
(!
Objects
.
isNull
(
userCombinationParam
.
getUserId
()))
{
paramCount
++;
userParam
++;
}
if
(
StringUtils
.
isNotBlank
(
userCombinationParam
.
getPhoneNo
()))
{
if
(
ValidationUtil
.
validatePhoneNo
(
userCombinationParam
.
getPhoneNo
()))
{
paramCount
++;
userParam
++;
}
else
{
result
.
setValue
(
"手机号格式错误"
);
return
result
;
...
...
@@ -348,24 +327,34 @@ public class UserServiceImpl implements IUserService {
}
if
(
StringUtils
.
isNotBlank
(
userCombinationParam
.
getUuid
()))
{
paramCount
++;
userParam
++;
}
if
(!
Objects
.
isNull
(
userCombinationParam
.
getLoanId
()))
{
paramCount
++;
orderParam
++;
}
//参数个数验证
if
(
paramCount
==
0
)
{
if
(
orderParam
+
userParam
==
0
)
{
result
.
setValue
(
"参数全部为空"
);
return
result
;
}
if
(
paramCount
>
1
)
{
result
.
setValue
(
"参数个数大于一个"
);
//分类参数验证
if
(
orderParam
==
1
)
{
result
.
setKey
(
true
);
result
.
setValue
(
"1"
);
return
result
;
}
if
(
userParam
==
1
)
{
result
.
setKey
(
true
);
result
.
setValue
(
"2"
);
return
result
;
}
result
.
setKey
(
false
);
result
.
setValue
(
"参数过多"
);
return
result
;
}
...
...
@@ -374,22 +363,50 @@ public class UserServiceImpl implements IUserService {
public
JsonResult
findUserCombination
(
UserCombinationParam
userCombinationParam
)
{
String
logPre
=
"UserServiceImpl.findUserCombination"
;
log
.
info
(
"{},综合查询 userCombinationParam={}"
,
logPre
,
userCombinationParam
);
JsonResult
userInfo
=
this
.
findUserInfo
(
userCombinationParam
);
Tuple
<
Boolean
,
String
>
tuple
=
validate
(
userCombinationParam
);
if
(!
tuple
.
getKey
())
{
log
.
error
(
"{},参数验证失败,{}"
,
logPre
,
tuple
.
getValue
());
return
JsonResult
.
buildErrorStateResult
(
tuple
.
getValue
(),
null
);
}
//查询用户
JsonResult
userInfo
;
if
(
"2"
.
equals
(
tuple
.
getValue
()))
{
//用户参数查询
OrderQueryParam
orderQueryParam
=
new
OrderQueryParam
();
orderQueryParam
.
setApplyOrderNo
(
userCombinationParam
.
getOrderNo
());
orderQueryParam
.
setLoanId
(
userCombinationParam
.
getLoanId
());
orderQueryParam
.
setChannelId
(
userCombinationParam
.
getChannelId
());
orderQueryParam
.
setChannelOrderNo
(
userCombinationParam
.
getChannelOrderNo
());
userInfo
=
this
.
findUserInfoByOrderParam
(
orderQueryParam
);
}
else
{
//订单参数查询
UserQueryParam
userQueryParam
=
new
UserQueryParam
();
userQueryParam
.
setIdNo
(
userCombinationParam
.
getIdNo
());
userQueryParam
.
setPhoneNo
(
userCombinationParam
.
getPhoneNo
());
userQueryParam
.
setUserId
(
userCombinationParam
.
getUserId
());
userQueryParam
.
setUuid
(
userCombinationParam
.
getUuid
());
userInfo
=
this
.
findUserInfo
(
userQueryParam
);
}
if
(!
userInfo
.
isSuccess
())
{
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
()))
{
OrderMappingQueryParam
orderMappingQueryParam
=
new
OrderMappingQueryParam
();
orderMappingQueryParam
.
setChannelId
(
userCombinationParam
.
getChannelId
());
orderMappingQueryParam
.
setChannelOrderNo
(
userCombinationParam
.
getChannelOrderNo
());
JsonResult
<
LoanOrderMapping
>
orderMappingJsonResult
=
kaService
.
findOrderMapping
(
orderMappingQueryParam
);
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
);
...
...
@@ -398,11 +415,10 @@ public class UserServiceImpl implements IUserService {
loanId
=
data
.
getLoanId
();
applyNo
=
data
.
getApplyNo
();
}
//申请订单查询
ApplyOrderQuery
applyOrderQuery
=
new
ApplyOrderQuery
();
applyOrderQuery
.
setLoanId
(
loanId
);
applyOrderQuery
.
setOrderNo
(
applyNo
);
applyOrderQuery
.
setUserId
(
userBasicInfo
.
getUserId
());
}
//申请订单查询
JsonResult
<
List
<
ApplyOrder
>>
applyOrders
=
xyqbService
.
findApplyOrders
(
applyOrderQuery
);
if
(!
applyOrders
.
isSuccess
())
{
return
applyOrders
;
...
...
@@ -417,9 +433,7 @@ public class UserServiceImpl implements IUserService {
}
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
.
setUserInfo
(
userBasicInfo
);
...
...
@@ -427,4 +441,33 @@ public class UserServiceImpl implements IUserService {
return
JsonResult
.
buildSuccessResult
(
""
,
userCombination
);
}
@Override
public
JsonResult
findUserInfoByOrderParam
(
OrderQueryParam
orderQueryParam
)
{
String
logPre
=
"UserServiceImpl.findUserInfoByOrderParam"
;
//渠道订单号需要有渠道号
boolean
channelParam
=
StringUtils
.
isNotBlank
(
orderQueryParam
.
getChannelOrderNo
())
&&
Objects
.
nonNull
(
orderQueryParam
.
getChannelId
());
if
(
Objects
.
nonNull
(
orderQueryParam
.
getLoanId
())
||
channelParam
||
StringUtils
.
isNotBlank
(
orderQueryParam
.
getApplyOrderNo
()))
{
//通过ka获得userId然后通过userId查询
JsonResult
<
LoanOrderMapping
>
orderMapping
=
kaService
.
findOrderMapping
(
orderQueryParam
);
if
(!
orderMapping
.
isSuccess
()
||
Objects
.
isNull
(
orderMapping
.
getData
()))
{
log
.
error
(
"{} 查询orderMapping失败 param={} result={}"
,
logPre
,
orderQueryParam
,
orderMapping
);
return
orderMapping
;
}
Long
qgUserId
=
orderMapping
.
getData
().
getQgUserId
();
UserSysResult
<
XUserDetail
>
userDetailByUserId
=
userSdk
.
getService
().
findUserDetailByUserId
(
qgUserId
);
return
getUserBasicInfoResult
(
userDetailByUserId
);
}
//走到这里申请订单号和借款订单号都为空, 渠道订单号和渠道号至少一个为空
if
(
StringUtils
.
isNotBlank
(
orderQueryParam
.
getChannelOrderNo
())
||
Objects
.
nonNull
(
orderQueryParam
.
getChannelId
()))
{
log
.
error
(
"{} 渠道订单号和渠道号只输入了一个 param={} "
,
logPre
,
orderQueryParam
);
return
JsonResult
.
buildErrorStateResult
(
"渠道订单号和渠道号要同时输入"
,
null
);
}
return
JsonResult
.
buildErrorStateResult
(
"参数全部为空"
,
null
);
}
}
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