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
001f2e2c
Commit
001f2e2c
authored
Oct 16, 2017
by
naan1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日志记录的注解中dict字段改为class类型 根据#IF16S建议
parent
6c1fdabf
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
42 additions
and
119 deletions
+42
-119
guns-admin/src/main/java/com/stylefeng/guns/common/annotion/BussinessLog.java
+4
-1
guns-admin/src/main/java/com/stylefeng/guns/common/constant/Dict.java
+0
-46
guns-admin/src/main/java/com/stylefeng/guns/common/constant/dictmap/factory/DictMapFactory.java
+0
-33
guns-admin/src/main/java/com/stylefeng/guns/core/aop/LogAop.java
+2
-3
guns-admin/src/main/java/com/stylefeng/guns/core/util/Contrast.java
+7
-8
guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/DeptController.java
+4
-4
guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/DictController.java
+4
-3
guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/MenuController.java
+4
-4
guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/NoticeController.java
+4
-4
guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/RoleController.java
+5
-5
guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/UserMgrController.java
+8
-8
No files found.
guns-admin/src/main/java/com/stylefeng/guns/common/annotion/BussinessLog.java
View file @
001f2e2c
package
com
.
stylefeng
.
guns
.
common
.
annotion
;
import
com.stylefeng.guns.common.constant.dictmap.base.AbstractDictMap
;
import
com.stylefeng.guns.common.constant.dictmap.base.SystemDict
;
import
java.lang.annotation.*
;
/**
...
...
@@ -26,5 +29,5 @@ public @interface BussinessLog {
/**
* 字典(用于查找key的中文名称和字段的中文名称)
*/
String
dict
()
default
"SystemDict"
;
Class
<?
extends
AbstractDictMap
>
dict
()
default
SystemDict
.
class
;
}
guns-admin/src/main/java/com/stylefeng/guns/common/constant/Dict.java
deleted
100644 → 0
View file @
6c1fdabf
package
com
.
stylefeng
.
guns
.
common
.
constant
;
/**
* 字典常量
*
* @author fengshuonan
* @date 2017年5月16日21:44:56
*/
public
interface
Dict
{
/**
* 系统管理员字典
*/
String
UserDict
=
"UserDict"
;
/**
* 角色管理员字典
*/
String
RoleDict
=
"RoleDict"
;
/**
* 删除业务的字典
*/
String
DeleteDict
=
"DeleteDict"
;
/**
* 部门管理业务的字典
*/
String
DeptDict
=
"DeptDict"
;
/**
* 菜单管理业务的字典
*/
String
MenuDict
=
"MenuDict"
;
/**
* 字典管理业务的字典
*/
String
DictMap
=
"DictMap"
;
/**
* 通知管理业务的字典
*/
String
NoticeMap
=
"NoticeMap"
;
}
guns-admin/src/main/java/com/stylefeng/guns/common/constant/dictmap/factory/DictMapFactory.java
deleted
100644 → 0
View file @
6c1fdabf
package
com
.
stylefeng
.
guns
.
common
.
constant
.
dictmap
.
factory
;
import
com.stylefeng.guns.common.constant.dictmap.base.AbstractDictMap
;
import
com.stylefeng.guns.common.constant.dictmap.base.SystemDict
;
import
com.stylefeng.guns.common.exception.BizExceptionEnum
;
import
com.stylefeng.guns.common.exception.BussinessException
;
/**
* 字典的创建工厂
*
* @author fengshuonan
* @date 2017-05-06 15:12
*/
public
class
DictMapFactory
{
private
static
final
String
basePath
=
"com.stylefeng.guns.common.constant.dictmap."
;
/**
* 通过类名创建具体的字典类
*/
public
static
AbstractDictMap
createDictMap
(
String
className
)
{
if
(
"SystemDict"
.
equals
(
className
)){
return
new
SystemDict
();
}
else
{
try
{
Class
<
AbstractDictMap
>
clazz
=
(
Class
<
AbstractDictMap
>)
Class
.
forName
(
basePath
+
className
);
return
clazz
.
newInstance
();
}
catch
(
Exception
e
)
{
throw
new
BussinessException
(
BizExceptionEnum
.
ERROR_CREATE_DICT
);
}
}
}
}
guns-admin/src/main/java/com/stylefeng/guns/core/aop/LogAop.java
View file @
001f2e2c
...
...
@@ -2,7 +2,6 @@ package com.stylefeng.guns.core.aop;
import
com.stylefeng.guns.common.annotion.BussinessLog
;
import
com.stylefeng.guns.common.constant.dictmap.base.AbstractDictMap
;
import
com.stylefeng.guns.common.constant.dictmap.factory.DictMapFactory
;
import
com.stylefeng.guns.core.log.LogManager
;
import
com.stylefeng.guns.core.log.LogObjectHolder
;
import
com.stylefeng.guns.core.log.factory.LogTaskFactory
;
...
...
@@ -81,7 +80,7 @@ public class LogAop {
BussinessLog
annotation
=
currentMethod
.
getAnnotation
(
BussinessLog
.
class
);
String
bussinessName
=
annotation
.
value
();
String
key
=
annotation
.
key
();
String
dictClass
=
annotation
.
dict
();
Class
dictClass
=
annotation
.
dict
();
StringBuilder
sb
=
new
StringBuilder
();
for
(
Object
param
:
params
)
{
...
...
@@ -97,7 +96,7 @@ public class LogAop {
msg
=
Contrast
.
contrastObj
(
dictClass
,
key
,
obj1
,
obj2
);
}
else
{
Map
<
String
,
String
>
parameters
=
HttpKit
.
getRequestParameters
();
AbstractDictMap
dictMap
=
DictMapFactory
.
createDictMap
(
dictClass
);
AbstractDictMap
dictMap
=
(
AbstractDictMap
)
dictClass
.
newInstance
(
);
msg
=
Contrast
.
parseMutiKey
(
dictMap
,
key
,
parameters
);
}
...
...
guns-admin/src/main/java/com/stylefeng/guns/core/util/Contrast.java
View file @
001f2e2c
...
...
@@ -2,7 +2,6 @@ package com.stylefeng.guns.core.util;
import
com.stylefeng.guns.common.constant.dictmap.base.AbstractDictMap
;
import
com.stylefeng.guns.common.constant.dictmap.factory.DictFieldWarpperFactory
;
import
com.stylefeng.guns.common.constant.dictmap.factory.DictMapFactory
;
import
com.stylefeng.guns.core.support.StrKit
;
import
java.beans.PropertyDescriptor
;
...
...
@@ -68,8 +67,8 @@ public class Contrast {
* @author stylefeng
* @Date 2017/5/9 19:34
*/
public
static
String
contrastObj
(
String
dictClass
,
String
key
,
Object
pojo1
,
Map
<
String
,
String
>
pojo2
)
{
AbstractDictMap
dictMap
=
DictMapFactory
.
createDictMap
(
dictClass
);
public
static
String
contrastObj
(
Class
dictClass
,
String
key
,
Object
pojo1
,
Map
<
String
,
String
>
pojo2
)
throws
IllegalAccessException
,
InstantiationException
{
AbstractDictMap
dictMap
=
(
AbstractDictMap
)
dictClass
.
newInstance
(
);
String
str
=
parseMutiKey
(
dictMap
,
key
,
pojo2
)
+
separator
;
try
{
Class
clazz
=
pojo1
.
getClass
();
...
...
@@ -119,8 +118,8 @@ public class Contrast {
* @author stylefeng
* @Date 2017/5/9 19:34
*/
public
static
String
contrastObjByName
(
String
dictClass
,
String
key
,
Object
pojo1
,
Map
<
String
,
String
>
pojo2
)
{
AbstractDictMap
dictMap
=
DictMapFactory
.
createDictMap
(
dictClass
);
public
static
String
contrastObjByName
(
Class
dictClass
,
String
key
,
Object
pojo1
,
Map
<
String
,
String
>
pojo2
)
throws
IllegalAccessException
,
InstantiationException
{
AbstractDictMap
dictMap
=
(
AbstractDictMap
)
dictClass
.
newInstance
(
);
String
str
=
parseMutiKey
(
dictMap
,
key
,
pojo2
)
+
separator
;
try
{
Class
clazz
=
pojo1
.
getClass
();
...
...
@@ -132,14 +131,14 @@ public class Contrast {
}
String
prefix
=
"get"
;
int
prefixLength
=
3
;
if
(
field
.
getType
().
getName
().
equals
(
"java.lang.Boolean"
))
{
if
(
field
.
getType
().
getName
().
equals
(
"java.lang.Boolean"
))
{
prefix
=
"is"
;
prefixLength
=
2
;
}
Method
getMethod
=
null
;
try
{
try
{
getMethod
=
clazz
.
getDeclaredMethod
(
prefix
+
StrKit
.
firstCharToUpperCase
(
field
.
getName
()));
}
catch
(
java
.
lang
.
NoSuchMethodException
e
)
{
}
catch
(
java
.
lang
.
NoSuchMethodException
e
)
{
System
.
err
.
println
(
"this className:"
+
clazz
.
getName
()
+
" is not methodName: "
+
e
.
getMessage
());
continue
;
}
...
...
guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/DeptController.java
View file @
001f2e2c
...
...
@@ -2,7 +2,7 @@ package com.stylefeng.guns.modular.system.controller;
import
com.stylefeng.guns.common.annotion.BussinessLog
;
import
com.stylefeng.guns.common.annotion.Permission
;
import
com.stylefeng.guns.common.constant.Dict
;
import
com.stylefeng.guns.common.constant.
dictmap.Dept
Dict
;
import
com.stylefeng.guns.common.constant.factory.ConstantFactory
;
import
com.stylefeng.guns.common.exception.BizExceptionEnum
;
import
com.stylefeng.guns.common.exception.BussinessException
;
...
...
@@ -90,7 +90,7 @@ public class DeptController extends BaseController {
/**
* 新增部门
*/
@BussinessLog
(
value
=
"添加部门"
,
key
=
"simplename"
,
dict
=
D
ict
.
DeptDict
)
@BussinessLog
(
value
=
"添加部门"
,
key
=
"simplename"
,
dict
=
D
eptDict
.
class
)
@RequestMapping
(
value
=
"/add"
)
@Permission
@ResponseBody
...
...
@@ -127,7 +127,7 @@ public class DeptController extends BaseController {
/**
* 修改部门
*/
@BussinessLog
(
value
=
"修改部门"
,
key
=
"simplename"
,
dict
=
D
ict
.
DeptDict
)
@BussinessLog
(
value
=
"修改部门"
,
key
=
"simplename"
,
dict
=
D
eptDict
.
class
)
@RequestMapping
(
value
=
"/update"
)
@Permission
@ResponseBody
...
...
@@ -143,7 +143,7 @@ public class DeptController extends BaseController {
/**
* 删除部门
*/
@BussinessLog
(
value
=
"删除部门"
,
key
=
"deptId"
,
dict
=
D
ict
.
DeleteDict
)
@BussinessLog
(
value
=
"删除部门"
,
key
=
"deptId"
,
dict
=
D
eptDict
.
class
)
@RequestMapping
(
value
=
"/delete"
)
@Permission
@ResponseBody
...
...
guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/DictController.java
View file @
001f2e2c
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.mapper.EntityWrapper;
import
com.stylefeng.guns.common.annotion.BussinessLog
;
import
com.stylefeng.guns.common.annotion.Permission
;
import
com.stylefeng.guns.common.constant.Const
;
import
com.stylefeng.guns.common.constant.dictmap.DictMap
;
import
com.stylefeng.guns.common.constant.factory.ConstantFactory
;
import
com.stylefeng.guns.common.exception.BizExceptionEnum
;
import
com.stylefeng.guns.common.exception.BussinessException
;
...
...
@@ -82,7 +83,7 @@ public class DictController extends BaseController {
*
* @param dictValues 格式例如 "1:启用;2:禁用;3:冻结"
*/
@BussinessLog
(
value
=
"添加字典记录"
,
key
=
"dictName,dictValues"
,
dict
=
com
.
stylefeng
.
guns
.
common
.
constant
.
Dict
.
DictMap
)
@BussinessLog
(
value
=
"添加字典记录"
,
key
=
"dictName,dictValues"
,
dict
=
DictMap
.
class
)
@RequestMapping
(
value
=
"/add"
)
@Permission
(
Const
.
ADMIN_NAME
)
@ResponseBody
...
...
@@ -118,7 +119,7 @@ public class DictController extends BaseController {
/**
* 修改字典
*/
@BussinessLog
(
value
=
"修改字典"
,
key
=
"dictName,dictValues"
,
dict
=
com
.
stylefeng
.
guns
.
common
.
constant
.
Dict
.
DictMap
)
@BussinessLog
(
value
=
"修改字典"
,
key
=
"dictName,dictValues"
,
dict
=
DictMap
.
class
)
@RequestMapping
(
value
=
"/update"
)
@Permission
(
Const
.
ADMIN_NAME
)
@ResponseBody
...
...
@@ -133,7 +134,7 @@ public class DictController extends BaseController {
/**
* 删除字典记录
*/
@BussinessLog
(
value
=
"删除字典记录"
,
key
=
"dictId"
,
dict
=
com
.
stylefeng
.
guns
.
common
.
constant
.
Dict
.
DeleteDict
)
@BussinessLog
(
value
=
"删除字典记录"
,
key
=
"dictId"
,
dict
=
DictMap
.
class
)
@RequestMapping
(
value
=
"/delete"
)
@Permission
(
Const
.
ADMIN_NAME
)
@ResponseBody
...
...
guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/MenuController.java
View file @
001f2e2c
...
...
@@ -3,7 +3,7 @@ package com.stylefeng.guns.modular.system.controller;
import
com.stylefeng.guns.common.annotion.BussinessLog
;
import
com.stylefeng.guns.common.annotion.Permission
;
import
com.stylefeng.guns.common.constant.Const
;
import
com.stylefeng.guns.common.constant.Dict
;
import
com.stylefeng.guns.common.constant.
dictmap.Menu
Dict
;
import
com.stylefeng.guns.common.constant.factory.ConstantFactory
;
import
com.stylefeng.guns.common.constant.state.MenuStatus
;
import
com.stylefeng.guns.common.exception.BizExceptionEnum
;
...
...
@@ -105,7 +105,7 @@ public class MenuController extends BaseController {
*/
@Permission
(
Const
.
ADMIN_NAME
)
@RequestMapping
(
value
=
"/edit"
)
@BussinessLog
(
value
=
"修改菜单"
,
key
=
"name"
,
dict
=
Dict
.
MenuDict
)
@BussinessLog
(
value
=
"修改菜单"
,
key
=
"name"
,
dict
=
MenuDict
.
class
)
@ResponseBody
public
Tip
edit
(
@Valid
Menu
menu
,
BindingResult
result
)
{
if
(
result
.
hasErrors
())
{
...
...
@@ -134,7 +134,7 @@ public class MenuController extends BaseController {
*/
@Permission
(
Const
.
ADMIN_NAME
)
@RequestMapping
(
value
=
"/add"
)
@BussinessLog
(
value
=
"菜单新增"
,
key
=
"name"
,
dict
=
Dict
.
MenuDict
)
@BussinessLog
(
value
=
"菜单新增"
,
key
=
"name"
,
dict
=
MenuDict
.
class
)
@ResponseBody
public
Tip
add
(
@Valid
Menu
menu
,
BindingResult
result
)
{
if
(
result
.
hasErrors
())
{
...
...
@@ -160,7 +160,7 @@ public class MenuController extends BaseController {
*/
@Permission
(
Const
.
ADMIN_NAME
)
@RequestMapping
(
value
=
"/remove"
)
@BussinessLog
(
value
=
"删除菜单"
,
key
=
"menuId"
,
dict
=
Dict
.
DeleteDict
)
@BussinessLog
(
value
=
"删除菜单"
,
key
=
"menuId"
,
dict
=
MenuDict
.
class
)
@ResponseBody
public
Tip
remove
(
@RequestParam
Integer
menuId
)
{
if
(
ToolUtil
.
isEmpty
(
menuId
))
{
...
...
guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/NoticeController.java
View file @
001f2e2c
package
com
.
stylefeng
.
guns
.
modular
.
system
.
controller
;
import
com.stylefeng.guns.common.annotion.BussinessLog
;
import
com.stylefeng.guns.common.constant.
Dict
;
import
com.stylefeng.guns.common.constant.
dictmap.NoticeMap
;
import
com.stylefeng.guns.common.constant.factory.ConstantFactory
;
import
com.stylefeng.guns.common.exception.BizExceptionEnum
;
import
com.stylefeng.guns.common.exception.BussinessException
;
...
...
@@ -95,7 +95,7 @@ public class NoticeController extends BaseController {
*/
@RequestMapping
(
value
=
"/add"
)
@ResponseBody
@BussinessLog
(
value
=
"新增通知"
,
key
=
"title"
,
dict
=
Dict
.
NoticeMap
)
@BussinessLog
(
value
=
"新增通知"
,
key
=
"title"
,
dict
=
NoticeMap
.
class
)
public
Object
add
(
Notice
notice
)
{
if
(
ToolUtil
.
isOneEmpty
(
notice
,
notice
.
getTitle
(),
notice
.
getContent
()))
{
throw
new
BussinessException
(
BizExceptionEnum
.
REQUEST_NULL
);
...
...
@@ -111,7 +111,7 @@ public class NoticeController extends BaseController {
*/
@RequestMapping
(
value
=
"/delete"
)
@ResponseBody
@BussinessLog
(
value
=
"删除通知"
,
key
=
"noticeId"
,
dict
=
Dict
.
DeleteDict
)
@BussinessLog
(
value
=
"删除通知"
,
key
=
"noticeId"
,
dict
=
NoticeMap
.
class
)
public
Object
delete
(
@RequestParam
Integer
noticeId
)
{
//缓存通知名称
...
...
@@ -127,7 +127,7 @@ public class NoticeController extends BaseController {
*/
@RequestMapping
(
value
=
"/update"
)
@ResponseBody
@BussinessLog
(
value
=
"修改通知"
,
key
=
"title"
,
dict
=
Dict
.
NoticeMap
)
@BussinessLog
(
value
=
"修改通知"
,
key
=
"title"
,
dict
=
NoticeMap
.
class
)
public
Object
update
(
Notice
notice
)
{
if
(
ToolUtil
.
isOneEmpty
(
notice
,
notice
.
getId
(),
notice
.
getTitle
(),
notice
.
getContent
()))
{
throw
new
BussinessException
(
BizExceptionEnum
.
REQUEST_NULL
);
...
...
guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/RoleController.java
View file @
001f2e2c
...
...
@@ -3,8 +3,8 @@ package com.stylefeng.guns.modular.system.controller;
import
com.stylefeng.guns.common.annotion.BussinessLog
;
import
com.stylefeng.guns.common.annotion.Permission
;
import
com.stylefeng.guns.common.constant.Const
;
import
com.stylefeng.guns.common.constant.Dict
;
import
com.stylefeng.guns.common.constant.cache.Cache
;
import
com.stylefeng.guns.common.constant.dictmap.RoleDict
;
import
com.stylefeng.guns.common.constant.factory.ConstantFactory
;
import
com.stylefeng.guns.common.exception.BizExceptionEnum
;
import
com.stylefeng.guns.common.exception.BussinessException
;
...
...
@@ -121,7 +121,7 @@ public class RoleController extends BaseController {
* 角色新增
*/
@RequestMapping
(
value
=
"/add"
)
@BussinessLog
(
value
=
"添加角色"
,
key
=
"name"
,
dict
=
Dict
.
RoleDict
)
@BussinessLog
(
value
=
"添加角色"
,
key
=
"name"
,
dict
=
RoleDict
.
class
)
@Permission
(
Const
.
ADMIN_NAME
)
@ResponseBody
public
Tip
add
(
@Valid
Role
role
,
BindingResult
result
)
{
...
...
@@ -137,7 +137,7 @@ public class RoleController extends BaseController {
* 角色修改
*/
@RequestMapping
(
value
=
"/edit"
)
@BussinessLog
(
value
=
"修改角色"
,
key
=
"name"
,
dict
=
Dict
.
RoleDict
)
@BussinessLog
(
value
=
"修改角色"
,
key
=
"name"
,
dict
=
RoleDict
.
class
)
@Permission
(
Const
.
ADMIN_NAME
)
@ResponseBody
public
Tip
edit
(
@Valid
Role
role
,
BindingResult
result
)
{
...
...
@@ -155,7 +155,7 @@ public class RoleController extends BaseController {
* 删除角色
*/
@RequestMapping
(
value
=
"/remove"
)
@BussinessLog
(
value
=
"删除角色"
,
key
=
"roleId"
,
dict
=
Dict
.
DeleteDict
)
@BussinessLog
(
value
=
"删除角色"
,
key
=
"roleId"
,
dict
=
RoleDict
.
class
)
@Permission
(
Const
.
ADMIN_NAME
)
@ResponseBody
public
Tip
remove
(
@RequestParam
Integer
roleId
)
{
...
...
@@ -195,7 +195,7 @@ public class RoleController extends BaseController {
* 配置权限
*/
@RequestMapping
(
"/setAuthority"
)
@BussinessLog
(
value
=
"配置权限"
,
key
=
"roleId,ids"
,
dict
=
Dict
.
RoleDict
)
@BussinessLog
(
value
=
"配置权限"
,
key
=
"roleId,ids"
,
dict
=
RoleDict
.
class
)
@Permission
(
Const
.
ADMIN_NAME
)
@ResponseBody
public
Tip
setAuthority
(
@RequestParam
(
"roleId"
)
Integer
roleId
,
@RequestParam
(
"ids"
)
String
ids
)
{
...
...
guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/UserMgrController.java
View file @
001f2e2c
...
...
@@ -3,7 +3,7 @@ package com.stylefeng.guns.modular.system.controller;
import
com.stylefeng.guns.common.annotion.BussinessLog
;
import
com.stylefeng.guns.common.annotion.Permission
;
import
com.stylefeng.guns.common.constant.Const
;
import
com.stylefeng.guns.common.constant.Dict
;
import
com.stylefeng.guns.common.constant.
dictmap.User
Dict
;
import
com.stylefeng.guns.common.constant.factory.ConstantFactory
;
import
com.stylefeng.guns.common.constant.state.ManagerStatus
;
import
com.stylefeng.guns.common.exception.BizExceptionEnum
;
...
...
@@ -177,7 +177,7 @@ public class UserMgrController extends BaseController {
* 添加管理员
*/
@RequestMapping
(
"/add"
)
@BussinessLog
(
value
=
"添加管理员"
,
key
=
"account"
,
dict
=
Dict
.
UserDict
)
@BussinessLog
(
value
=
"添加管理员"
,
key
=
"account"
,
dict
=
UserDict
.
class
)
@Permission
(
Const
.
ADMIN_NAME
)
@ResponseBody
public
Tip
add
(
@Valid
UserDto
user
,
BindingResult
result
)
{
...
...
@@ -207,7 +207,7 @@ public class UserMgrController extends BaseController {
* @throws NoPermissionException
*/
@RequestMapping
(
"/edit"
)
@BussinessLog
(
value
=
"修改管理员"
,
key
=
"account"
,
dict
=
Dict
.
UserDict
)
@BussinessLog
(
value
=
"修改管理员"
,
key
=
"account"
,
dict
=
UserDict
.
class
)
@ResponseBody
public
Tip
edit
(
@Valid
UserDto
user
,
BindingResult
result
)
throws
NoPermissionException
{
if
(
result
.
hasErrors
())
{
...
...
@@ -232,7 +232,7 @@ public class UserMgrController extends BaseController {
* 删除管理员(逻辑删除)
*/
@RequestMapping
(
"/delete"
)
@BussinessLog
(
value
=
"删除管理员"
,
key
=
"userId"
,
dict
=
Dict
.
UserDict
)
@BussinessLog
(
value
=
"删除管理员"
,
key
=
"userId"
,
dict
=
UserDict
.
class
)
@Permission
@ResponseBody
public
Tip
delete
(
@RequestParam
Integer
userId
)
{
...
...
@@ -265,7 +265,7 @@ public class UserMgrController extends BaseController {
* 重置管理员的密码
*/
@RequestMapping
(
"/reset"
)
@BussinessLog
(
value
=
"重置管理员密码"
,
key
=
"userId"
,
dict
=
Dict
.
UserDict
)
@BussinessLog
(
value
=
"重置管理员密码"
,
key
=
"userId"
,
dict
=
UserDict
.
class
)
@Permission
(
Const
.
ADMIN_NAME
)
@ResponseBody
public
Tip
reset
(
@RequestParam
Integer
userId
)
{
...
...
@@ -284,7 +284,7 @@ public class UserMgrController extends BaseController {
* 冻结用户
*/
@RequestMapping
(
"/freeze"
)
@BussinessLog
(
value
=
"冻结用户"
,
key
=
"userId"
,
dict
=
Dict
.
UserDict
)
@BussinessLog
(
value
=
"冻结用户"
,
key
=
"userId"
,
dict
=
UserDict
.
class
)
@Permission
(
Const
.
ADMIN_NAME
)
@ResponseBody
public
Tip
freeze
(
@RequestParam
Integer
userId
)
{
...
...
@@ -304,7 +304,7 @@ public class UserMgrController extends BaseController {
* 解除冻结用户
*/
@RequestMapping
(
"/unfreeze"
)
@BussinessLog
(
value
=
"解除冻结用户"
,
key
=
"userId"
,
dict
=
Dict
.
UserDict
)
@BussinessLog
(
value
=
"解除冻结用户"
,
key
=
"userId"
,
dict
=
UserDict
.
class
)
@Permission
(
Const
.
ADMIN_NAME
)
@ResponseBody
public
Tip
unfreeze
(
@RequestParam
Integer
userId
)
{
...
...
@@ -320,7 +320,7 @@ public class UserMgrController extends BaseController {
* 分配角色
*/
@RequestMapping
(
"/setRole"
)
@BussinessLog
(
value
=
"分配角色"
,
key
=
"userId,roleIds"
,
dict
=
Dict
.
UserDict
)
@BussinessLog
(
value
=
"分配角色"
,
key
=
"userId,roleIds"
,
dict
=
UserDict
.
class
)
@Permission
(
Const
.
ADMIN_NAME
)
@ResponseBody
public
Tip
setRole
(
@RequestParam
(
"userId"
)
Integer
userId
,
@RequestParam
(
"roleIds"
)
String
roleIds
)
{
...
...
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