Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cash-loan-flow-boss
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
QG
cash-loan-flow-boss
Commits
0285b473
Commit
0285b473
authored
Jan 19, 2020
by
shangying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
如果phone在detail表中已经存在,则idNo去user_detail表中的身份证号
parent
2bb581e0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
ApplyLoanServiceImpl.java
...s/api/oneclickdata/service/impl/ApplyLoanServiceImpl.java
+11
-2
UserDetailRepository.java
...oanflowboss/spi/user/repository/UserDetailRepository.java
+6
-0
No files found.
src/main/java/cn/quantgroup/cashloanflowboss/api/oneclickdata/service/impl/ApplyLoanServiceImpl.java
View file @
0285b473
...
...
@@ -10,6 +10,8 @@ import cn.quantgroup.cashloanflowboss.core.base.Result;
import
cn.quantgroup.cashloanflowboss.core.dictionary.ApplicationStatus
;
import
cn.quantgroup.cashloanflowboss.spi.clf.entity.ClfChannelConfiguration
;
import
cn.quantgroup.cashloanflowboss.spi.clf.service.CLFCenterServiceImpl
;
import
cn.quantgroup.cashloanflowboss.spi.user.entity.UserDetail
;
import
cn.quantgroup.cashloanflowboss.spi.user.repository.UserDetailRepository
;
import
cn.quantgroup.cashloanflowboss.utils.AESUtil
;
import
cn.quantgroup.cashloanflowboss.utils.ChineseIDCardNumberGenerator
;
import
cn.quantgroup.cashloanflowboss.utils.GetEncryptContentAndMd5
;
...
...
@@ -25,6 +27,7 @@ import java.math.BigDecimal;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Objects
;
/**
* Created by shang on 2019/12/4.
...
...
@@ -41,7 +44,8 @@ public class ApplyLoanServiceImpl implements ApplyLoanService {
private
OneClickDataRespository
oneClickDataRespository
;
@Autowired
private
CLFCenterServiceImpl
clfCenterService
;
@Autowired
private
UserDetailRepository
userDetailRepository
;
@Autowired
private
PhoneInfoService
phoneInfoService
;
...
...
@@ -60,7 +64,12 @@ public class ApplyLoanServiceImpl implements ApplyLoanService {
clfChannelConfiguration
=
clfCenterService
.
findChannelConfigurationByChannelId
(
Long
.
parseLong
(
oneClickModel
.
getChannel
().
trim
()));
md5Keywy
=
clfChannelConfiguration
.
getMd5Key
();
aesKeywy
=
clfChannelConfiguration
.
getAesKey
();
result
=
apply
(
oneClickModel
,
md5Keywy
,
aesKeywy
);
result
=
apply
(
oneClickModel
,
md5Keywy
,
aesKeywy
);
UserDetail
userDetail
=
userDetailRepository
.
findByphoneNo
(
oneClickModel
.
getPhone
());
if
(
Objects
.
nonNull
(
userDetail
)){
idNo
=
userDetail
.
getId_no
();
}
log
.
info
(
"查看当前的phone是否已经在user_detail表中有,则使用现有的身份证号={}"
,
userDetail
);
String
getDecryption
=
AESUtil
.
decryptAfterBase64Decode
(
result
.
get
(
"context"
).
toString
(),
aesKeywy
);
log
.
info
(
"解密的getDecryption的结果={}"
,
getDecryption
);
JSONObject
getDecryptionResult
=
(
JSONObject
)
JSONObject
.
parse
(
getDecryption
);
...
...
src/main/java/cn/quantgroup/cashloanflowboss/spi/user/repository/UserDetailRepository.java
View file @
0285b473
package
cn
.
quantgroup
.
cashloanflowboss
.
spi
.
user
.
repository
;
import
cn.quantgroup.cashloanflowboss.api.oneclickdata.entity.OneClickData
;
import
cn.quantgroup.cashloanflowboss.spi.user.entity.UserDetail
;
import
cn.quantgroup.cashloanflowboss.spi.user.source.XyqbUserDataSource
;
import
org.springframework.data.jpa.repository.JpaRepository
;
...
...
@@ -16,4 +17,9 @@ public interface UserDetailRepository extends JpaRepository<UserDetail,Long>{
@Modifying
@Query
(
value
=
"delete from user_detail where user_id = ?1"
,
nativeQuery
=
true
)
int
deleteByUserId
(
Long
userId
);
// 通过phone查找usesr_detail
@Query
(
value
=
"select * from user_detail where phone_no= ?1 order by id desc limit 1"
,
nativeQuery
=
true
)
UserDetail
findByphoneNo
(
String
phoneNo
);
}
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