Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
youjj
cloud-platform
Commits
3cb35853
Commit
3cb35853
authored
Aug 10, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
370cc44a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
3 deletions
+28
-3
AppUserRelationBiz.java
...github/wxiaoqi/security/admin/biz/AppUserRelationBiz.java
+18
-3
DataController.java
...om/github/wxiaoqi/security/admin/rest/DataController.java
+10
-0
No files found.
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserRelationBiz.java
View file @
3cb35853
...
...
@@ -303,14 +303,29 @@ public class AppUserRelationBiz extends BaseBiz<AppUserRelationMapper,AppUserRel
}
public
void
deleteByMemberIds
(
Collection
<
Integer
>
userIds
)
{
Example
example
=
new
Example
(
AppUserRelation
.
class
);
Example
example
=
new
Example
(
AppUserRelation
.
class
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andIn
(
"parentId"
,
userIds
);
List
<
AppUserRelation
>
list
=
mapper
.
selectByExample
(
example
);
for
(
AppUserRelation
appUserRelation:
list
){
getMyBiz
().
delRelation
(
appUserRelation
.
getUserId
());
}
mapper
.
deleteByExample
(
example
);
Example
example2
=
new
Example
(
AppUserRelation
.
class
);
Example
.
Criteria
criteria1
=
example2
.
createCriteria
();
criteria1
.
andIn
(
"userId"
,
userIds
);
mapper
.
deleteByExample
(
example2
);
for
(
Integer
userId:
userIds
){
getMyBiz
().
delRelation
(
userId
);
}
}
@CacheClear
(
key
=
"user:relation{1}"
)
public
void
delRelation
(
Integer
userId
){
}
}
\ No newline at end of file
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/DataController.java
View file @
3cb35853
...
...
@@ -53,4 +53,14 @@ public class DataController {
}
return
ObjectRestResponse
.
succ
();
}
@GetMapping
(
"/clearRelationphone"
)
public
ObjectRestResponse
<
Void
>
clearRelationphone
(
@RequestParam
(
"phones"
)
List
<
String
>
phons
)
{
Map
<
String
,
Integer
>
phoneAndUserIdMapByPhones
=
appUserLoginBiz
.
findPhoneAndUserIdMapByPhones
(
phons
);
if
(
Objects
.
nonNull
(
phoneAndUserIdMapByPhones
)){
Collection
<
Integer
>
userIds
=
phoneAndUserIdMapByPhones
.
values
();
appUserRelationBiz
.
deleteByMemberIds
(
userIds
);
}
return
ObjectRestResponse
.
succ
();
}
}
\ No newline at end of file
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