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
b44df648
Commit
b44df648
authored
Sep 30, 2019
by
luzhuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
role
parent
b4a00a8b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
15 deletions
+6
-15
SysRoleRepository.java
...main/java/org/rcisoft/sys/role/dao/SysRoleRepository.java
+2
-3
SysRole.java
src/main/java/org/rcisoft/sys/role/entity/SysRole.java
+1
-1
roleMapper.xml
src/main/resources/mapper/sys/role/mapper/roleMapper.xml
+3
-11
No files found.
src/main/java/org/rcisoft/sys/role/dao/SysRoleRepository.java
View file @
b44df648
...
@@ -29,9 +29,8 @@ public interface SysRoleRepository extends BaseMapper<SysRole> {
...
@@ -29,9 +29,8 @@ public interface SysRoleRepository extends BaseMapper<SysRole> {
*/
*/
@Select
(
"<script>select * from tm_admin_role "
+
@Select
(
"<script>select * from tm_admin_role "
+
"where r_status = 1 "
+
"where r_status = 1 "
+
"and r_id not in('主管理员','子管理员')"
+
"and r_id not in ('主管理员','子管理员') "
+
" order by create_date desc"
+
" order by r_name desc </script>"
)
"</script>"
)
@ResultMap
(
value
=
"SelectAllAndUserNum"
)
@ResultMap
(
value
=
"SelectAllAndUserNum"
)
List
<
SysRole
>
queryRoles
();
List
<
SysRole
>
queryRoles
();
...
...
src/main/java/org/rcisoft/sys/role/entity/SysRole.java
View file @
b44df648
...
@@ -24,7 +24,7 @@ public class SysRole extends IdEntity<SysRole> {
...
@@ -24,7 +24,7 @@ public class SysRole extends IdEntity<SysRole> {
private
String
roleName
;
private
String
roleName
;
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为50"
)
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为50"
)
@NotBlank
@NotBlank
private
String
code
;
private
String
businessId
;
@Transient
@Transient
private
int
userNum
;
private
int
userNum
;
...
...
src/main/resources/mapper/sys/role/mapper/roleMapper.xml
View file @
b44df648
...
@@ -14,17 +14,9 @@
...
@@ -14,17 +14,9 @@
<result
column=
"create_date"
property=
"createDate"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"create_date"
property=
"createDate"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
</resultMap>
<resultMap
id=
"SelectAllAndUserNum"
type=
"org.rcisoft.sys.role.entity.SysRole"
>
<resultMap
id=
"SelectAllAndUserNum"
type=
"org.rcisoft.sys.role.entity.SysRole"
>
<id
column=
"business_id"
jdbcType=
"VARCHAR"
property=
"businessId"
/>
<id
column=
"r_id"
jdbcType=
"VARCHAR"
property=
"businessId"
/>
<result
column=
"role_name"
jdbcType=
"VARCHAR"
property=
"roleName"
/>
<result
column=
"r_name"
jdbcType=
"VARCHAR"
property=
"roleName"
/>
<result
column=
"CODE"
jdbcType=
"VARCHAR"
property=
"code"
/>
<association
property=
"userNum"
column=
"r_id"
select=
"countUserNum"
/>
<result
column=
"checked"
jdbcType=
"VARCHAR"
property=
"checked"
/>
<result
column=
"CREATE_BY"
property=
"createBy"
jdbcType=
"VARCHAR"
/>
<result
column=
"FLAG"
property=
"flag"
jdbcType=
"VARCHAR"
/>
<result
column=
"UPDATE_BY"
property=
"updateBy"
jdbcType=
"VARCHAR"
/>
<result
column=
"DEL_FLAG"
property=
"delFlag"
jdbcType=
"VARCHAR"
/>
<result
column=
"update_date"
property=
"updateDate"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"create_date"
property=
"createDate"
jdbcType=
"TIMESTAMP"
/>
<association
property=
"userNum"
column=
"business_id"
select=
"countUserNum"
/>
</resultMap>
</resultMap>
<select
id=
"countUserNum"
parameterType=
"string"
resultType=
"int"
>
<select
id=
"countUserNum"
parameterType=
"string"
resultType=
"int"
>
select count(*)
select count(*)
...
...
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