Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tea_resource_api
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
高宇
tea_resource_api
Commits
1c076006
Commit
1c076006
authored
Feb 08, 2025
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了删除角色bug
parent
ffa1d7ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
PcRoleServiceImpl.java
...org/rcisoft/pc/pcrole/service/impl/PcRoleServiceImpl.java
+6
-2
No files found.
src/main/java/org/rcisoft/pc/pcrole/service/impl/PcRoleServiceImpl.java
View file @
1c076006
...
@@ -128,10 +128,14 @@ public class PcRoleServiceImpl extends ServiceImpl<PcRoleRepository, PcRole> im
...
@@ -128,10 +128,14 @@ public class PcRoleServiceImpl extends ServiceImpl<PcRoleRepository, PcRole> im
int
line
=
baseMapper
.
deleteById
(
pcRole
);
int
line
=
baseMapper
.
deleteById
(
pcRole
);
//批量逻辑删除角色课程中间表
//批量逻辑删除角色课程中间表
List
<
PcRoleLesson
>
pcRoleLessonList
=
pcRoleLessonRepository
.
selectList
(
new
QueryWrapper
<
PcRoleLesson
>().
eq
(
"pc_role_id"
,
pcRole
.
getBusinessId
()));
List
<
PcRoleLesson
>
pcRoleLessonList
=
pcRoleLessonRepository
.
selectList
(
new
QueryWrapper
<
PcRoleLesson
>().
eq
(
"pc_role_id"
,
pcRole
.
getBusinessId
()));
int
deleteBatch1
=
pcRoleLessonRepository
.
deleteBatch
(
pcRoleLessonList
);
if
(
pcRoleLessonList
.
size
()
>
0
){
int
deleteBatch1
=
pcRoleLessonRepository
.
deleteBatch
(
pcRoleLessonList
);
}
//逻辑删除角色用户中间表
//逻辑删除角色用户中间表
List
<
PcRoleUser
>
pcRoleUserList
=
pcRoleUserRepository
.
selectList
(
new
QueryWrapper
<
PcRoleUser
>().
eq
(
"pc_role_id"
,
pcRole
.
getBusinessId
()));
List
<
PcRoleUser
>
pcRoleUserList
=
pcRoleUserRepository
.
selectList
(
new
QueryWrapper
<
PcRoleUser
>().
eq
(
"pc_role_id"
,
pcRole
.
getBusinessId
()));
int
deleteBatch2
=
pcRoleUserRepository
.
deleteBatch
(
pcRoleUserList
);
if
(
pcRoleUserList
.
size
()>
0
){
int
deleteBatch2
=
pcRoleUserRepository
.
deleteBatch
(
pcRoleUserList
);
}
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"逻辑删除了ID为"
+
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"逻辑删除了ID为"
+
pcRole
.
getBusinessId
()+
"的前台_角色管理信息"
);
pcRole
.
getBusinessId
()+
"的前台_角色管理信息"
);
return
new
CyPersistModel
(
line
);
return
new
CyPersistModel
(
line
);
...
...
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