2
0

feat: i18n support for export and log

This commit is contained in:
zhangsz
2025-02-11 18:21:13 +08:00
parent 0fdf23fa16
commit 1a5bf3461f
27 changed files with 340 additions and 118 deletions

View File

@@ -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()

View File

@@ -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()