refactor: 优化字典导出数据和格式

This commit is contained in:
2023-09-16 22:29:28 +08:00
parent 9ed63dbd76
commit 8529af8eca
8 changed files with 69 additions and 23 deletions

View File

@@ -46,13 +46,13 @@ public class BaseDetailVO extends BaseVO {
* 修改人
*/
@Schema(description = "修改人", example = "李四")
@ExcelProperty(value = "修改人")
@ExcelProperty(value = "修改人", order = Integer.MAX_VALUE - 2)
private String updateUserString;
/**
* 修改时间
*/
@Schema(description = "修改时间", example = "2023-08-08 08:08:08", type = "string")
@ExcelProperty(value = "修改时间")
@ExcelProperty(value = "修改时间", order = Integer.MAX_VALUE - 1)
private LocalDateTime updateTime;
}

View File

@@ -236,7 +236,7 @@ public abstract class BaseServiceImpl<M extends BaseMapper<T>, T extends BaseDO,
* @param detailObj
* 待填充详情信息
*/
protected void fillDetail(Object detailObj) {
public void fillDetail(Object detailObj) {
if (detailObj instanceof BaseDetailVO) {
BaseDetailVO detailVO = (BaseDetailVO)detailObj;
this.fill(detailVO);

View File

@@ -42,7 +42,7 @@ public class BaseVO implements Serializable {
* ID
*/
@Schema(description = "ID", example = "1")
@ExcelProperty(value = "ID")
@ExcelProperty(value = "ID", order = 1)
private Long id;
/**
@@ -55,14 +55,14 @@ public class BaseVO implements Serializable {
* 创建人
*/
@Schema(description = "创建人", example = "超级管理员")
@ExcelProperty(value = "创建人")
@ExcelProperty(value = "创建人", order = Integer.MAX_VALUE - 4)
private String createUserString;
/**
* 创建时间
*/
@Schema(description = "创建时间", example = "2023-08-08 08:08:08", type = "string")
@ExcelProperty(value = "创建时间")
@ExcelProperty(value = "创建时间", order = Integer.MAX_VALUE - 3)
private LocalDateTime createTime;
/**