|
|
|
@ -1,9 +1,6 @@
|
|
|
|
|
package ${bussiPackage}.${entityPackage};
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.annotation.IdType;
|
|
|
|
|
import com.baomidou.mybatisplus.annotation.TableId;
|
|
|
|
|
import com.baomidou.mybatisplus.annotation.TableName;
|
|
|
|
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
|
|
|
|
import com.baomidou.mybatisplus.annotation.*;
|
|
|
|
|
import com.enjoy.common.core.annotation.Excel;
|
|
|
|
|
import com.enjoy.common.core.utils.iqc.ExcelImport;
|
|
|
|
|
import com.enjoy.oqc.domain.BaseEntity;
|
|
|
|
@ -32,38 +29,33 @@ public class ${entityName} extends BaseEntity{
|
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
|
<#list originalColumns as po>
|
|
|
|
|
<#if 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}")
|
|
|
|
|
<#elseif po.fieldDbType =='datetime' || po.fieldDbType = 'timestamp'>
|
|
|
|
|
@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.fieldComment !=''>
|
|
|
|
|
/**${po.fieldComment}*/
|
|
|
|
|
@Excel(name = "${po.fieldComment}", width = 15)
|
|
|
|
|
@ExcelImport("${po.fieldComment}")
|
|
|
|
|
@ApiModelProperty(value = "${po.fieldComment}")
|
|
|
|
|
</#if>
|
|
|
|
|
@TableField(value="${po.fieldColumn}")
|
|
|
|
|
<#if po.fieldName == 'delFlag'>
|
|
|
|
|
@TableLogic
|
|
|
|
|
</#if>
|
|
|
|
|
private <#if po.fieldType=='java.sql.Blob'>byte[]<#else>${po.fieldType}</#if> ${po.fieldName};
|
|
|
|
|
</#if>
|
|
|
|
|
</#if>
|
|
|
|
|
</#list>
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|