Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
education
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
李丛阳
education
Commits
58fbe27a
Commit
58fbe27a
authored
May 17, 2018
by
刘子正
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BCompany删除接口 sql语句修改
parent
0945809f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
7 deletions
+19
-7
SysRoleRepository.java
...main/java/org/rcisoft/sys/role/dao/SysRoleRepository.java
+19
-7
No files found.
src/main/java/org/rcisoft/sys/role/dao/SysRoleRepository.java
View file @
58fbe27a
...
@@ -209,12 +209,24 @@ public interface SysRoleRepository extends BaseMapper<SysRole> {
...
@@ -209,12 +209,24 @@ public interface SysRoleRepository extends BaseMapper<SysRole> {
* @param businessId
* @param businessId
* @return
* @return
*/
*/
@Delete
(
"DELETE sr "
+
@Delete
(
"DELETE\n"
+
"FROM"
+
"FROM\n"
+
"s_r_user_role sr "
+
"\ts_r_user_role\n"
+
"LEFT JOIN s_user s on s.business_id = sr.user_id "
+
"WHERE\n"
+
"LEFT JOIN ${tb} c ON c. CODE = s.login_name "
+
"\ts_r_user_role.business_id = (\n"
+
"WHERE"
+
"\t\tSELECT\n"
+
"c.business_id = #{cid}"
)
"\t\t\tab.*\n"
+
"\t\tFROM\n"
+
"\t\t\t(\n"
+
"\t\t\t\tSELECT\n"
+
"\t\t\t\t\ts_r_user_role.business_id\n"
+
"\t\t\t\tFROM\n"
+
"\t\t\t\t\ts_r_user_role\n"
+
"\t\t\t\tLEFT JOIN s_user ON s_r_user_role.user_id = s_user.business_id\n"
+
"\t\t\t\tLEFT JOIN ${tb} ON ${tb}.`code` = s_user.login_name\n"
+
"\t\t\t\tWHERE\n"
+
"\t\t\t\t\t${tb}.business_id = #{cid}\n"
+
"\t\t\t) ab\n"
+
"\t)"
)
int
deleteUserRoleByChildrenId
(
@Param
(
"tb"
)
String
tableByKey
,
@Param
(
"cid"
)
String
businessId
);
int
deleteUserRoleByChildrenId
(
@Param
(
"tb"
)
String
tableByKey
,
@Param
(
"cid"
)
String
businessId
);
}
}
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