parent
9202ddf94c
commit
643d516be0
@ -0,0 +1,62 @@
|
|||||||
|
package ${bussiPackage}.${excelPackage};
|
||||||
|
|
||||||
|
import com.enjoy.common.core.annotation.Excel;
|
||||||
|
import com.enjoy.common.core.utils.iqc.ExcelImport;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.ToString;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: ${tableVo.ftlDescription}
|
||||||
|
* @Author: ${author}
|
||||||
|
* @Date: ${.now?string["yyyy-MM-dd"]}
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ToString
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class ${entityName}Excel{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
<#list originalColumns as po>
|
||||||
|
<#if po.fieldName =='id'|| po.fieldName=='delFlag' || po.fieldName == 'creatorId' || po.fieldName == 'createBy' || po.fieldName == 'createTime' || po.fieldName == 'updaterId' || po.fieldName == 'updateBy' || po.fieldName == 'updateTime' || po.fieldName == 'tenantId'><#else>
|
||||||
|
/**${po.filedComment}*/
|
||||||
|
<#if po.fieldName == primaryKeyField>
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
<#else>
|
||||||
|
<#if po.fieldType =='Date'>
|
||||||
|
<#if po.fieldDbType =='date'>
|
||||||
|
@Excel(name = "${po.filedComment}", width = 15)
|
||||||
|
@ExcelImport("${po.filedComment}")
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
<#elseif po.fieldDbType =='datetime'>
|
||||||
|
@Excel(name = "${po.filedComment}", width = 20)
|
||||||
|
@ExcelImport("${po.filedComment}")
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
<#elseif po.fieldDbType =='timestamp'>
|
||||||
|
@Excel(name = "${po.filedComment}", width = 20)
|
||||||
|
@ExcelImport("${po.filedComment}")
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
@Excel(name = "${po.filedComment}", width = 15)
|
||||||
|
@ExcelImport("${po.filedComment}")
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
@ApiModelProperty(value = "${po.filedComment}",example = "${po.filedComment}")
|
||||||
|
<#if po.fieldName == 'delFlag'>
|
||||||
|
@TableLogic
|
||||||
|
</#if>
|
||||||
|
private <#if po.fieldType=='java.sql.Blob'>byte[]<#else>${po.fieldType}</#if> ${po.fieldName};
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in new issue