feat: i18n support for export and log
This commit is contained in:
@@ -19,23 +19,23 @@ public class SysDictData extends BaseEntity
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 字典编码 */
|
||||
@Excel(name = "字典编码", cellType = ColumnType.NUMERIC)
|
||||
@Excel(name = "excel.dict.data.dict.code", cellType = ColumnType.NUMERIC)
|
||||
private Long dictCode;
|
||||
|
||||
/** 字典排序 */
|
||||
@Excel(name = "字典排序", cellType = ColumnType.NUMERIC)
|
||||
@Excel(name = "excel.dict.data.dict.sort", cellType = ColumnType.NUMERIC)
|
||||
private Long dictSort;
|
||||
|
||||
/** 字典标签 */
|
||||
@Excel(name = "字典标签")
|
||||
@Excel(name = "excel.dict.data.dict.label")
|
||||
private String dictLabel;
|
||||
|
||||
/** 字典键值 */
|
||||
@Excel(name = "字典键值")
|
||||
@Excel(name = "excel.dict.data.dict.value")
|
||||
private String dictValue;
|
||||
|
||||
/** 字典类型 */
|
||||
@Excel(name = "字典类型")
|
||||
@Excel(name = "excel.dict.data.dict.type")
|
||||
private String dictType;
|
||||
|
||||
/** 样式属性(其他样式扩展) */
|
||||
@@ -45,11 +45,11 @@ public class SysDictData extends BaseEntity
|
||||
private String listClass;
|
||||
|
||||
/** 是否默认(Y是 N否) */
|
||||
@Excel(name = "是否默认", readConverterExp = "Y=是,N=否")
|
||||
@Excel(name = "excel.dict.data.is.default", readConverterExp = "Y=Yes,N=No")
|
||||
private String isDefault;
|
||||
|
||||
/** 状态(0正常 1停用) */
|
||||
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
|
||||
@Excel(name = "excel.dict.data.status", readConverterExp = "0=Normal,1=Deactivated")
|
||||
private String status;
|
||||
|
||||
public Long getDictCode()
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.wfc.common.core.annotation.Excel;
|
||||
import org.wfc.common.core.annotation.Excel.ColumnType;
|
||||
import org.wfc.common.core.utils.MessageUtils;
|
||||
import org.wfc.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
@@ -16,71 +17,71 @@ public class SysOperLog extends BaseEntity
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 日志主键 */
|
||||
@Excel(name = "操作序号", cellType = ColumnType.NUMERIC)
|
||||
@Excel(name = "excel.operation.log.id", cellType = ColumnType.NUMERIC)
|
||||
private Long operId;
|
||||
|
||||
/** 操作模块 */
|
||||
@Excel(name = "操作模块")
|
||||
@Excel(name = "excel.operation.log.title")
|
||||
private String title;
|
||||
|
||||
/** 业务类型(0其它 1新增 2修改 3删除) */
|
||||
@Excel(name = "业务类型", readConverterExp = "0=其它,1=新增,2=修改,3=删除,4=授权,5=导出,6=导入,7=强退,8=生成代码,9=清空数据")
|
||||
@Excel(name = "excel.operation.log.business.type", readConverterExp = "0=Other,1=Add,2=Modify,3=Delete,4=Authorize,5=Export,6=Import,7=Force Logout,8=Generate Code,9=Clear Data,9=Approval,10=Reject")
|
||||
private Integer businessType;
|
||||
|
||||
/** 业务类型数组 */
|
||||
private Integer[] businessTypes;
|
||||
|
||||
/** 请求方法 */
|
||||
@Excel(name = "请求方法")
|
||||
@Excel(name = "excel.operation.log.method")
|
||||
private String method;
|
||||
|
||||
/** 请求方式 */
|
||||
@Excel(name = "请求方式")
|
||||
@Excel(name = "excel.operation.log.request.method")
|
||||
private String requestMethod;
|
||||
|
||||
/** 操作类别(0其它 1后台用户 2手机端用户) */
|
||||
@Excel(name = "操作类别", readConverterExp = "0=其它,1=后台用户,2=手机端用户")
|
||||
@Excel(name = "excel.operation.log.operator.type", readConverterExp = "0=Other,1=System User,2=Client User")
|
||||
private Integer operatorType;
|
||||
|
||||
/** 操作人员 */
|
||||
@Excel(name = "操作人员")
|
||||
@Excel(name = "excel.operation.log.operator.name")
|
||||
private String operName;
|
||||
|
||||
/** 部门名称 */
|
||||
@Excel(name = "部门名称")
|
||||
//@Excel(name = "excel.operation.log.department.name")
|
||||
private String deptName;
|
||||
|
||||
/** 请求url */
|
||||
@Excel(name = "请求地址")
|
||||
@Excel(name = "excel.operation.log.operation.url")
|
||||
private String operUrl;
|
||||
|
||||
/** 操作地址 */
|
||||
@Excel(name = "操作地址")
|
||||
@Excel(name = "excel.operation.log.operation.ip")
|
||||
private String operIp;
|
||||
|
||||
/** 请求参数 */
|
||||
@Excel(name = "请求参数")
|
||||
@Excel(name = "excel.operation.log.operation.parameter")
|
||||
private String operParam;
|
||||
|
||||
/** 返回参数 */
|
||||
@Excel(name = "返回参数")
|
||||
@Excel(name = "excel.operation.log.json.result")
|
||||
private String jsonResult;
|
||||
|
||||
/** 操作状态(0正常 1异常) */
|
||||
@Excel(name = "状态", readConverterExp = "0=正常,1=异常")
|
||||
@Excel(name = "excel.operation.log.status", readConverterExp = "0=Normal,1=Abrnormal")
|
||||
private Integer status;
|
||||
|
||||
/** 错误消息 */
|
||||
@Excel(name = "错误消息")
|
||||
@Excel(name = "excel.operation.log.error.msg")
|
||||
private String errorMsg;
|
||||
|
||||
/** 操作时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "excel.operation.log.operation.time", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date operTime;
|
||||
|
||||
/** 消耗时间 */
|
||||
@Excel(name = "消耗时间", suffix = "毫秒")
|
||||
@Excel(name = "excel.operation.log.cost.time", suffix = "ms")
|
||||
private Long costTime;
|
||||
|
||||
public Long getOperId()
|
||||
@@ -100,7 +101,10 @@ public class SysOperLog extends BaseEntity
|
||||
|
||||
public void setTitle(String title)
|
||||
{
|
||||
this.title = title;
|
||||
if (title == null || title.isEmpty()) {
|
||||
this.title=title;
|
||||
}
|
||||
this.title = MessageUtils.message(title);
|
||||
}
|
||||
|
||||
public Integer getBusinessType()
|
||||
|
||||
@@ -28,6 +28,11 @@ public @interface Excel
|
||||
*/
|
||||
public String name() default "";
|
||||
|
||||
/**
|
||||
* Whether to use localized name from message resource bundle
|
||||
*/
|
||||
public boolean useLocalized() default true;
|
||||
|
||||
/**
|
||||
* 日期格式, 如: yyyy-MM-dd
|
||||
*/
|
||||
|
||||
@@ -59,6 +59,7 @@ import org.wfc.common.core.annotation.Excels;
|
||||
import org.wfc.common.core.exception.UtilException;
|
||||
import org.wfc.common.core.text.Convert;
|
||||
import org.wfc.common.core.utils.DateUtils;
|
||||
import org.wfc.common.core.utils.MessageUtils;
|
||||
import org.wfc.common.core.utils.StringUtils;
|
||||
import org.wfc.common.core.utils.file.FileTypeUtils;
|
||||
import org.wfc.common.core.utils.file.ImageUtils;
|
||||
@@ -218,6 +219,19 @@ public class ExcelUtil<T>
|
||||
createSubHead();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the localized name for an Excel annotation
|
||||
* @param excel The Excel annotation
|
||||
* @return The localized name if useLocalized is true and name is a valid message key,
|
||||
* otherwise returns the original name
|
||||
*/
|
||||
public static String getLocalizedName(Excel excel) {
|
||||
if (!excel.useLocalized() || excel.name() == null || excel.name().isEmpty()) {
|
||||
return excel.name();
|
||||
}
|
||||
return MessageUtils.message(excel.name());
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建excel第一行标题
|
||||
*/
|
||||
@@ -819,7 +833,8 @@ public class ExcelUtil<T>
|
||||
// 创建列
|
||||
Cell cell = row.createCell(column);
|
||||
// 写入列信息
|
||||
cell.setCellValue(attr.name());
|
||||
// cell.setCellValue(attr.name());
|
||||
cell.setCellValue(getLocalizedName(attr));
|
||||
setDataValidation(attr, row, column);
|
||||
cell.setCellStyle(styles.get(StringUtils.format("header_{}_{}", attr.headerColor(), attr.headerBackgroundColor())));
|
||||
if (isSubList())
|
||||
|
||||
@@ -177,10 +177,14 @@ common.demo.mode=Demo mode, no operation is allowed
|
||||
menu.system.management=System Management
|
||||
menu.system.config=System Config
|
||||
menu.system.dict.management=Dict Management
|
||||
menu.system.dict.type=Dict Type
|
||||
menu.system.dict.data=Dict Data
|
||||
menu.system.menu.management=Menu Management
|
||||
menu.system.role.management=Role Management
|
||||
menu.system.role.data=Role Data
|
||||
menu.system.account.management=Account Management
|
||||
menu.system.job.management=Job Management
|
||||
menu.system.job.management=Task Management
|
||||
menu.system.job.log=Task Log
|
||||
menu.system.file.management=File Management
|
||||
menu.system.config.management=Config Management
|
||||
menu.system.log.management=Log Management
|
||||
@@ -194,7 +198,7 @@ menu.system.tenant.role.management=Tenant Role Management
|
||||
menu.system.tenant.menu.management=Tenant Menu Management
|
||||
menu.system.tenant.dict.management=Tenant Dict Management
|
||||
menu.system.tenant.config.management=Tenant Config Management
|
||||
menu.system.tenant.job.management=Tenant Job Management
|
||||
menu.system.tenant.job.management=Tenant Task Management
|
||||
menu.system.tenant.file.management=Tenant File Management
|
||||
menu.system.tenant.log.management=Tenant Log Management
|
||||
menu.system.tenant.monitor.management=Tenant Monitor Management
|
||||
@@ -203,7 +207,12 @@ menu.billing.rule.management=Billing Rule
|
||||
menu.billing.ratelimit.management=Rate Limit
|
||||
menu.billing.package.management=Package Management
|
||||
menu.user.management=User Management
|
||||
menu.user.data=User Data
|
||||
menu.user.online=User Online
|
||||
menu.user.info=User Information
|
||||
menu.user.password=User Password
|
||||
menu.user.profile=User Profile
|
||||
menu.user.avatar=User Avatar
|
||||
menu.user.cdr.management=Internet Record
|
||||
menu.user.bill.management=Bill Management
|
||||
menu.user.kyc.management=KYC Management
|
||||
@@ -263,3 +272,51 @@ menu.action.task.export=Export Task
|
||||
menu.action.batch.export=Batch Export
|
||||
menu.action.batch.import=Batch Import
|
||||
menu.action.batch.delete=Batch Delete
|
||||
|
||||
# excel export eperation log
|
||||
excel.operation.log=Operation Log
|
||||
excel.operation.log.id=Log ID
|
||||
excel.operation.log.title=Module Title
|
||||
excel.operation.log.business.type=Business Type
|
||||
excel.operation.log.method=Method
|
||||
excel.operation.log.request.method=Request Method
|
||||
excel.operation.log.operator.type=Operator Type
|
||||
excel.operation.log.operator.name=Operator
|
||||
excel.operation.log.department.name=Department name
|
||||
excel.operation.log.operation.url=Operation URL
|
||||
excel.operation.log.operation.ip=Operation IP
|
||||
excel.operation.log.operation.parameter=Operation Parameter
|
||||
excel.operation.log.json.result=Result
|
||||
excel.operation.log.status=Status
|
||||
excel.operation.log.error.msg=Error Message
|
||||
excel.operation.log.operation.time=Operation Time
|
||||
excel.operation.log.cost.time=Cost Time
|
||||
|
||||
# excel export task
|
||||
excel.scheduled.task.list=Task List
|
||||
excel.scheduled.task.id=Task ID
|
||||
excel.scheduled.task.name=Task Name
|
||||
excel.scheduled.task.job.group=Task Group
|
||||
excel.scheduled.task.invoke.target=Invoke Target
|
||||
excel.scheduled.task.cron.expression=Cron Expression
|
||||
excel.scheduled.task.schedule.strategy=Schedule Strategy
|
||||
excel.scheduled.task.concurrent=Concurrent
|
||||
excel.scheduled.task.status=Task Status
|
||||
excel.scheduled.task.create.time=Create Time
|
||||
excel.scheduled.task.update.time=Update Time
|
||||
excel.scheduled.task.remark=Remark
|
||||
excel.scheduled.task.log.id=Log ID
|
||||
excel.scheduled.task.log.info=Log Info
|
||||
excel.scheduled.task.log.status=Status
|
||||
excel.scheduled.task.log.error.msg=Error Message
|
||||
|
||||
# excel export dict data
|
||||
excel.dict.data=Dict Data
|
||||
excel.dict.data.dict.code=Dict Code
|
||||
excel.dict.data.dict.sort=Dict Sort
|
||||
excel.dict.data.dict.label=Dict Label
|
||||
excel.dict.data.dict.value=Dict Value
|
||||
excel.dict.data.dict.type=Dict Type
|
||||
excel.dict.data.is.default=Is Default
|
||||
excel.dict.data.status=Status
|
||||
excel.dict.data.remark=Remark
|
||||
@@ -179,10 +179,14 @@ common.demo.mode=Demo mode, no operation is allowed
|
||||
menu.system.management=System Management
|
||||
menu.system.config=System Config
|
||||
menu.system.dict.management=Dict Management
|
||||
menu.system.dict.type=Dict Type
|
||||
menu.system.dict.data=Dict Data
|
||||
menu.system.menu.management=Menu Management
|
||||
menu.system.role.management=Role Management
|
||||
menu.system.role.data=Role Data
|
||||
menu.system.account.management=Account Management
|
||||
menu.system.job.management=Job Management
|
||||
menu.system.job.management=Task Management
|
||||
menu.system.job.log=Task Log
|
||||
menu.system.file.management=File Management
|
||||
menu.system.config.management=Config Management
|
||||
menu.system.log.management=Log Management
|
||||
@@ -196,7 +200,7 @@ menu.system.tenant.role.management=Tenant Role Management
|
||||
menu.system.tenant.menu.management=Tenant Menu Management
|
||||
menu.system.tenant.dict.management=Tenant Dict Management
|
||||
menu.system.tenant.config.management=Tenant Config Management
|
||||
menu.system.tenant.job.management=Tenant Job Management
|
||||
menu.system.tenant.job.management=Tenant Task Management
|
||||
menu.system.tenant.file.management=Tenant File Management
|
||||
menu.system.tenant.log.management=Tenant Log Management
|
||||
menu.system.tenant.monitor.management=Tenant Monitor Management
|
||||
@@ -205,7 +209,12 @@ menu.billing.rule.management=Billing Rule
|
||||
menu.billing.ratelimit.management=Rate Limit
|
||||
menu.billing.package.management=Package Management
|
||||
menu.user.management=User Management
|
||||
menu.user.data=User Data
|
||||
menu.user.online=User Online
|
||||
menu.user.info=User Information
|
||||
menu.user.password=User Password
|
||||
menu.user.profile=User Profile
|
||||
menu.user.avatar=User Avatar
|
||||
menu.user.cdr.management=Internet Record
|
||||
menu.user.bill.management=Bill Management
|
||||
menu.user.kyc.management=KYC Management
|
||||
@@ -265,3 +274,51 @@ menu.action.task.export=Export Task
|
||||
menu.action.batch.export=Batch Export
|
||||
menu.action.batch.import=Batch Import
|
||||
menu.action.batch.delete=Batch Delete
|
||||
|
||||
# excel export eperation log
|
||||
excel.operation.log=Operation Log
|
||||
excel.operation.log.id=Log ID
|
||||
excel.operation.log.title=Module Title
|
||||
excel.operation.log.business.type=Business Type
|
||||
excel.operation.log.method=Method
|
||||
excel.operation.log.request.method=Request Method
|
||||
excel.operation.log.operator.type=Operator Type
|
||||
excel.operation.log.operator.name=Operator
|
||||
excel.operation.log.department.name=Department name
|
||||
excel.operation.log.operation.url=Operation URL
|
||||
excel.operation.log.operation.ip=Operation IP
|
||||
excel.operation.log.operation.parameter=Operation Parameter
|
||||
excel.operation.log.json.result=Result
|
||||
excel.operation.log.status=Status
|
||||
excel.operation.log.error.msg=Error Message
|
||||
excel.operation.log.operation.time=Operation Time
|
||||
excel.operation.log.cost.time=Cost Time
|
||||
|
||||
# excel export task
|
||||
excel.scheduled.task.list=Task List
|
||||
excel.scheduled.task.id=Task ID
|
||||
excel.scheduled.task.name=Task Name
|
||||
excel.scheduled.task.job.group=Task Group
|
||||
excel.scheduled.task.invoke.target=Invoke Target
|
||||
excel.scheduled.task.cron.expression=Cron Expression
|
||||
excel.scheduled.task.schedule.strategy=Schedule Strategy
|
||||
excel.scheduled.task.concurrent=Concurrent
|
||||
excel.scheduled.task.status=Task Status
|
||||
excel.scheduled.task.create.time=Create Time
|
||||
excel.scheduled.task.update.time=Update Time
|
||||
excel.scheduled.task.remark=Remark
|
||||
excel.scheduled.task.log.id=Log ID
|
||||
excel.scheduled.task.log.info=Log Info
|
||||
excel.scheduled.task.log.status=Status
|
||||
excel.scheduled.task.log.error.msg=Error Message
|
||||
|
||||
# excel export dict data
|
||||
excel.dict.data=Dict Data
|
||||
excel.dict.data.dict.code=Dict Code
|
||||
excel.dict.data.dict.sort=Dict Sort
|
||||
excel.dict.data.dict.label=Dict Label
|
||||
excel.dict.data.dict.value=Dict Value
|
||||
excel.dict.data.dict.type=Dict Type
|
||||
excel.dict.data.is.default=Is Default
|
||||
excel.dict.data.status=Status
|
||||
excel.dict.data.remark=Remark
|
||||
@@ -181,10 +181,14 @@ common.demo.mode=演示模式,不允许操作
|
||||
menu.system.management=系统管理
|
||||
menu.system.config=系统配置
|
||||
menu.system.dict.management=字典管理
|
||||
menu.system.dict.type=字典类型
|
||||
menu.system.dict.data=字典数据
|
||||
menu.system.menu.management=菜单管理
|
||||
menu.system.role.management=角色管理
|
||||
menu.system.role.data=角色数据
|
||||
menu.system.account.management=账号管理
|
||||
menu.system.job.management=任务管理
|
||||
menu.system.job.log=任务日志
|
||||
menu.system.file.management=文件管理
|
||||
menu.system.config.management=参数管理
|
||||
menu.system.log.management=日志管理
|
||||
@@ -208,7 +212,12 @@ menu.billing.ratelimit.management=限速设置
|
||||
menu.billing.package.management=套餐管理
|
||||
menu.billing.payment.setting=支付设置
|
||||
menu.user.management=用户管理
|
||||
menu.user.data=角色数据
|
||||
menu.user.online=在线用户
|
||||
menu.user.info=用户信息
|
||||
menu.user.password=用户密码
|
||||
menu.user.profile=个人信息
|
||||
menu.user.avatar=用户头像
|
||||
menu.user.account.management=账号管理
|
||||
menu.user.cdr.management=话单管理
|
||||
menu.user.bill.management=账单管理
|
||||
@@ -270,3 +279,51 @@ menu.action.task.export=任务导出
|
||||
menu.action.batch.export=批量导出
|
||||
menu.action.batch.import=批量导入
|
||||
menu.action.batch.delete=批量删除
|
||||
|
||||
# excel export operation log
|
||||
excel.operation.log=操作日志
|
||||
excel.operation.log.id=日志序号
|
||||
excel.operation.log.title=模块标题
|
||||
excel.operation.log.business.type=业务类型
|
||||
excel.operation.log.method=请求方法
|
||||
excel.operation.log.request.method=请求方式
|
||||
excel.operation.log.operator.type=操作类别
|
||||
excel.operation.log.operator.name=操作人员
|
||||
excel.operation.log.department.name=部门名称
|
||||
excel.operation.log.operation.url=请求地址
|
||||
excel.operation.log.operation.ip=操作地址
|
||||
excel.operation.log.operation.parameter=请求参数
|
||||
excel.operation.log.json.result=返回参数
|
||||
excel.operation.log.status=状态
|
||||
excel.operation.log.error.msg=错误消息
|
||||
excel.operation.log.operation.time=操作时间
|
||||
excel.operation.log.cost.time=消耗时间
|
||||
|
||||
# excel export job
|
||||
excel.scheduled.task.list=任务列表
|
||||
excel.scheduled.task.id=任务序号
|
||||
excel.scheduled.task.name=任务名称
|
||||
excel.scheduled.task.job.group=任务组名
|
||||
excel.scheduled.task.invoke.target=调用目标字符串
|
||||
excel.scheduled.task.cron.expression=执行表达式
|
||||
excel.scheduled.task.schedule.strategy=计划策略
|
||||
excel.scheduled.task.concurrent=并发执行
|
||||
excel.scheduled.task.status=任务状态
|
||||
excel.scheduled.task.create.time=创建时间
|
||||
excel.scheduled.task.update.time=更新时间
|
||||
excel.scheduled.task.remark=备注
|
||||
excel.scheduled.task.log.id=日志序号
|
||||
excel.scheduled.task.log.info=日志信息
|
||||
excel.scheduled.task.log.status=执行状态
|
||||
excel.scheduled.task.log.error.msg=异常信息
|
||||
|
||||
# excel export dict data
|
||||
excel.dict.data=字典数据
|
||||
excel.dict.data.dict.code=数据编号
|
||||
excel.dict.data.dict.sort=字典排序
|
||||
excel.dict.data.dict.label=字典标签
|
||||
excel.dict.data.dict.value=字典键值
|
||||
excel.dict.data.dict.type=字典类型
|
||||
excel.dict.data.is.default=是否默认
|
||||
excel.dict.data.status=状态
|
||||
excel.dict.data.remark=备注
|
||||
|
||||
@@ -56,4 +56,14 @@ public enum BusinessType
|
||||
* 清空数据
|
||||
*/
|
||||
CLEAN,
|
||||
|
||||
/**
|
||||
* Approval
|
||||
*/
|
||||
APPROVAL,
|
||||
|
||||
/**
|
||||
* Reject
|
||||
*/
|
||||
REJECT,
|
||||
}
|
||||
|
||||
@@ -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