Commit bc8dabdc authored by tianbo's avatar tianbo

excel导出修改

parent e4010526
package com.yeejoin.amos.boot.module.common.api.dto;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.util.StringUtils;
import java.util.Date;
@Data
public class ExcelDto {
......@@ -14,4 +17,19 @@ public class ExcelDto {
private String classUrl;
@ApiModelProperty(value = "导出类型 来源于ExcelEnums常量")
private String type;
public ExcelDto(String fileName, String sheetName, String classUrl, String type) {
this.fileName = fileName;
this.sheetName = sheetName;
this.classUrl = classUrl;
this.type = type;
}
public String getFileName() {
return StringUtils.isEmpty(fileName) ? DateUtils.convertDateToString(new Date(), "yyyyMMddHHmmss") : fileName;
}
public String getSheetName() {
return StringUtils.isEmpty(sheetName) ? "Sheet1" : sheetName;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment