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
3c95d9d8
Commit
3c95d9d8
authored
Sep 26, 2019
by
luzhuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sysRole
parent
38d84421
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
72 additions
and
173 deletions
+72
-173
BCourseController.java
...cisoft/business/bcourse/controller/BCourseController.java
+2
-2
SysDeptController.java
...va/org/rcisoft/sys/dept/controller/SysDeptController.java
+2
-2
ExcelDownloadController.java
...n/java/org/rcisoft/sys/excel/ExcelDownloadController.java
+0
-109
SysRoleController.java
...va/org/rcisoft/sys/role/controller/SysRoleController.java
+8
-9
SysRoleRepository.java
...main/java/org/rcisoft/sys/role/dao/SysRoleRepository.java
+48
-39
SysRoleService.java
...ain/java/org/rcisoft/sys/role/service/SysRoleService.java
+1
-1
SysRoleServiceImpl.java
...org/rcisoft/sys/role/service/impl/SysRoleServiceImpl.java
+11
-11
No files found.
src/main/java/org/rcisoft/business/bcourse/controller/BCourseController.java
View file @
3c95d9d8
...
@@ -29,7 +29,7 @@ import java.util.ArrayList;
...
@@ -29,7 +29,7 @@ import java.util.ArrayList;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
@Api
(
tags
=
"3
分类接口
"
)
@Api
(
tags
=
"3
课程分类
"
)
@RestController
@RestController
@RequestMapping
(
"/BCourse"
)
@RequestMapping
(
"/BCourse"
)
public
class
BCourseController
extends
PaginationController
<
BCourse
>
{
public
class
BCourseController
extends
PaginationController
<
BCourse
>
{
...
@@ -73,7 +73,7 @@ public class BCourseController extends PaginationController<BCourse> {
...
@@ -73,7 +73,7 @@ public class BCourseController extends PaginationController<BCourse> {
bCourseRepository
.
queryFirstLevel
());
bCourseRepository
.
queryFirstLevel
());
}
}
@ApiOperation
(
value
=
"304
物理
删除"
,
notes
=
"根据ID删除一条记录"
)
@ApiOperation
(
value
=
"304
逻辑
删除"
,
notes
=
"根据ID删除一条记录"
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"课程分类id"
,
required
=
true
,
dataType
=
"varchar"
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"课程分类id"
,
required
=
true
,
dataType
=
"varchar"
)
@PostMapping
(
value
=
"/remove"
)
@PostMapping
(
value
=
"/remove"
)
public
Result
remove
(
CurUser
curUser
,
@Valid
String
businessId
,
BindingResult
br
)
{
public
Result
remove
(
CurUser
curUser
,
@Valid
String
businessId
,
BindingResult
br
)
{
...
...
src/main/java/org/rcisoft/sys/dept/controller/SysDeptController.java
View file @
3c95d9d8
...
@@ -24,8 +24,8 @@ import java.util.List;
...
@@ -24,8 +24,8 @@ import java.util.List;
/**
/**
* Created by lcy on 16/7/30.
* Created by lcy on 16/7/30.
*/
*/
@RestController
//
@RestController
@RequestMapping
(
"/dept"
)
//
@RequestMapping("/dept")
public
class
SysDeptController
extends
ResponseController
{
public
class
SysDeptController
extends
ResponseController
{
@Autowired
@Autowired
...
...
src/main/java/org/rcisoft/sys/excel/ExcelDownloadController.java
deleted
100644 → 0
View file @
38d84421
package
org
.
rcisoft
.
sys
.
excel
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiOperation
;
import
org.rcisoft.common.component.Global
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.BufferedOutputStream
;
import
java.io.InputStream
;
import
java.io.OutputStream
;
import
java.net.URLEncoder
;
/**
* Created by gaowenfeng on 2017/8/2.
*/
@RestController
@RequestMapping
(
"/excelUtil"
)
public
class
ExcelDownloadController
{
private
static
final
String
STUDNET_FILE_NAME
=
"student.xls"
;
private
static
final
String
TEACHER_FILE_NAME
=
"teacher.xls"
;
private
static
final
String
CLASS_FILE_NAME
=
"class.xls"
;
private
static
final
String
STUDENT_CLASS_FILE_NAME
=
"student-class.xls"
;
private
static
final
String
STUDNET_SL_FILE_NAME
=
"student-sl.xls"
;
private
static
final
String
LESSON_FILE_NAME
=
"lesson.xls"
;
private
static
final
String
SL_FILE_NAME
=
"sl.xls"
;
private
static
final
String
ROOM_FILE_NAME
=
"room.xls"
;
private
static
final
String
BUSINESS_CLASS
=
"business-class.xls"
;
private
static
final
String
IMPORT_DTO
=
"schedule-task.xls"
;
@Autowired
private
Global
global
;
@ApiOperation
(
value
=
"下载excel模板"
,
notes
=
"下载excel模板"
)
@ApiImplicitParam
(
name
=
"type"
,
value
=
"模板类型"
,
required
=
false
,
dataType
=
"varchar"
)
@GetMapping
(
"excelWithoutAuth"
)
public
void
excelDownLoad
(
HttpServletRequest
request
,
HttpServletResponse
response
,
@RequestParam
(
"type"
)
String
type
)
throws
Exception
{
InputStream
in
=
null
;
OutputStream
out
=
null
;
//File file = getDownLoadFile(type);
String
name
=
getDownLoadFile
(
type
);
in
=
getClass
().
getClassLoader
().
getResourceAsStream
(
global
.
getEXCEL_TEMPLATE_LOCATION
()+
name
);
/*if (file == null)
throw new ServiceException(ResultServiceEnums.TEMPLAGE_NOT_EXISTS);
in = new BufferedInputStream(new FileInputStream(file));*/
out
=
new
BufferedOutputStream
(
response
.
getOutputStream
());
response
.
setContentType
(
"application/octet-stream"
);
response
.
setCharacterEncoding
(
"UTF-8"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
URLEncoder
.
encode
(
name
,
"UTF-8"
));
//如果输出的是中文名的文件,在此处就要用URLEncoder.encode方法进行处理
byte
[]
buffer
=
new
byte
[
in
.
available
()];
in
.
read
(
buffer
);
out
.
write
(
buffer
);
}
@GetMapping
(
"excel"
)
public
void
excel
(
HttpServletRequest
request
,
HttpServletResponse
response
,
@RequestParam
(
"type"
)
String
type
)
throws
Exception
{
excelDownLoad
(
request
,
response
,
type
);
}
private
String
getDownLoadFile
(
String
type
)
throws
Exception
{
String
name
=
""
;
switch
(
type
)
{
case
"1"
:
name
=
STUDNET_FILE_NAME
;
break
;
case
"2"
:
name
=
TEACHER_FILE_NAME
;
break
;
case
"3"
:
name
=
CLASS_FILE_NAME
;
break
;
case
"4"
:
name
=
STUDENT_CLASS_FILE_NAME
;
break
;
case
"5"
:
name
=
STUDNET_SL_FILE_NAME
;
break
;
case
"6"
:
name
=
LESSON_FILE_NAME
;
break
;
case
"7"
:
name
=
SL_FILE_NAME
;
break
;
case
"8"
:
name
=
ROOM_FILE_NAME
;
break
;
case
"9"
:
name
=
BUSINESS_CLASS
;
break
;
case
"10"
:
name
=
IMPORT_DTO
;
break
;
}
return
name
;
}
}
src/main/java/org/rcisoft/sys/role/controller/SysRoleController.java
View file @
3c95d9d8
package
org
.
rcisoft
.
sys
.
role
.
controller
;
package
org
.
rcisoft
.
sys
.
role
.
controller
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -24,6 +25,7 @@ import java.util.List;
...
@@ -24,6 +25,7 @@ import java.util.List;
/**
/**
* Created by lcy on 16/7/30.
* Created by lcy on 16/7/30.
*/
*/
@Api
(
tags
=
"10 用户角色"
)
@RestController
@RestController
@RequestMapping
(
"/role"
)
@RequestMapping
(
"/role"
)
public
class
SysRoleController
extends
PaginationController
<
SysRole
>
{
public
class
SysRoleController
extends
PaginationController
<
SysRole
>
{
...
@@ -32,7 +34,7 @@ public class SysRoleController extends PaginationController<SysRole> {
...
@@ -32,7 +34,7 @@ public class SysRoleController extends PaginationController<SysRole> {
private
SysRoleService
sysRoleServiceImpl
;
private
SysRoleService
sysRoleServiceImpl
;
@ApiOperation
(
value
=
"分页查询角色"
,
notes
=
"分页查询角色"
)
@ApiOperation
(
value
=
"
1001
分页查询角色"
,
notes
=
"分页查询角色"
)
@GetMapping
(
value
=
"/queryRoles"
)
@GetMapping
(
value
=
"/queryRoles"
)
public
GridModel
queryRolesByPagination
(
CurUser
curUser
,
@Valid
FindRolePaginDTO
findRolePaginDTO
,
BindingResult
bindingResult
){
public
GridModel
queryRolesByPagination
(
CurUser
curUser
,
@Valid
FindRolePaginDTO
findRolePaginDTO
,
BindingResult
bindingResult
){
sysRoleServiceImpl
.
queryRolesByPagination
(
getPaginationUtility
(),
findRolePaginDTO
);
sysRoleServiceImpl
.
queryRolesByPagination
(
getPaginationUtility
(),
findRolePaginDTO
);
...
@@ -40,20 +42,17 @@ public class SysRoleController extends PaginationController<SysRole> {
...
@@ -40,20 +42,17 @@ public class SysRoleController extends PaginationController<SysRole> {
return
gridModel
;
return
gridModel
;
}
}
@ApiOperation
(
value
=
"查询全部角色"
,
notes
=
"查询全部角色"
)
@ApiOperation
(
value
=
"
1002
查询全部角色"
,
notes
=
"查询全部角色"
)
@GetMapping
(
value
=
"/queryRolesAll"
)
@GetMapping
(
value
=
"/queryRolesAll"
)
public
Result
queryRolesAll
(
CurUser
curUser
,
@Valid
FindRolePaginDTO
findRolePaginDTO
,
BindingResult
bindingResult
){
public
Result
queryRolesAll
(
CurUser
curUser
){
sysRoleServiceImpl
.
queryRolesAll
(
findRolePaginDTO
);
GridModel
gridModel
=
getGridModelResponse
();
// return gridModel;
return
Result
.
builder
(
new
PersistModel
(
1
),
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
sysRoleServiceImpl
.
queryRolesAll
(
findRolePaginDTO
));
sysRoleServiceImpl
.
queryRolesAll
());
}
}
@ApiOperation
(
value
=
"增加/修改角色"
,
notes
=
"增加/修改角色"
)
@ApiOperation
(
value
=
"
1003
增加/修改角色"
,
notes
=
"增加/修改角色"
)
@PostMapping
(
value
=
"/add"
)
@PostMapping
(
value
=
"/add"
)
public
Result
roleAdd
(
CurUser
curUser
,
@Valid
AddOrUpdateRoleDTO
addOrUpdateRoleDTO
,
BindingResult
bindingResult
){
public
Result
roleAdd
(
CurUser
curUser
,
@Valid
AddOrUpdateRoleDTO
addOrUpdateRoleDTO
,
BindingResult
bindingResult
){
int
line
=
sysRoleServiceImpl
.
persistRole
(
addOrUpdateRoleDTO
);
int
line
=
sysRoleServiceImpl
.
persistRole
(
addOrUpdateRoleDTO
);
...
@@ -64,7 +63,7 @@ public class SysRoleController extends PaginationController<SysRole> {
...
@@ -64,7 +63,7 @@ public class SysRoleController extends PaginationController<SysRole> {
}
}
@ApiOperation
(
value
=
"删除角色"
,
notes
=
"删除角色"
)
@ApiOperation
(
value
=
"
1004
删除角色"
,
notes
=
"删除角色"
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
,
paramType
=
"path"
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
,
paramType
=
"path"
)
@PostMapping
(
value
=
"/delete"
)
@PostMapping
(
value
=
"/delete"
)
public
Result
roleDelete
(
CurUser
curUser
,
String
businessId
,
BindingResult
bindingResult
){
public
Result
roleDelete
(
CurUser
curUser
,
String
businessId
,
BindingResult
bindingResult
){
...
...
src/main/java/org/rcisoft/sys/role/dao/SysRoleRepository.java
View file @
3c95d9d8
...
@@ -23,38 +23,39 @@ import java.util.Map;
...
@@ -23,38 +23,39 @@ import java.util.Map;
public
interface
SysRoleRepository
extends
BaseMapper
<
SysRole
>
{
public
interface
SysRoleRepository
extends
BaseMapper
<
SysRole
>
{
/**
/**
* 分页查询 roles
* 分页查询 roles
* @param sysRole
*
* @param
* @return
* @return
*/
*/
@Select
(
"<script>select * from s_role where flag = '1' and del_flag = '0' "
@Select
(
"<script>select * from s_role where flag = '1' and del_flag = '0' "
+
+
" <if test=\"code !=null and code != ''\">and code = #{code} </if> "
"AND role_name not in('主管理员','子管理员')"
+
+
" <if test=\"roleName !=null and roleName != ''\">and role_name = #{roleName} </if> "
" order by create_date desc"
+
+
" and code NOT in ('ROLE_1001','ROLE_1002','ROLE_1003')"
"</script>"
)
+
" order by create_date desc"
@ResultMap
(
value
=
"SelectAllAndUserNum"
)
+
"</script>"
)
List
<
SysRole
>
queryRoles
();
@ResultMap
(
value
=
"SelectAllAndUserNum"
)
List
<
SysRole
>
queryRoles
(
SysRole
sysRole
);
//获得此角色的用户数
//获得此角色的用户数
int
countUserNum
(
String
roleId
);
int
countUserNum
(
String
roleId
);
@Select
(
"<script>select * from s_role where "
@Select
(
"<script>select * from s_role where "
+
"DEL_FLAG='0' "
+
"DEL_FLAG='0' "
+
"</script>"
)
+
"</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
SysRole
>
queryRolesSelect
(
SysRole
sysRole
);
List
<
SysRole
>
queryRolesSelect
(
SysRole
sysRole
);
/**
/**
* 根据角色id 删除对应权限
* 根据角色id 删除对应权限
*
* @param roleId
* @param roleId
* @return
* @return
*/
*/
@Delete
(
"<script>delete from s_role_menu where role_id = #{roleId}</script>"
)
@Delete
(
"<script>delete from s_role_menu where role_id = #{roleId}</script>"
)
int
deleteRoleMenus
(
@Param
(
"roleId"
)
String
roleId
);
int
deleteRoleMenus
(
@Param
(
"roleId"
)
String
roleId
);
/**
/**
* 根据角色id 删除对应部门
* 根据角色id 删除对应部门
*
* @param roleId
* @param roleId
* @return
* @return
*/
*/
...
@@ -63,38 +64,43 @@ public interface SysRoleRepository extends BaseMapper<SysRole> {
...
@@ -63,38 +64,43 @@ public interface SysRoleRepository extends BaseMapper<SysRole> {
/**
/**
* 批量插入 角色_权限
* 批量插入 角色_权限
*
* @param menuRole
* @param menuRole
* @return
* @return
*/
*/
int
insertBatchRoleMenu
(
List
<
Map
>
menuRole
);
int
insertBatchRoleMenu
(
List
<
Map
>
menuRole
);
/**
/**
* 批量插入 角色_部门
* 批量插入 角色_部门
* @param deptRole
*
* @param deptRole
* @return
* @return
*/
*/
int
insertBatchRoleDept
(
List
<
Map
>
deptRole
);
int
insertBatchRoleDept
(
List
<
Map
>
deptRole
);
/**
/**
* 分页查询 roles
* 分页查询 roles
*
* @param sysRole
* @param sysRole
* @return
* @return
*/
*/
@Select
(
" <script>select "
@Select
(
" <script>select "
+
" dr.BUSINESS_ID drid,r.BUSINESS_ID rid,r.name rname,r.code rcode,d.BUSINESS_ID did,d.name dname,d.dept_code deptcode, "
+
" dr.BUSINESS_ID drid,r.BUSINESS_ID rid,r.name rname,r.code rcode,d.BUSINESS_ID did,d.name dname,d.dept_code deptcode, "
+
" IF(( "
+
" IF(( "
+
" SELECT count(*) from s_dept_role_user dru where dru.USER_ID=#{userId} "
+
" SELECT count(*) from s_dept_role_user dru where dru.USER_ID=#{userId} "
+
" and dru.DEPT_ROLE_ID=dr.BUSINESS_ID"
+
" and dru.DEPT_ROLE_ID=dr.BUSINESS_ID"
+
" )>0,'1','0') as checked "
+
" )>0,'1','0') as checked "
+
" FROM s_dept_role dr "
+
" FROM s_dept_role dr "
+
" LEFT JOIN s_dept d ON d.BUSINESS_ID = dr.DEPT_ID "
+
" LEFT JOIN s_dept d ON d.BUSINESS_ID = dr.DEPT_ID "
+
" LEFT JOIN s_role r on dr.ROLE_ID = r.BUSINESS_ID</script>"
)
+
" LEFT JOIN s_role r on dr.ROLE_ID = r.BUSINESS_ID</script>"
)
@ResultMap
(
value
=
"drResultMap"
)
@ResultMap
(
value
=
"drResultMap"
)
List
<
DeptRole
>
queryUserRolesByPagination
(
@Param
(
"userId"
)
String
userId
,
SysRole
sysRole
)
;
List
<
DeptRole
>
queryUserRolesByPagination
(
@Param
(
"userId"
)
String
userId
,
SysRole
sysRole
);
/**
/**
* 分页查询 roles
* 分页查询 roles
*
* @param sysRole
* @param sysRole
* @return
* @return
*/
*/
...
@@ -124,18 +130,19 @@ public interface SysRoleRepository extends BaseMapper<SysRole> {
...
@@ -124,18 +130,19 @@ public interface SysRoleRepository extends BaseMapper<SysRole> {
" s_role sysRole "
+
" s_role sysRole "
+
"WHERE "
+
"WHERE "
+
" DEL_FLAG = '0' and FLAG = '1'</script>"
)
" DEL_FLAG = '0' and FLAG = '1'</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
SysRole
>
queryDeptRolesByPagination
(
@Param
(
"deptId"
)
String
deptId
,
SysRole
sysRole
);
List
<
SysRole
>
queryDeptRolesByPagination
(
@Param
(
"deptId"
)
String
deptId
,
SysRole
sysRole
);
@Delete
(
"<script>DELETE from s_dept_role_user where DEPT_ROLE_ID="
@Delete
(
"<script>DELETE from s_dept_role_user where DEPT_ROLE_ID="
+
"("
+
"("
+
"SELECT BUSINESS_ID from s_dept_role where ROLE_ID=#{roleId}"
+
"SELECT BUSINESS_ID from s_dept_role where ROLE_ID=#{roleId}"
+
")</script>"
)
+
")</script>"
)
int
deleteDeptRoleUserByroleId
(
@Param
(
"roleId"
)
String
roleId
);
int
deleteDeptRoleUserByroleId
(
@Param
(
"roleId"
)
String
roleId
);
/**
/**
* 删除岗位
* 删除岗位
* @param roleId
*
* @param roleId
* @return
* @return
*/
*/
@Delete
(
"<script>DELETE from s_dept_role where ROLE_ID=#{roleId}</script>"
)
@Delete
(
"<script>DELETE from s_dept_role where ROLE_ID=#{roleId}</script>"
)
...
@@ -143,6 +150,7 @@ public interface SysRoleRepository extends BaseMapper<SysRole> {
...
@@ -143,6 +150,7 @@ public interface SysRoleRepository extends BaseMapper<SysRole> {
/**
/**
* 删除权限
* 删除权限
*
* @param roleId
* @param roleId
* @return
* @return
*/
*/
...
@@ -180,7 +188,7 @@ public interface SysRoleRepository extends BaseMapper<SysRole> {
...
@@ -180,7 +188,7 @@ public interface SysRoleRepository extends BaseMapper<SysRole> {
@Select
(
"<script>select * from s_role where flag = '1' and del_flag = '0' "
@Select
(
"<script>select * from s_role where flag = '1' and del_flag = '0' "
+
"and (code = #{code} or role_name = #{roleName}) "
+
"and (code = #{code} or role_name = #{roleName}) "
+
"</script>"
)
+
"</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
SysRole
>
queryRolesByCodeOrName
(
SysRole
sysRole
);
List
<
SysRole
>
queryRolesByCodeOrName
(
SysRole
sysRole
);
@Delete
(
"<script>DELETE from s_r_user_role where role_id=#{id}</script>"
)
@Delete
(
"<script>DELETE from s_r_user_role where role_id=#{id}</script>"
)
...
@@ -189,7 +197,7 @@ public interface SysRoleRepository extends BaseMapper<SysRole> {
...
@@ -189,7 +197,7 @@ public interface SysRoleRepository extends BaseMapper<SysRole> {
@Select
(
"<script>select * from s_role where flag = '1' and del_flag = '0' "
@Select
(
"<script>select * from s_role where flag = '1' and del_flag = '0' "
+
"and role_name = #{roleName}"
+
"and role_name = #{roleName}"
+
"</script>"
)
+
"</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
SysRole
>
queryRolesByName
(
SysRole
sysRole
);
List
<
SysRole
>
queryRolesByName
(
SysRole
sysRole
);
// @Select("SELECT COUNT(*) FROM s_menu sm \n" +
// @Select("SELECT COUNT(*) FROM s_menu sm \n" +
...
@@ -206,6 +214,7 @@ public interface SysRoleRepository extends BaseMapper<SysRole> {
...
@@ -206,6 +214,7 @@ public interface SysRoleRepository extends BaseMapper<SysRole> {
/**
/**
* 根据子表id 删除 s_r_user_role
* 根据子表id 删除 s_r_user_role
*
* @param tableByKey
* @param tableByKey
* @param businessId
* @param businessId
* @return
* @return
...
@@ -229,5 +238,5 @@ public interface SysRoleRepository extends BaseMapper<SysRole> {
...
@@ -229,5 +238,5 @@ public interface SysRoleRepository extends BaseMapper<SysRole> {
"\t\t\t\t\t${tb}.business_id = #{cid}\n"
+
"\t\t\t\t\t${tb}.business_id = #{cid}\n"
+
"\t\t\t) ab\n"
+
"\t\t\t) ab\n"
+
"\t)"
)
"\t)"
)
int
deleteUserRoleByChildrenId
(
@Param
(
"tb"
)
String
tableByKey
,
@Param
(
"cid"
)
String
businessId
);
int
deleteUserRoleByChildrenId
(
@Param
(
"tb"
)
String
tableByKey
,
@Param
(
"cid"
)
String
businessId
);
}
}
src/main/java/org/rcisoft/sys/role/service/SysRoleService.java
View file @
3c95d9d8
...
@@ -44,7 +44,7 @@ public interface SysRoleService {
...
@@ -44,7 +44,7 @@ public interface SysRoleService {
List
<
SysRole
>
queryRolesByPagination
(
PageUtil
pageUtil
,
FindRolePaginDTO
findRolePaginDTO
);
List
<
SysRole
>
queryRolesByPagination
(
PageUtil
pageUtil
,
FindRolePaginDTO
findRolePaginDTO
);
List
<
SysRole
>
queryRolesAll
(
FindRolePaginDTO
findRolePaginDTO
);
List
<
SysRole
>
queryRolesAll
();
//select
//select
List
<
SysRole
>
queryRolesSelect
(
SysRole
sysRole
);
List
<
SysRole
>
queryRolesSelect
(
SysRole
sysRole
);
...
...
src/main/java/org/rcisoft/sys/role/service/impl/SysRoleServiceImpl.java
View file @
3c95d9d8
...
@@ -85,20 +85,20 @@ public class SysRoleServiceImpl implements SysRoleService {
...
@@ -85,20 +85,20 @@ public class SysRoleServiceImpl implements SysRoleService {
@Override
@Override
public
List
<
SysRole
>
queryRolesByPagination
(
PageUtil
pageUtil
,
FindRolePaginDTO
findRolePaginDTO
)
{
public
List
<
SysRole
>
queryRolesByPagination
(
PageUtil
pageUtil
,
FindRolePaginDTO
findRolePaginDTO
)
{
SysRole
sysRole
=
new
SysRole
();
//
SysRole sysRole = new SysRole();
BeanUtils
.
copyProperties
(
findRolePaginDTO
,
sysRole
);
//
BeanUtils.copyProperties(findRolePaginDTO,sysRole);
sysRole
.
setNotDeleted
();
//
sysRole.setNotDeleted();
sysRole
.
setStart
();
//
sysRole.setStart();
return
sysRoleRepository
.
queryRoles
(
sysRole
);
return
sysRoleRepository
.
queryRoles
();
}
}
@Override
@Override
public
List
<
SysRole
>
queryRolesAll
(
FindRolePaginDTO
findRolePaginDTO
)
{
public
List
<
SysRole
>
queryRolesAll
()
{
SysRole
sysRole
=
new
SysRole
();
//
SysRole sysRole = new SysRole();
BeanUtils
.
copyProperties
(
findRolePaginDTO
,
sysRole
);
//
BeanUtils.copyProperties(findRolePaginDTO,sysRole);
sysRole
.
setNotDeleted
();
//
sysRole.setNotDeleted();
sysRole
.
setStart
();
//
sysRole.setStart();
return
sysRoleRepository
.
queryRoles
(
sysRole
);
return
sysRoleRepository
.
queryRoles
();
}
}
@Override
@Override
...
...
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