Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xyqb-user2
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
head_group
xyqb-user2
Commits
f6eeedbe
Commit
f6eeedbe
authored
Nov 15, 2018
by
xiaoguang.xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
默认开启phoneHash同步
parent
b8683339
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
15 deletions
+0
-15
SyncHashController.java
...antgroup/xyqb/controller/external/SyncHashController.java
+0
-7
PhoneHashEventListener.java
...java/cn/quantgroup/xyqb/event/PhoneHashEventListener.java
+0
-5
IUserRepository.java
...n/java/cn/quantgroup/xyqb/repository/IUserRepository.java
+0
-3
No files found.
src/main/java/cn/quantgroup/xyqb/controller/external/SyncHashController.java
View file @
f6eeedbe
...
...
@@ -25,7 +25,6 @@ public class SyncHashController {
private
Boolean
isContinue
=
false
;
public
static
Boolean
fight
=
true
;
@Autowired
private
IUserRepository
userRepository
;
...
...
@@ -88,10 +87,4 @@ public class SyncHashController {
isContinue
=
false
;
return
JsonResult
.
buildSuccessResult
(
null
);
}
@GetMapping
(
"/fight"
)
public
JsonResult
fight
()
{
fight
=
true
;
return
JsonResult
.
buildSuccessResult
(
null
);
}
}
src/main/java/cn/quantgroup/xyqb/event/PhoneHashEventListener.java
View file @
f6eeedbe
package
cn
.
quantgroup
.
xyqb
.
event
;
import
cn.quantgroup.xyqb.controller.external.SyncHashController
;
import
cn.quantgroup.xyqb.entity.UserHashMapping
;
import
cn.quantgroup.xyqb.model.UserRegisterParam
;
import
cn.quantgroup.xyqb.repository.IUserHashMappingRepository
;
...
...
@@ -22,10 +21,6 @@ public class PhoneHashEventListener implements ApplicationListener<RegisterEvent
String
phoneNo
=
userRegisterParam
.
getPhoneNo
();
Long
userId
=
userRegisterParam
.
getUser
().
getId
();
if
(!
SyncHashController
.
fight
){
return
;
}
UserHashMapping
userHashMapping
=
userHashMappingRepository
.
findByUserId
(
userId
);
if
(
userHashMapping
!=
null
&&
userHashMapping
.
getIdNoMd5
()
!=
null
)
{
//已存在的用户, 并且已存在身份证号
...
...
src/main/java/cn/quantgroup/xyqb/repository/IUserRepository.java
View file @
f6eeedbe
...
...
@@ -47,9 +47,6 @@ public interface IUserRepository extends JpaRepository<User, Long>, JpaSpecifica
@Query
(
value
=
"update user set enable=?1 where phone_no=?2"
,
nativeQuery
=
true
)
int
forbiddenUser
(
Boolean
enable
,
String
phoneNo
);
@Query
(
value
=
"select * from user where id >= ?1 limit ?2"
,
nativeQuery
=
true
)
List
<
User
>
findByIdLimit
(
Long
id
,
Long
limit
);
List
<
User
>
findByIdBetween
(
Long
id
,
Long
endId
);
}
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