Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
guns-vip
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
guns-vip
Commits
286004f7
Commit
286004f7
authored
Dec 08, 2018
by
fengshuonan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
deptid改成驼峰
parent
765f30da
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
31 additions
and
32 deletions
+31
-32
src/main/java/cn/stylefeng/guns/core/common/constant/dictmap/RoleDict.java
+2
-2
src/main/java/cn/stylefeng/guns/core/common/constant/dictmap/UserDict.java
+2
-2
src/main/java/cn/stylefeng/guns/core/common/constant/factory/ConstantFactory.java
+4
-4
src/main/java/cn/stylefeng/guns/core/common/constant/factory/IConstantFactory.java
+2
-2
src/main/java/cn/stylefeng/guns/modular/system/controller/UserMgrController.java
+5
-5
src/main/java/cn/stylefeng/guns/modular/system/mapper/UserMapper.java
+1
-1
src/main/java/cn/stylefeng/guns/modular/system/mapper/mapping/UserMapper.xml
+2
-2
src/main/webapp/WEB-INF/system/role/role_add.html
+2
-2
src/main/webapp/WEB-INF/system/role/role_edit.html
+1
-1
src/main/webapp/assets/modular/system/role/role.js
+5
-6
src/main/webapp/assets/modular/system/role/role_add.js
+2
-2
src/main/webapp/assets/modular/system/role/role_edit.js
+2
-2
src/main/webapp/assets/modular/system/user/user.js
+1
-1
No files found.
src/main/java/cn/stylefeng/guns/core/common/constant/dictmap/RoleDict.java
View file @
286004f7
...
@@ -31,7 +31,7 @@ public class RoleDict extends AbstractDictMap {
...
@@ -31,7 +31,7 @@ public class RoleDict extends AbstractDictMap {
put
(
"num"
,
"角色排序"
);
put
(
"num"
,
"角色排序"
);
put
(
"pid"
,
"角色的父级"
);
put
(
"pid"
,
"角色的父级"
);
put
(
"name"
,
"角色名称"
);
put
(
"name"
,
"角色名称"
);
put
(
"dept
i
d"
,
"部门名称"
);
put
(
"dept
I
d"
,
"部门名称"
);
put
(
"tips"
,
"备注"
);
put
(
"tips"
,
"备注"
);
put
(
"ids"
,
"资源名称"
);
put
(
"ids"
,
"资源名称"
);
}
}
...
@@ -39,7 +39,7 @@ public class RoleDict extends AbstractDictMap {
...
@@ -39,7 +39,7 @@ public class RoleDict extends AbstractDictMap {
@Override
@Override
protected
void
initBeWrapped
()
{
protected
void
initBeWrapped
()
{
putFieldWrapperMethodName
(
"pid"
,
"getSingleRoleName"
);
putFieldWrapperMethodName
(
"pid"
,
"getSingleRoleName"
);
putFieldWrapperMethodName
(
"dept
i
d"
,
"getDeptName"
);
putFieldWrapperMethodName
(
"dept
I
d"
,
"getDeptName"
);
putFieldWrapperMethodName
(
"roleId"
,
"getSingleRoleName"
);
putFieldWrapperMethodName
(
"roleId"
,
"getSingleRoleName"
);
putFieldWrapperMethodName
(
"ids"
,
"getMenuNames"
);
putFieldWrapperMethodName
(
"ids"
,
"getMenuNames"
);
}
}
...
...
src/main/java/cn/stylefeng/guns/core/common/constant/dictmap/UserDict.java
View file @
286004f7
...
@@ -36,14 +36,14 @@ public class UserDict extends AbstractDictMap {
...
@@ -36,14 +36,14 @@ public class UserDict extends AbstractDictMap {
put
(
"email"
,
"电子邮件"
);
put
(
"email"
,
"电子邮件"
);
put
(
"phone"
,
"电话"
);
put
(
"phone"
,
"电话"
);
put
(
"roleid"
,
"角色名称"
);
put
(
"roleid"
,
"角色名称"
);
put
(
"dept
i
d"
,
"部门名称"
);
put
(
"dept
I
d"
,
"部门名称"
);
put
(
"roleIds"
,
"角色名称集合"
);
put
(
"roleIds"
,
"角色名称集合"
);
}
}
@Override
@Override
protected
void
initBeWrapped
()
{
protected
void
initBeWrapped
()
{
putFieldWrapperMethodName
(
"sex"
,
"getSexName"
);
putFieldWrapperMethodName
(
"sex"
,
"getSexName"
);
putFieldWrapperMethodName
(
"dept
i
d"
,
"getDeptName"
);
putFieldWrapperMethodName
(
"dept
I
d"
,
"getDeptName"
);
putFieldWrapperMethodName
(
"roleid"
,
"getSingleRoleName"
);
putFieldWrapperMethodName
(
"roleid"
,
"getSingleRoleName"
);
putFieldWrapperMethodName
(
"userId"
,
"getUserAccountById"
);
putFieldWrapperMethodName
(
"userId"
,
"getUserAccountById"
);
putFieldWrapperMethodName
(
"roleIds"
,
"getRoleName"
);
putFieldWrapperMethodName
(
"roleIds"
,
"getRoleName"
);
...
...
src/main/java/cn/stylefeng/guns/core/common/constant/factory/ConstantFactory.java
View file @
286004f7
...
@@ -316,9 +316,9 @@ public class ConstantFactory implements IConstantFactory {
...
@@ -316,9 +316,9 @@ public class ConstantFactory implements IConstantFactory {
* 获取子部门id
* 获取子部门id
*/
*/
@Override
@Override
public
List
<
Long
>
getSubDeptId
(
Long
dept
i
d
)
{
public
List
<
Long
>
getSubDeptId
(
Long
dept
I
d
)
{
Wrapper
<
Dept
>
wrapper
=
new
EntityWrapper
<>();
Wrapper
<
Dept
>
wrapper
=
new
EntityWrapper
<>();
wrapper
=
wrapper
.
like
(
"PIDS"
,
"%["
+
dept
i
d
+
"]%"
);
wrapper
=
wrapper
.
like
(
"PIDS"
,
"%["
+
dept
I
d
+
"]%"
);
List
<
Dept
>
depts
=
this
.
deptMapper
.
selectList
(
wrapper
);
List
<
Dept
>
depts
=
this
.
deptMapper
.
selectList
(
wrapper
);
ArrayList
<
Long
>
deptids
=
new
ArrayList
<>();
ArrayList
<
Long
>
deptids
=
new
ArrayList
<>();
...
@@ -336,8 +336,8 @@ public class ConstantFactory implements IConstantFactory {
...
@@ -336,8 +336,8 @@ public class ConstantFactory implements IConstantFactory {
* 获取所有父部门id
* 获取所有父部门id
*/
*/
@Override
@Override
public
List
<
Long
>
getParentDeptIds
(
Long
dept
i
d
)
{
public
List
<
Long
>
getParentDeptIds
(
Long
dept
I
d
)
{
Dept
dept
=
deptMapper
.
selectById
(
dept
i
d
);
Dept
dept
=
deptMapper
.
selectById
(
dept
I
d
);
String
pids
=
dept
.
getPids
();
String
pids
=
dept
.
getPids
();
String
[]
split
=
pids
.
split
(
","
);
String
[]
split
=
pids
.
split
(
","
);
ArrayList
<
Long
>
parentDeptIds
=
new
ArrayList
<>();
ArrayList
<
Long
>
parentDeptIds
=
new
ArrayList
<>();
...
...
src/main/java/cn/stylefeng/guns/core/common/constant/factory/IConstantFactory.java
View file @
286004f7
...
@@ -121,11 +121,11 @@ public interface IConstantFactory {
...
@@ -121,11 +121,11 @@ public interface IConstantFactory {
/**
/**
* 获取子部门id
* 获取子部门id
*/
*/
List
<
Long
>
getSubDeptId
(
Long
dept
i
d
);
List
<
Long
>
getSubDeptId
(
Long
dept
I
d
);
/**
/**
* 获取所有父部门id
* 获取所有父部门id
*/
*/
List
<
Long
>
getParentDeptIds
(
Long
dept
i
d
);
List
<
Long
>
getParentDeptIds
(
Long
dept
I
d
);
}
}
src/main/java/cn/stylefeng/guns/modular/system/controller/UserMgrController.java
View file @
286004f7
...
@@ -193,7 +193,7 @@ public class UserMgrController extends BaseController {
...
@@ -193,7 +193,7 @@ public class UserMgrController extends BaseController {
@ResponseBody
@ResponseBody
public
Object
list
(
@RequestParam
(
required
=
false
)
String
name
,
public
Object
list
(
@RequestParam
(
required
=
false
)
String
name
,
@RequestParam
(
required
=
false
)
String
timeLimit
,
@RequestParam
(
required
=
false
)
String
timeLimit
,
@RequestParam
(
required
=
false
)
Long
dept
i
d
)
{
@RequestParam
(
required
=
false
)
Long
dept
I
d
)
{
//拼接查询条件
//拼接查询条件
String
beginTime
=
""
;
String
beginTime
=
""
;
...
@@ -206,11 +206,11 @@ public class UserMgrController extends BaseController {
...
@@ -206,11 +206,11 @@ public class UserMgrController extends BaseController {
}
}
if
(
ShiroKit
.
isAdmin
())
{
if
(
ShiroKit
.
isAdmin
())
{
List
<
Map
<
String
,
Object
>>
users
=
userService
.
selectUsers
(
null
,
name
,
beginTime
,
endTime
,
dept
i
d
);
List
<
Map
<
String
,
Object
>>
users
=
userService
.
selectUsers
(
null
,
name
,
beginTime
,
endTime
,
dept
I
d
);
return
new
UserWarpper
(
users
).
wrap
();
return
new
UserWarpper
(
users
).
wrap
();
}
else
{
}
else
{
DataScope
dataScope
=
new
DataScope
(
ShiroKit
.
getDeptDataScope
());
DataScope
dataScope
=
new
DataScope
(
ShiroKit
.
getDeptDataScope
());
List
<
Map
<
String
,
Object
>>
users
=
userService
.
selectUsers
(
dataScope
,
name
,
beginTime
,
endTime
,
dept
i
d
);
List
<
Map
<
String
,
Object
>>
users
=
userService
.
selectUsers
(
dataScope
,
name
,
beginTime
,
endTime
,
dept
I
d
);
return
new
UserWarpper
(
users
).
wrap
();
return
new
UserWarpper
(
users
).
wrap
();
}
}
}
}
...
@@ -403,8 +403,8 @@ public class UserMgrController extends BaseController {
...
@@ -403,8 +403,8 @@ public class UserMgrController extends BaseController {
}
}
List
<
Long
>
deptDataScope
=
ShiroKit
.
getDeptDataScope
();
List
<
Long
>
deptDataScope
=
ShiroKit
.
getDeptDataScope
();
User
user
=
this
.
userService
.
selectById
(
userId
);
User
user
=
this
.
userService
.
selectById
(
userId
);
Long
dept
i
d
=
user
.
getDeptId
();
Long
dept
I
d
=
user
.
getDeptId
();
if
(
deptDataScope
.
contains
(
dept
i
d
))
{
if
(
deptDataScope
.
contains
(
dept
I
d
))
{
return
;
return
;
}
else
{
}
else
{
throw
new
ServiceException
(
BizExceptionEnum
.
NO_PERMITION
);
throw
new
ServiceException
(
BizExceptionEnum
.
NO_PERMITION
);
...
...
src/main/java/cn/stylefeng/guns/modular/system/mapper/UserMapper.java
View file @
286004f7
...
@@ -31,7 +31,7 @@ public interface UserMapper extends BaseMapper<User> {
...
@@ -31,7 +31,7 @@ public interface UserMapper extends BaseMapper<User> {
/**
/**
* 根据条件查询用户列表
* 根据条件查询用户列表
*/
*/
List
<
Map
<
String
,
Object
>>
selectUsers
(
@Param
(
"dataScope"
)
DataScope
dataScope
,
@Param
(
"name"
)
String
name
,
@Param
(
"beginTime"
)
String
beginTime
,
@Param
(
"endTime"
)
String
endTime
,
@Param
(
"dept
i
d"
)
Long
deptId
);
List
<
Map
<
String
,
Object
>>
selectUsers
(
@Param
(
"dataScope"
)
DataScope
dataScope
,
@Param
(
"name"
)
String
name
,
@Param
(
"beginTime"
)
String
beginTime
,
@Param
(
"endTime"
)
String
endTime
,
@Param
(
"dept
I
d"
)
Long
deptId
);
/**
/**
* 设置用户的角色
* 设置用户的角色
...
...
src/main/java/cn/stylefeng/guns/modular/system/mapper/mapping/UserMapper.xml
View file @
286004f7
...
@@ -49,8 +49,8 @@
...
@@ -49,8 +49,8 @@
or ACCOUNT like CONCAT('%',#{name},'%')
or ACCOUNT like CONCAT('%',#{name},'%')
or NAME like CONCAT('%',#{name},'%'))
or NAME like CONCAT('%',#{name},'%'))
</if>
</if>
<if
test=
"dept
id != null and depti
d != 0"
>
<if
test=
"dept
Id != null and deptI
d != 0"
>
and (DEPT_ID = #{dept
id} or DEPT_ID in ( select DEPT_ID from sys_dept where PIDS like CONCAT('%[', #{depti
d}, ']%') ))
and (DEPT_ID = #{dept
Id} or DEPT_ID in ( select DEPT_ID from sys_dept where PIDS like CONCAT('%[', #{deptI
d}, ']%') ))
</if>
</if>
<if
test=
"beginTime != null and beginTime != '' and endTime != null and endTime != ''"
>
<if
test=
"beginTime != null and beginTime != '' and endTime != null and endTime != ''"
>
and (CREATE_TIME between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59'))
and (CREATE_TIME between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59'))
...
...
src/main/webapp/WEB-INF/system/role/role_add.html
View file @
286004f7
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<h5>
别名
<span
class=
"text-danger"
>
*
</span></h5>
<h5>
别名
<span
class=
"text-danger"
>
*
</span></h5>
<div
class=
"controls"
>
<div
class=
"controls"
>
<input
v-model=
"
tips
"
type=
"text"
class=
"form-control"
>
<input
v-model=
"
description
"
type=
"text"
class=
"form-control"
>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
<h5>
部门名称
<span
class=
"text-danger"
>
*
</span></h5>
<h5>
部门名称
<span
class=
"text-danger"
>
*
</span></h5>
<div
class=
"controls"
>
<div
class=
"controls"
>
<input
v-model=
"deptName"
id=
"detpName"
\@
click=
"showDeptSelectTree"
type=
"text"
class=
"form-control"
autocomplete=
"off"
>
<input
v-model=
"deptName"
id=
"detpName"
\@
click=
"showDeptSelectTree"
type=
"text"
class=
"form-control"
autocomplete=
"off"
>
<input
v-model=
"dept
i
d"
type=
"hidden"
class=
"form-control"
>
<input
v-model=
"dept
I
d"
type=
"hidden"
class=
"form-control"
>
</div>
</div>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
...
...
src/main/webapp/WEB-INF/system/role/role_edit.html
View file @
286004f7
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
<h5>
部门名称
<span
class=
"text-danger"
>
*
</span></h5>
<h5>
部门名称
<span
class=
"text-danger"
>
*
</span></h5>
<div
class=
"controls"
>
<div
class=
"controls"
>
<input
v-model=
"deptName"
id=
"detpName"
\@
click=
"showDeptSelectTree"
type=
"text"
class=
"form-control"
autocomplete=
"off"
>
<input
v-model=
"deptName"
id=
"detpName"
\@
click=
"showDeptSelectTree"
type=
"text"
class=
"form-control"
autocomplete=
"off"
>
<input
v-model=
"dept
i
d"
type=
"hidden"
class=
"form-control"
>
<input
v-model=
"dept
I
d"
type=
"hidden"
class=
"form-control"
>
</div>
</div>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
...
...
src/main/webapp/assets/modular/system/role/role.js
View file @
286004f7
...
@@ -17,11 +17,10 @@ var Role = {
...
@@ -17,11 +17,10 @@ var Role = {
Role
.
initColumn
=
function
()
{
Role
.
initColumn
=
function
()
{
return
[
return
[
{
field
:
'selectItem'
,
radio
:
true
},
{
field
:
'selectItem'
,
radio
:
true
},
{
title
:
'id'
,
field
:
'
i
d'
,
visible
:
false
,
align
:
'center'
,
valign
:
'middle'
},
{
title
:
'id'
,
field
:
'
roleI
d'
,
visible
:
false
,
align
:
'center'
,
valign
:
'middle'
},
{
title
:
'名称'
,
field
:
'name'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
},
{
title
:
'名称'
,
field
:
'name'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
},
{
title
:
'上级角色'
,
field
:
'pName'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
},
{
title
:
'上级角色'
,
field
:
'pName'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
},
{
title
:
'所在部门'
,
field
:
'deptName'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
},
{
title
:
'别名'
,
field
:
'description'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
}];
{
title
:
'别名'
,
field
:
'tips'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
}];
};
};
...
@@ -64,7 +63,7 @@ Role.openChangeRole = function () {
...
@@ -64,7 +63,7 @@ Role.openChangeRole = function () {
area
:
[
'800px'
,
'400px'
],
//宽高
area
:
[
'800px'
,
'400px'
],
//宽高
fix
:
false
,
//不固定
fix
:
false
,
//不固定
maxmin
:
true
,
maxmin
:
true
,
content
:
Feng
.
ctxPath
+
'/role/role_edit?roleId='
+
this
.
seItem
.
i
d
content
:
Feng
.
ctxPath
+
'/role/role_edit?roleId='
+
this
.
seItem
.
roleI
d
});
});
}
}
};
};
...
@@ -82,7 +81,7 @@ Role.delRole = function () {
...
@@ -82,7 +81,7 @@ Role.delRole = function () {
},
function
(
data
)
{
},
function
(
data
)
{
Feng
.
error
(
"删除失败!"
+
data
.
responseJSON
.
message
+
"!"
);
Feng
.
error
(
"删除失败!"
+
data
.
responseJSON
.
message
+
"!"
);
});
});
ajax
.
set
(
"roleId"
,
Role
.
seItem
.
i
d
);
ajax
.
set
(
"roleId"
,
Role
.
seItem
.
roleI
d
);
ajax
.
start
();
ajax
.
start
();
};
};
...
@@ -101,7 +100,7 @@ Role.assign = function () {
...
@@ -101,7 +100,7 @@ Role.assign = function () {
area
:
[
'300px'
,
'450px'
],
//宽高
area
:
[
'300px'
,
'450px'
],
//宽高
fix
:
false
,
//不固定
fix
:
false
,
//不固定
maxmin
:
true
,
maxmin
:
true
,
content
:
Feng
.
ctxPath
+
'/role/role_assign/'
+
this
.
seItem
.
i
d
content
:
Feng
.
ctxPath
+
'/role/role_assign/'
+
this
.
seItem
.
roleI
d
});
});
}
}
};
};
...
...
src/main/webapp/assets/modular/system/role/role_add.js
View file @
286004f7
...
@@ -8,7 +8,7 @@ var RoleAddDlg = {
...
@@ -8,7 +8,7 @@ var RoleAddDlg = {
pid
:
""
,
pid
:
""
,
tips
:
""
,
tips
:
""
,
deptName
:
""
,
deptName
:
""
,
dept
i
d
:
""
,
dept
I
d
:
""
,
num
:
""
num
:
""
}
}
};
};
...
@@ -69,7 +69,7 @@ $(function () {
...
@@ -69,7 +69,7 @@ $(function () {
},
},
showDeptSelectTree
:
function
()
{
showDeptSelectTree
:
function
()
{
var
formName
=
encodeURIComponent
(
"parent.RoleAddDlg.app.deptName"
);
var
formName
=
encodeURIComponent
(
"parent.RoleAddDlg.app.deptName"
);
var
formId
=
encodeURIComponent
(
"parent.RoleAddDlg.app.dept
i
d"
);
var
formId
=
encodeURIComponent
(
"parent.RoleAddDlg.app.dept
I
d"
);
var
treeUrl
=
encodeURIComponent
(
Feng
.
ctxPath
+
"/dept/tree"
);
var
treeUrl
=
encodeURIComponent
(
Feng
.
ctxPath
+
"/dept/tree"
);
layer
.
open
({
layer
.
open
({
...
...
src/main/webapp/assets/modular/system/role/role_edit.js
View file @
286004f7
...
@@ -9,7 +9,7 @@ var RoleEditDlg = {
...
@@ -9,7 +9,7 @@ var RoleEditDlg = {
pid
:
""
,
pid
:
""
,
tips
:
""
,
tips
:
""
,
deptName
:
""
,
deptName
:
""
,
dept
i
d
:
""
,
dept
I
d
:
""
,
num
:
""
num
:
""
}
}
};
};
...
@@ -75,7 +75,7 @@ $(function () {
...
@@ -75,7 +75,7 @@ $(function () {
},
},
showDeptSelectTree
:
function
()
{
showDeptSelectTree
:
function
()
{
var
formName
=
encodeURIComponent
(
"parent.RoleEditDlg.app.deptName"
);
var
formName
=
encodeURIComponent
(
"parent.RoleEditDlg.app.deptName"
);
var
formId
=
encodeURIComponent
(
"parent.RoleEditDlg.app.dept
i
d"
);
var
formId
=
encodeURIComponent
(
"parent.RoleEditDlg.app.dept
I
d"
);
var
treeUrl
=
encodeURIComponent
(
Feng
.
ctxPath
+
"/dept/tree"
);
var
treeUrl
=
encodeURIComponent
(
Feng
.
ctxPath
+
"/dept/tree"
);
layer
.
open
({
layer
.
open
({
...
...
src/main/webapp/assets/modular/system/user/user.js
View file @
286004f7
...
@@ -264,7 +264,7 @@ MgrUser.resetPwdById = function (userId) {
...
@@ -264,7 +264,7 @@ MgrUser.resetPwdById = function (userId) {
MgrUser
.
search
=
function
()
{
MgrUser
.
search
=
function
()
{
var
queryData
=
{};
var
queryData
=
{};
queryData
[
'dept
i
d'
]
=
MgrUser
.
condition
.
deptId
;
queryData
[
'dept
I
d'
]
=
MgrUser
.
condition
.
deptId
;
queryData
[
'name'
]
=
MgrUser
.
condition
.
name
;
queryData
[
'name'
]
=
MgrUser
.
condition
.
name
;
queryData
[
'timeLimit'
]
=
$
(
"#timeLimit"
).
val
();
queryData
[
'timeLimit'
]
=
$
(
"#timeLimit"
).
val
();
...
...
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