feat: i18n support for export and log
This commit is contained in:
@@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import org.wfc.common.core.constant.Constants;
|
||||
import org.wfc.common.core.domain.R;
|
||||
import org.wfc.common.core.exception.job.TaskException;
|
||||
import org.wfc.common.core.utils.MessageUtils;
|
||||
import org.wfc.common.core.utils.StringUtils;
|
||||
import org.wfc.common.core.utils.poi.ExcelUtil;
|
||||
import org.wfc.common.core.web.controller.BaseController;
|
||||
@@ -61,13 +62,13 @@ public class SysJobController extends BaseController
|
||||
* 导出定时任务列表
|
||||
*/
|
||||
// @RequiresPermissions("monitor:job:export")
|
||||
@Log(title = "定时任务", businessType = BusinessType.EXPORT)
|
||||
@Log(title = "menu.system.job.management", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysJob sysJob)
|
||||
{
|
||||
List<SysJob> list = jobService.selectJobList(sysJob);
|
||||
ExcelUtil<SysJob> util = new ExcelUtil<SysJob>(SysJob.class);
|
||||
util.exportExcel(response, list, "定时任务");
|
||||
util.exportExcel(response, list, MessageUtils.message("excel.scheduled.task.list"));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -84,7 +85,7 @@ public class SysJobController extends BaseController
|
||||
* 新增定时任务
|
||||
*/
|
||||
// @RequiresPermissions("monitor:job:add")
|
||||
@Log(title = "定时任务", businessType = BusinessType.INSERT)
|
||||
@Log(title = "menu.system.job.management", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SysJob job) throws SchedulerException, TaskException
|
||||
{
|
||||
@@ -120,7 +121,7 @@ public class SysJobController extends BaseController
|
||||
* 修改定时任务
|
||||
*/
|
||||
// @RequiresPermissions("monitor:job:edit")
|
||||
@Log(title = "定时任务", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.system.job.management", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SysJob job) throws SchedulerException, TaskException
|
||||
{
|
||||
@@ -156,7 +157,7 @@ public class SysJobController extends BaseController
|
||||
* 定时任务状态修改
|
||||
*/
|
||||
// @RequiresPermissions("monitor:job:changeStatus")
|
||||
@Log(title = "定时任务", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.system.job.management", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/changeStatus")
|
||||
public AjaxResult changeStatus(@RequestBody SysJob job) throws SchedulerException
|
||||
{
|
||||
@@ -169,7 +170,7 @@ public class SysJobController extends BaseController
|
||||
* 定时任务立即执行一次
|
||||
*/
|
||||
// @RequiresPermissions("monitor:job:changeStatus")
|
||||
@Log(title = "定时任务", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.system.job.management", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/run")
|
||||
public AjaxResult run(@RequestBody SysJob job) throws SchedulerException
|
||||
{
|
||||
@@ -189,7 +190,7 @@ public class SysJobController extends BaseController
|
||||
* 删除定时任务
|
||||
*/
|
||||
// @RequiresPermissions("monitor:job:remove")
|
||||
@Log(title = "定时任务", businessType = BusinessType.DELETE)
|
||||
@Log(title = "menu.system.job.management", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{jobIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] jobIds) throws SchedulerException, TaskException
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.wfc.job.controller;
|
||||
|
||||
import org.aspectj.bridge.MessageUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -7,6 +8,7 @@ import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.wfc.common.core.utils.MessageUtils;
|
||||
import org.wfc.common.core.utils.poi.ExcelUtil;
|
||||
import org.wfc.common.core.web.controller.BaseController;
|
||||
import org.wfc.common.core.web.domain.AjaxResult;
|
||||
@@ -47,13 +49,13 @@ public class SysJobLogController extends BaseController
|
||||
* 导出定时任务调度日志列表
|
||||
*/
|
||||
// @RequiresPermissions("monitor:job:export")
|
||||
@Log(title = "任务调度日志", businessType = BusinessType.EXPORT)
|
||||
@Log(title = "menu.system.job.log", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysJobLog sysJobLog)
|
||||
{
|
||||
List<SysJobLog> list = jobLogService.selectJobLogList(sysJobLog);
|
||||
ExcelUtil<SysJobLog> util = new ExcelUtil<SysJobLog>(SysJobLog.class);
|
||||
util.exportExcel(response, list, "调度日志");
|
||||
util.exportExcel(response, list, MessageUtils.message("menu.system.job.log"));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -70,7 +72,7 @@ public class SysJobLogController extends BaseController
|
||||
* 删除定时任务调度日志
|
||||
*/
|
||||
// @RequiresPermissions("monitor:job:remove")
|
||||
@Log(title = "定时任务调度日志", businessType = BusinessType.DELETE)
|
||||
@Log(title = "menu.system.job.log", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{jobLogIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] jobLogIds)
|
||||
{
|
||||
@@ -81,7 +83,7 @@ public class SysJobLogController extends BaseController
|
||||
* 清空定时任务调度日志
|
||||
*/
|
||||
// @RequiresPermissions("monitor:job:remove")
|
||||
@Log(title = "调度日志", businessType = BusinessType.CLEAN)
|
||||
@Log(title = "menu.system.job.log", businessType = BusinessType.CLEAN)
|
||||
@DeleteMapping("/clean")
|
||||
public AjaxResult clean()
|
||||
{
|
||||
|
||||
@@ -25,35 +25,35 @@ public class SysJob extends BaseEntity
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 任务ID */
|
||||
@Excel(name = "任务序号", cellType = ColumnType.NUMERIC)
|
||||
@Excel(name = "excel.scheduled.task.id", cellType = ColumnType.NUMERIC)
|
||||
private Long jobId;
|
||||
|
||||
/** 任务名称 */
|
||||
@Excel(name = "任务名称")
|
||||
@Excel(name = "excel.scheduled.task.name")
|
||||
private String jobName;
|
||||
|
||||
/** 任务组名 */
|
||||
@Excel(name = "任务组名")
|
||||
@Excel(name = "excel.scheduled.task.job.group")
|
||||
private String jobGroup;
|
||||
|
||||
/** 调用目标字符串 */
|
||||
@Excel(name = "调用目标字符串")
|
||||
@Excel(name = "excel.scheduled.task.invoke.target")
|
||||
private String invokeTarget;
|
||||
|
||||
/** cron执行表达式 */
|
||||
@Excel(name = "执行表达式 ")
|
||||
@Excel(name = "excel.scheduled.task.cron.expression")
|
||||
private String cronExpression;
|
||||
|
||||
/** cron计划策略 */
|
||||
@Excel(name = "计划策略 ", readConverterExp = "0=默认,1=立即触发执行,2=触发一次执行,3=不触发立即执行")
|
||||
@Excel(name = "excel.scheduled.task.schedule.strategy", readConverterExp = "0=Default,1=Trigger immediate execution,2=Trigger an execution,3=Do not trigger immediate execution")
|
||||
private String misfirePolicy = ScheduleConstants.MISFIRE_DEFAULT;
|
||||
|
||||
/** 是否并发执行(0允许 1禁止) */
|
||||
@Excel(name = "并发执行", readConverterExp = "0=允许,1=禁止")
|
||||
@Excel(name = "excel.scheduled.task.concurrent", readConverterExp = "0=Enabled,1=Diasbled")
|
||||
private String concurrent;
|
||||
|
||||
/** 任务状态(0正常 1暂停) */
|
||||
@Excel(name = "任务状态", readConverterExp = "0=正常,1=暂停")
|
||||
@Excel(name = "excel.scheduled.task.status", readConverterExp = "0=Normal,1=Supend")
|
||||
private String status;
|
||||
|
||||
public Long getJobId()
|
||||
|
||||
@@ -16,31 +16,31 @@ public class SysJobLog extends BaseEntity
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** ID */
|
||||
@Excel(name = "日志序号")
|
||||
@Excel(name = "excel.scheduled.task.log.id")
|
||||
private Long jobLogId;
|
||||
|
||||
/** 任务名称 */
|
||||
@Excel(name = "任务名称")
|
||||
@Excel(name = "excel.scheduled.task.name")
|
||||
private String jobName;
|
||||
|
||||
/** 任务组名 */
|
||||
@Excel(name = "任务组名")
|
||||
@Excel(name = "excel.scheduled.task.job.group")
|
||||
private String jobGroup;
|
||||
|
||||
/** 调用目标字符串 */
|
||||
@Excel(name = "调用目标字符串")
|
||||
@Excel(name = "excel.scheduled.task.invoke.target")
|
||||
private String invokeTarget;
|
||||
|
||||
/** 日志信息 */
|
||||
@Excel(name = "日志信息")
|
||||
@Excel(name = "excel.scheduled.task.log.info")
|
||||
private String jobMessage;
|
||||
|
||||
/** 执行状态(0正常 1失败) */
|
||||
@Excel(name = "执行状态", readConverterExp = "0=正常,1=失败")
|
||||
@Excel(name = "excel.scheduled.task.log.status", readConverterExp = "0=Success,1=Failure")
|
||||
private String status;
|
||||
|
||||
/** 异常信息 */
|
||||
@Excel(name = "异常信息")
|
||||
@Excel(name = "excel.scheduled.task.log.error.msg")
|
||||
private String exceptionInfo;
|
||||
|
||||
/** 开始时间 */
|
||||
|
||||
@@ -68,7 +68,7 @@ public class SysDeptController extends BaseController
|
||||
* 新增部门
|
||||
*/
|
||||
@RequiresPermissions("system:dept:add")
|
||||
@Log(title = "部门管理", businessType = BusinessType.INSERT)
|
||||
@Log(title = "menu.system.department.management", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody SysDept dept)
|
||||
{
|
||||
@@ -84,7 +84,7 @@ public class SysDeptController extends BaseController
|
||||
* 修改部门
|
||||
*/
|
||||
@RequiresPermissions("system:dept:edit")
|
||||
@Log(title = "部门管理", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.system.department.management", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody SysDept dept)
|
||||
{
|
||||
@@ -110,7 +110,7 @@ public class SysDeptController extends BaseController
|
||||
* 删除部门
|
||||
*/
|
||||
@RequiresPermissions("system:dept:remove")
|
||||
@Log(title = "部门管理", businessType = BusinessType.DELETE)
|
||||
@Log(title = "menu.system.department.management", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{deptId}")
|
||||
public AjaxResult remove(@PathVariable Long deptId)
|
||||
{
|
||||
|
||||
@@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.wfc.common.core.utils.MessageUtils;
|
||||
import org.wfc.common.core.utils.StringUtils;
|
||||
import org.wfc.common.core.utils.poi.ExcelUtil;
|
||||
import org.wfc.common.core.web.controller.BaseController;
|
||||
@@ -50,14 +51,14 @@ public class SysDictDataController extends BaseController
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "字典数据", businessType = BusinessType.EXPORT)
|
||||
@Log(title = "menu.system.dict.data", businessType = BusinessType.EXPORT)
|
||||
@RequiresPermissions("system:dict:export")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysDictData dictData)
|
||||
{
|
||||
List<SysDictData> list = dictDataService.selectDictDataList(dictData);
|
||||
ExcelUtil<SysDictData> util = new ExcelUtil<SysDictData>(SysDictData.class);
|
||||
util.exportExcel(response, list, "字典数据");
|
||||
util.exportExcel(response, list, MessageUtils.message("menu.system.dict.data"));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -88,7 +89,7 @@ public class SysDictDataController extends BaseController
|
||||
* 新增字典类型
|
||||
*/
|
||||
@RequiresPermissions("system:dict:add")
|
||||
@Log(title = "字典数据", businessType = BusinessType.INSERT)
|
||||
@Log(title = "menu.system.dict.data", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody SysDictData dict)
|
||||
{
|
||||
@@ -100,7 +101,7 @@ public class SysDictDataController extends BaseController
|
||||
* 修改保存字典类型
|
||||
*/
|
||||
@RequiresPermissions("system:dict:edit")
|
||||
@Log(title = "字典数据", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.system.dict.data", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody SysDictData dict)
|
||||
{
|
||||
@@ -112,7 +113,7 @@ public class SysDictDataController extends BaseController
|
||||
* 删除字典类型
|
||||
*/
|
||||
@RequiresPermissions("system:dict:remove")
|
||||
@Log(title = "字典类型", businessType = BusinessType.DELETE)
|
||||
@Log(title = "menu.system.dict.data", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{dictCodes}")
|
||||
public AjaxResult remove(@PathVariable Long[] dictCodes)
|
||||
{
|
||||
|
||||
@@ -46,14 +46,14 @@ public class SysDictTypeController extends BaseController
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "字典类型", businessType = BusinessType.EXPORT)
|
||||
@Log(title = "menu.system.dict.type", businessType = BusinessType.EXPORT)
|
||||
@RequiresPermissions("system:dict:export")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysDictType dictType)
|
||||
{
|
||||
List<SysDictType> list = dictTypeService.selectDictTypeList(dictType);
|
||||
ExcelUtil<SysDictType> util = new ExcelUtil<SysDictType>(SysDictType.class);
|
||||
util.exportExcel(response, list, "字典类型");
|
||||
util.exportExcel(response, list, MessageUtils.message("menu.system.dict.type"));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -70,7 +70,7 @@ public class SysDictTypeController extends BaseController
|
||||
* 新增字典类型
|
||||
*/
|
||||
@RequiresPermissions("system:dict:add")
|
||||
@Log(title = "字典类型", businessType = BusinessType.INSERT)
|
||||
@Log(title = "menu.system.dict.type", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody SysDictType dict)
|
||||
{
|
||||
@@ -86,7 +86,7 @@ public class SysDictTypeController extends BaseController
|
||||
* 修改字典类型
|
||||
*/
|
||||
@RequiresPermissions("system:dict:edit")
|
||||
@Log(title = "字典类型", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.system.dict.type", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody SysDictType dict)
|
||||
{
|
||||
@@ -102,7 +102,7 @@ public class SysDictTypeController extends BaseController
|
||||
* 删除字典类型
|
||||
*/
|
||||
@RequiresPermissions("system:dict:remove")
|
||||
@Log(title = "字典类型", businessType = BusinessType.DELETE)
|
||||
@Log(title = "menu.system.dict.type", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{dictIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] dictIds)
|
||||
{
|
||||
@@ -114,7 +114,7 @@ public class SysDictTypeController extends BaseController
|
||||
* 刷新字典缓存
|
||||
*/
|
||||
@RequiresPermissions("system:dict:remove")
|
||||
@Log(title = "字典类型", businessType = BusinessType.CLEAN)
|
||||
@Log(title = "menu.system.dict.type", businessType = BusinessType.CLEAN)
|
||||
@DeleteMapping("/refreshCache")
|
||||
public AjaxResult refreshCache()
|
||||
{
|
||||
|
||||
@@ -51,7 +51,7 @@ public class SysEmailController extends BaseController {
|
||||
try {
|
||||
MailUtils.sendText(email, "Registration verification code", "Your verification code is: " + code + ", The validity period is " + Constants.MAIL_CAPTCHA_EXPIRATION + " minutes, please fill in as soon as possible.");
|
||||
} catch (Exception e) {
|
||||
log.error("验证码短信发送异常 => {}", e.getMessage());
|
||||
log.error("Verification code sending exception => {}", e.getMessage());
|
||||
return R.fail(e.getMessage());
|
||||
}
|
||||
return R.ok();
|
||||
|
||||
@@ -93,7 +93,7 @@ public class SysMenuController extends BaseController {
|
||||
* 新增菜单
|
||||
*/
|
||||
@RequiresPermissions("system:menu:add")
|
||||
@Log(title = "菜单管理", businessType = BusinessType.INSERT)
|
||||
@Log(title = "menu.system.menu.management", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody SysMenu menu) {
|
||||
if (!menuService.checkMenuNameUnique(menu)) {
|
||||
@@ -109,7 +109,7 @@ public class SysMenuController extends BaseController {
|
||||
* 修改菜单
|
||||
*/
|
||||
@RequiresPermissions("system:menu:edit")
|
||||
@Log(title = "菜单管理", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.system.menu.management", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody SysMenu menu) {
|
||||
if (!menuService.checkMenuNameUnique(menu)) {
|
||||
@@ -127,7 +127,7 @@ public class SysMenuController extends BaseController {
|
||||
* 删除菜单
|
||||
*/
|
||||
@RequiresPermissions("system:menu:remove")
|
||||
@Log(title = "菜单管理", businessType = BusinessType.DELETE)
|
||||
@Log(title = "menu.system.menu.management", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{menuId}")
|
||||
public AjaxResult remove(@PathVariable("menuId") Long menuId) {
|
||||
if (menuService.hasChildByMenuId(menuId)) {
|
||||
|
||||
@@ -10,6 +10,7 @@ import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.wfc.common.core.utils.MessageUtils;
|
||||
import org.wfc.common.core.utils.poi.ExcelUtil;
|
||||
import org.wfc.common.core.web.controller.BaseController;
|
||||
import org.wfc.common.core.web.domain.AjaxResult;
|
||||
@@ -33,7 +34,7 @@ public class SysOperlogController extends BaseController
|
||||
@Autowired
|
||||
private ISysOperLogService operLogService;
|
||||
|
||||
@RequiresPermissions("system:operlog:list")
|
||||
// @RequiresPermissions("system:operlog:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SysOperLog operLog)
|
||||
{
|
||||
@@ -42,26 +43,34 @@ public class SysOperlogController extends BaseController
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "操作日志", businessType = BusinessType.EXPORT)
|
||||
@RequiresPermissions("system:operlog:export")
|
||||
@Log(title = "excel.operation.log", businessType = BusinessType.EXPORT)
|
||||
// @RequiresPermissions("system:operlog:export")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysOperLog operLog)
|
||||
{
|
||||
List<SysOperLog> list = operLogService.selectOperLogList(operLog);
|
||||
ExcelUtil<SysOperLog> util = new ExcelUtil<SysOperLog>(SysOperLog.class);
|
||||
util.exportExcel(response, list, "操作日志");
|
||||
try
|
||||
{
|
||||
util.exportExcel(response, list, MessageUtils.message("excel.operation.log"));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
// util.exportExcel(response, list, MessageUtils.message("excel.operation.log"));
|
||||
}
|
||||
|
||||
@Log(title = "操作日志", businessType = BusinessType.DELETE)
|
||||
@RequiresPermissions("system:operlog:remove")
|
||||
@Log(title = "excel.operation.log", businessType = BusinessType.DELETE)
|
||||
// @RequiresPermissions("system:operlog:remove")
|
||||
@DeleteMapping("/{operIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] operIds)
|
||||
{
|
||||
return toAjax(operLogService.deleteOperLogByIds(operIds));
|
||||
}
|
||||
|
||||
@RequiresPermissions("system:operlog:remove")
|
||||
@Log(title = "操作日志", businessType = BusinessType.CLEAN)
|
||||
// @RequiresPermissions("system:operlog:remove")
|
||||
@Log(title = "excel.operation.log", businessType = BusinessType.CLEAN)
|
||||
@DeleteMapping("/clean")
|
||||
public AjaxResult clean()
|
||||
{
|
||||
|
||||
@@ -47,7 +47,7 @@ public class SysPostController extends BaseController
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "岗位管理", businessType = BusinessType.EXPORT)
|
||||
@Log(title = "menu.system.position.management", businessType = BusinessType.EXPORT)
|
||||
@RequiresPermissions("system:post:export")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysPost post)
|
||||
@@ -71,7 +71,7 @@ public class SysPostController extends BaseController
|
||||
* 新增岗位
|
||||
*/
|
||||
@RequiresPermissions("system:post:add")
|
||||
@Log(title = "岗位管理", businessType = BusinessType.INSERT)
|
||||
@Log(title = "menu.system.position.management", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody SysPost post)
|
||||
{
|
||||
@@ -91,7 +91,7 @@ public class SysPostController extends BaseController
|
||||
* 修改岗位
|
||||
*/
|
||||
@RequiresPermissions("system:post:edit")
|
||||
@Log(title = "岗位管理", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.system.position.management", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody SysPost post)
|
||||
{
|
||||
@@ -111,7 +111,7 @@ public class SysPostController extends BaseController
|
||||
* 删除岗位
|
||||
*/
|
||||
@RequiresPermissions("system:post:remove")
|
||||
@Log(title = "岗位管理", businessType = BusinessType.DELETE)
|
||||
@Log(title = "menu.system.position.management", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{postIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] postIds)
|
||||
{
|
||||
|
||||
@@ -62,7 +62,7 @@ public class SysProfileController extends BaseController
|
||||
/**
|
||||
* 修改用户
|
||||
*/
|
||||
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.user.profile", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult updateProfile(@RequestBody SysUser user)
|
||||
{
|
||||
@@ -94,7 +94,7 @@ public class SysProfileController extends BaseController
|
||||
/**
|
||||
* 重置密码
|
||||
*/
|
||||
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.user.profile", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/updatePwd")
|
||||
public AjaxResult updatePwd(String oldPassword, String newPassword)
|
||||
{
|
||||
@@ -126,7 +126,7 @@ public class SysProfileController extends BaseController
|
||||
/**
|
||||
* 头像上传
|
||||
*/
|
||||
@Log(title = "用户头像", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.user.avatar", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/avatar")
|
||||
public AjaxResult avatar(@RequestParam("avatarfile") MultipartFile file)
|
||||
{
|
||||
|
||||
@@ -56,14 +56,14 @@ public class SysRoleController extends BaseController
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "角色管理", businessType = BusinessType.EXPORT)
|
||||
@Log(title = "menu.system.role.management", businessType = BusinessType.EXPORT)
|
||||
@RequiresPermissions("system:role:export")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysRole role)
|
||||
{
|
||||
List<SysRole> list = roleService.selectRoleList(role);
|
||||
ExcelUtil<SysRole> util = new ExcelUtil<SysRole>(SysRole.class);
|
||||
util.exportExcel(response, list, "角色数据");
|
||||
util.exportExcel(response, list, MessageUtils.message("menu.system.role.data"));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -81,7 +81,7 @@ public class SysRoleController extends BaseController
|
||||
* 新增角色
|
||||
*/
|
||||
@RequiresPermissions("system:role:add")
|
||||
@Log(title = "角色管理", businessType = BusinessType.INSERT)
|
||||
@Log(title = "menu.system.role.management", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody SysRole role)
|
||||
{
|
||||
@@ -101,7 +101,7 @@ public class SysRoleController extends BaseController
|
||||
* 修改保存角色
|
||||
*/
|
||||
@RequiresPermissions("system:role:edit")
|
||||
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.system.role.management", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody SysRole role)
|
||||
{
|
||||
@@ -123,7 +123,7 @@ public class SysRoleController extends BaseController
|
||||
* 修改保存数据权限
|
||||
*/
|
||||
@RequiresPermissions("system:role:edit")
|
||||
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.system.role.management", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/dataScope")
|
||||
public AjaxResult dataScope(@RequestBody SysRole role)
|
||||
{
|
||||
@@ -136,7 +136,7 @@ public class SysRoleController extends BaseController
|
||||
* 状态修改
|
||||
*/
|
||||
@RequiresPermissions("system:role:edit")
|
||||
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.system.role.management", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/changeStatus")
|
||||
public AjaxResult changeStatus(@RequestBody SysRole role)
|
||||
{
|
||||
@@ -150,7 +150,7 @@ public class SysRoleController extends BaseController
|
||||
* 删除角色
|
||||
*/
|
||||
@RequiresPermissions("system:role:remove")
|
||||
@Log(title = "角色管理", businessType = BusinessType.DELETE)
|
||||
@Log(title = "menu.system.role.management", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{roleIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] roleIds)
|
||||
{
|
||||
@@ -194,7 +194,7 @@ public class SysRoleController extends BaseController
|
||||
* 取消授权用户
|
||||
*/
|
||||
@RequiresPermissions("system:role:edit")
|
||||
@Log(title = "角色管理", businessType = BusinessType.GRANT)
|
||||
@Log(title = "menu.system.role.management", businessType = BusinessType.GRANT)
|
||||
@PutMapping("/authUser/cancel")
|
||||
public AjaxResult cancelAuthUser(@RequestBody SysUserRole userRole)
|
||||
{
|
||||
@@ -205,7 +205,7 @@ public class SysRoleController extends BaseController
|
||||
* 批量取消授权用户
|
||||
*/
|
||||
@RequiresPermissions("system:role:edit")
|
||||
@Log(title = "角色管理", businessType = BusinessType.GRANT)
|
||||
@Log(title = "menu.system.role.management", businessType = BusinessType.GRANT)
|
||||
@PutMapping("/authUser/cancelAll")
|
||||
public AjaxResult cancelAuthUserAll(Long roleId, Long[] userIds)
|
||||
{
|
||||
@@ -216,7 +216,7 @@ public class SysRoleController extends BaseController
|
||||
* 批量选择用户授权
|
||||
*/
|
||||
@RequiresPermissions("system:role:edit")
|
||||
@Log(title = "角色管理", businessType = BusinessType.GRANT)
|
||||
@Log(title = "menu.system.role.management", businessType = BusinessType.GRANT)
|
||||
@PutMapping("/authUser/selectAll")
|
||||
public AjaxResult selectAuthUserAll(Long roleId, Long[] userIds)
|
||||
{
|
||||
|
||||
@@ -132,17 +132,17 @@ public class SysUserController extends BaseController
|
||||
return result;
|
||||
}
|
||||
|
||||
@Log(title = "用户管理", businessType = BusinessType.EXPORT)
|
||||
@Log(title = "menu.user.management", businessType = BusinessType.EXPORT)
|
||||
@RequiresPermissions("system:user:export")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysUser user)
|
||||
{
|
||||
List<SysUser> list = userService.selectUserList(user);
|
||||
ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
|
||||
util.exportExcel(response, list, "用户数据");
|
||||
util.exportExcel(response, list, MessageUtils.message("menu.user.data"));
|
||||
}
|
||||
|
||||
@Log(title = "用户管理", businessType = BusinessType.IMPORT)
|
||||
@Log(title = "menu.user.management", businessType = BusinessType.IMPORT)
|
||||
@RequiresPermissions("system:user:import")
|
||||
@PostMapping("/importData")
|
||||
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
|
||||
@@ -158,7 +158,7 @@ public class SysUserController extends BaseController
|
||||
public void importTemplate(HttpServletResponse response) throws IOException
|
||||
{
|
||||
ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
|
||||
util.importTemplateExcel(response, "用户数据");
|
||||
util.importTemplateExcel(response, "User Data");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -278,7 +278,7 @@ public class SysUserController extends BaseController
|
||||
* 新增用户
|
||||
*/
|
||||
@RequiresPermissions("system:user:add")
|
||||
@Log(title = "用户管理", businessType = BusinessType.INSERT)
|
||||
@Log(title = "menu.user.management", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody SysUser user)
|
||||
{
|
||||
@@ -305,7 +305,7 @@ public class SysUserController extends BaseController
|
||||
* 修改用户
|
||||
*/
|
||||
@RequiresPermissions("system:user:edit")
|
||||
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.user.management", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody SysUser user)
|
||||
{
|
||||
@@ -333,7 +333,7 @@ public class SysUserController extends BaseController
|
||||
* 删除用户
|
||||
*/
|
||||
@RequiresPermissions("system:user:remove")
|
||||
@Log(title = "用户管理", businessType = BusinessType.DELETE)
|
||||
@Log(title = "menu.user.management", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{userIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] userIds)
|
||||
{
|
||||
@@ -348,7 +348,7 @@ public class SysUserController extends BaseController
|
||||
* 重置密码
|
||||
*/
|
||||
@RequiresPermissions("system:user:edit")
|
||||
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.user.management", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/resetPwd")
|
||||
public AjaxResult resetPwd(@RequestBody SysUser user)
|
||||
{
|
||||
@@ -363,7 +363,7 @@ public class SysUserController extends BaseController
|
||||
* 状态修改
|
||||
*/
|
||||
@RequiresPermissions("system:user:edit")
|
||||
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.user.management", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/changeStatus")
|
||||
public AjaxResult changeStatus(@RequestBody SysUser user)
|
||||
{
|
||||
@@ -392,7 +392,7 @@ public class SysUserController extends BaseController
|
||||
* 用户授权角色
|
||||
*/
|
||||
@RequiresPermissions("system:user:edit")
|
||||
@Log(title = "用户管理", businessType = BusinessType.GRANT)
|
||||
@Log(title = "menu.user.management", businessType = BusinessType.GRANT)
|
||||
@PutMapping("/authRole")
|
||||
public AjaxResult insertAuthRole(Long userId, Long[] roleIds)
|
||||
{
|
||||
|
||||
@@ -73,7 +73,7 @@ public class SysUserOnlineController extends BaseController
|
||||
* 强退用户
|
||||
*/
|
||||
@RequiresPermissions("monitor:online:forceLogout")
|
||||
@Log(title = "在线用户", businessType = BusinessType.FORCE)
|
||||
@Log(title = "menu.user.online", businessType = BusinessType.FORCE)
|
||||
@DeleteMapping("/{tokenId}")
|
||||
public AjaxResult forceLogout(@PathVariable String tokenId)
|
||||
{
|
||||
|
||||
@@ -53,19 +53,19 @@ public class UBillRuleController extends BaseController {
|
||||
return success(uBillRuleService.getById(id));
|
||||
}
|
||||
|
||||
@Log(title = "计费规则", businessType = BusinessType.INSERT)
|
||||
@Log(title = "menu.billing.rule.management", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody UBillRule uBillRule) {
|
||||
return toAjax(uBillRuleService.save(uBillRule));
|
||||
}
|
||||
|
||||
@Log(title = "计费规则", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.billing.rule.management", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody UBillRule uBillRule) {
|
||||
return toAjax(uBillRuleService.updateById(uBillRule));
|
||||
}
|
||||
|
||||
@Log(title = "计费规则", businessType = BusinessType.DELETE)
|
||||
@Log(title = "menu.billing.rule.management", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(uBillRuleService.removeByIds(CollUtil.newArrayList(ids)));
|
||||
|
||||
@@ -12,6 +12,8 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import org.wfc.common.core.web.controller.BaseController;
|
||||
import org.wfc.common.core.web.domain.AjaxResult;
|
||||
import org.wfc.common.core.web.page.TableDataInfo;
|
||||
import org.wfc.common.log.annotation.Log;
|
||||
import org.wfc.common.log.enums.BusinessType;
|
||||
import org.wfc.system.domain.UKyc;
|
||||
import org.wfc.system.domain.bo.UKycUserBo;
|
||||
import org.wfc.system.domain.constant.KycStatusEnum;
|
||||
@@ -55,6 +57,7 @@ public class UKycController extends BaseController {
|
||||
return success(uKycService.getById(id));
|
||||
}
|
||||
|
||||
@Log(title = "menu.user.kyc.management", businessType = BusinessType.APPROVAL)
|
||||
@PutMapping("/approve")
|
||||
public AjaxResult approve(@RequestBody UKyc uKyc) {
|
||||
// set user kyc status to verified
|
||||
@@ -63,6 +66,7 @@ public class UKycController extends BaseController {
|
||||
return toAjax(uKycService.updateKycByUserId(uKyc));
|
||||
}
|
||||
|
||||
@Log(title = "menu.user.kyc.management", businessType = BusinessType.REJECT)
|
||||
@PutMapping("/reject")
|
||||
public AjaxResult reject(@RequestBody UKyc uKyc) {
|
||||
// set kyc request status to rejected and put the description in the database
|
||||
|
||||
@@ -59,19 +59,19 @@ public class UPackageController extends BaseController {
|
||||
return success(uPackageService.getById(id));
|
||||
}
|
||||
|
||||
@Log(title = "套餐设置", businessType = BusinessType.INSERT)
|
||||
@Log(title = "menu.billing.package.management", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody UPackage uPackage) {
|
||||
return toAjax(uPackageService.save(uPackage));
|
||||
}
|
||||
|
||||
@Log(title = "套餐设置", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.billing.package.management", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody UPackage uPackage) {
|
||||
return toAjax(uPackageService.updateById(uPackage));
|
||||
}
|
||||
|
||||
@Log(title = "套餐设置", businessType = BusinessType.DELETE)
|
||||
@Log(title = "menu.billing.package.management", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(uPackageService.removeByIds(CollUtil.newArrayList(ids)));
|
||||
|
||||
@@ -53,19 +53,19 @@ public class URateLimitController extends BaseController {
|
||||
return success(uRateLimitService.getById(id));
|
||||
}
|
||||
|
||||
@Log(title = "限速设置", businessType = BusinessType.INSERT)
|
||||
@Log(title = "menu.billing.ratelimit.management", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody URateLimit uRateLimit) {
|
||||
return toAjax(uRateLimitService.save(uRateLimit));
|
||||
}
|
||||
|
||||
@Log(title = "限速设置", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.billing.ratelimit.management", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody URateLimit uRateLimit) {
|
||||
return toAjax(uRateLimitService.updateById(uRateLimit));
|
||||
}
|
||||
|
||||
@Log(title = "限速设置", businessType = BusinessType.DELETE)
|
||||
@Log(title = "menu.billing.ratelimit.management", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(uRateLimitService.removeByIds(CollUtil.newArrayList(ids)));
|
||||
|
||||
Reference in New Issue
Block a user