完善导出权限
This commit is contained in:
@@ -15,6 +15,9 @@ public class PermissionConstants
|
||||
|
||||
/** 删除权限 */
|
||||
public static final String REMOVE_PERMISSION = "remove";
|
||||
|
||||
/** 导出权限 */
|
||||
public static final String EXPORT_PERMISSION = "export";
|
||||
|
||||
/** 显示权限 */
|
||||
public static final String VIEW_PERMISSION = "view";
|
||||
|
@@ -33,6 +33,10 @@ public class PermissionUtils
|
||||
{
|
||||
msg = MessageUtils.message("no.delete.permission", permission);
|
||||
}
|
||||
else if (StringUtils.endsWithIgnoreCase(permission, PermissionConstants.EXPORT_PERMISSION))
|
||||
{
|
||||
msg = MessageUtils.message("no.export.permission", permission);
|
||||
}
|
||||
else if (StringUtils.endsWithAny(permission, new String[] { PermissionConstants.VIEW_PERMISSION, PermissionConstants.LIST_PERMISSION }))
|
||||
{
|
||||
msg = MessageUtils.message("no.view.permission", permission);
|
||||
|
@@ -56,6 +56,7 @@ public class BaseController
|
||||
protected TableDataInfo getDataTable(List<?> list)
|
||||
{
|
||||
TableDataInfo rspData = new TableDataInfo();
|
||||
rspData.setCode(0);
|
||||
rspData.setRows(list);
|
||||
rspData.setTotal(new PageInfo(list).getTotal());
|
||||
return rspData;
|
||||
|
@@ -15,6 +15,8 @@ public class TableDataInfo implements Serializable
|
||||
private long total;
|
||||
/** 列表数据 */
|
||||
private List<?> rows;
|
||||
/** 消息状态码 */
|
||||
private int code;
|
||||
|
||||
/**
|
||||
* 表格数据对象
|
||||
@@ -55,4 +57,13 @@ public class TableDataInfo implements Serializable
|
||||
this.rows = rows;
|
||||
}
|
||||
|
||||
public int getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code)
|
||||
{
|
||||
this.code = code;
|
||||
}
|
||||
}
|
||||
|
@@ -51,6 +51,7 @@ public class JobController extends BaseController
|
||||
}
|
||||
|
||||
@Log(title = "定时任务", action = BusinessType.EXPORT)
|
||||
@RequiresPermissions("monitor:job:export")
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(Job job) throws Exception
|
||||
|
@@ -49,6 +49,7 @@ public class JobLogController extends BaseController
|
||||
}
|
||||
|
||||
@Log(title = "调度日志", action = BusinessType.EXPORT)
|
||||
@RequiresPermissions("monitor:job:export")
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(JobLog jobLog) throws Exception
|
||||
|
@@ -49,6 +49,7 @@ public class LogininforController extends BaseController
|
||||
}
|
||||
|
||||
@Log(title = "登陆日志", action = BusinessType.EXPORT)
|
||||
@RequiresPermissions("monitor:logininfor:export")
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(Logininfor logininfor) throws Exception
|
||||
|
@@ -51,6 +51,7 @@ public class OperlogController extends BaseController
|
||||
}
|
||||
|
||||
@Log(title = "操作日志", action = BusinessType.EXPORT)
|
||||
@RequiresPermissions("monitor:operlog:export")
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(OperLog operLog) throws Exception
|
||||
|
@@ -54,6 +54,7 @@ public class ConfigController extends BaseController
|
||||
}
|
||||
|
||||
@Log(title = "参数管理", action = BusinessType.EXPORT)
|
||||
@RequiresPermissions("system:config:export")
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(Config config) throws Exception
|
||||
|
@@ -51,6 +51,7 @@ public class DictDataController extends BaseController
|
||||
}
|
||||
|
||||
@Log(title = "字典数据", action = BusinessType.EXPORT)
|
||||
@RequiresPermissions("system:dict:export")
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(DictData dictData) throws Exception
|
||||
|
@@ -51,6 +51,7 @@ public class DictTypeController extends BaseController
|
||||
}
|
||||
|
||||
@Log(title = "字典类型", action = BusinessType.EXPORT)
|
||||
@RequiresPermissions("system:dict:export")
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(DictType dictType) throws Exception
|
||||
|
@@ -51,6 +51,7 @@ public class PostController extends BaseController
|
||||
}
|
||||
|
||||
@Log(title = "岗位管理", action = BusinessType.EXPORT)
|
||||
@RequiresPermissions("system:post:export")
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(Post post) throws Exception
|
||||
|
@@ -53,6 +53,7 @@ public class RoleController extends BaseController
|
||||
}
|
||||
|
||||
@Log(title = "角色管理", action = BusinessType.EXPORT)
|
||||
@RequiresPermissions("system:role:export")
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(Role role) throws Exception
|
||||
|
@@ -61,6 +61,7 @@ public class UserController extends BaseController
|
||||
}
|
||||
|
||||
@Log(title = "用户管理", action = BusinessType.EXPORT)
|
||||
@RequiresPermissions("system:user:export")
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(User user) throws Exception
|
||||
|
Reference in New Issue
Block a user