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
056f807f
Commit
056f807f
authored
Aug 10, 2019
by
周健威
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
0f0da474
2c4ad6c5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
5 deletions
+22
-5
AppUserRelationBiz.java
...github/wxiaoqi/security/admin/biz/AppUserRelationBiz.java
+18
-3
DataController.java
...om/github/wxiaoqi/security/admin/rest/DataController.java
+4
-2
No files found.
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserRelationBiz.java
View file @
056f807f
...
@@ -303,14 +303,29 @@ public class AppUserRelationBiz extends BaseBiz<AppUserRelationMapper,AppUserRel
...
@@ -303,14 +303,29 @@ public class AppUserRelationBiz extends BaseBiz<AppUserRelationMapper,AppUserRel
}
}
public
void
deleteByMemberIds
(
Collection
<
Integer
>
userIds
)
{
public
void
deleteByMemberIds
(
Collection
<
Integer
>
userIds
)
{
Example
example
=
new
Example
(
AppUserRelation
.
class
);
Example
example
=
new
Example
(
AppUserRelation
.
class
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
Example
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andIn
(
"parentId"
,
userIds
);
criteria
.
andIn
(
"parentId"
,
userIds
);
List
<
AppUserRelation
>
list
=
mapper
.
selectByExample
(
example
);
for
(
AppUserRelation
appUserRelation:
list
){
getMyBiz
().
delRelation
(
appUserRelation
.
getUserId
());
}
mapper
.
deleteByExample
(
example
);
mapper
.
deleteByExample
(
example
);
Example
example2
=
new
Example
(
AppUserRelation
.
class
);
Example
example2
=
new
Example
(
AppUserRelation
.
class
);
Example
.
Criteria
criteria1
=
example2
.
createCriteria
();
Example
.
Criteria
criteria1
=
example2
.
createCriteria
();
criteria1
.
andIn
(
"userId"
,
userIds
);
criteria1
.
andIn
(
"userId"
,
userIds
);
mapper
.
deleteByExample
(
example2
);
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 @
056f807f
...
@@ -63,12 +63,14 @@ public class DataController {
...
@@ -63,12 +63,14 @@ public class DataController {
}
}
@GetMapping
(
"/clear_relation_withphone"
)
@GetMapping
(
"/clear_relation_withphone"
)
public
ObjectRestResponse
<
Void
>
clearRelation
(
@RequestParam
(
"phones"
)
List
<
String
>
phones
){
public
ObjectRestResponse
<
Void
>
clearRelationphone
(
@RequestParam
(
"phones"
)
List
<
String
>
phons
)
{
Map
<
String
,
Integer
>
phoneAndUserIdMapByPhones
=
appUserLoginBiz
.
findPhoneAndUserIdMapByPhones
(
phones
);
Map
<
String
,
Integer
>
phoneAndUserIdMapByPhones
=
appUserLoginBiz
.
findPhoneAndUserIdMapByPhones
(
phons
);
if
(
Objects
.
nonNull
(
phoneAndUserIdMapByPhones
)){
if
(
Objects
.
nonNull
(
phoneAndUserIdMapByPhones
)){
Collection
<
Integer
>
userIds
=
phoneAndUserIdMapByPhones
.
values
();
Collection
<
Integer
>
userIds
=
phoneAndUserIdMapByPhones
.
values
();
appUserRelationBiz
.
deleteByMemberIds
(
userIds
);
appUserRelationBiz
.
deleteByMemberIds
(
userIds
);
appUserSellingWaterBiz
.
deleteByMemberIds
(
userIds
);
appUserSellingWaterBiz
.
deleteByMemberIds
(
userIds
);
}
}
return
ObjectRestResponse
.
succ
();
return
ObjectRestResponse
.
succ
();
}
}
...
...
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