e448c271440ade8247a3af936369013e39d37aef.svn-base 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <#list subTables as subTab>
  2. #segment#${subTab.entityName}.java
  3. package ${bussiPackage}.${entityPackage}.entity;
  4. import java.io.Serializable;
  5. import com.baomidou.mybatisplus.annotation.IdType;
  6. import com.baomidou.mybatisplus.annotation.TableId;
  7. import com.baomidou.mybatisplus.annotation.TableName;
  8. import lombok.Data;
  9. import com.fasterxml.jackson.annotation.JsonFormat;
  10. import org.springframework.format.annotation.DateTimeFormat;
  11. import org.jeecgframework.poi.excel.annotation.Excel;
  12. import java.util.Date;
  13. import io.swagger.annotations.ApiModel;
  14. import io.swagger.annotations.ApiModelProperty;
  15. /**
  16. * @Description: ${subTab.ftlDescription}
  17. * @Author: jeecg-boot
  18. * @Date: ${.now?string["yyyy-MM-dd"]}
  19. * @Version: V1.0
  20. */
  21. @Data
  22. @TableName("${subTab.tableName}")
  23. @ApiModel(value="${tableName}对象", description="${tableVo.ftlDescription}")
  24. public class ${subTab.entityName} implements Serializable {
  25. private static final long serialVersionUID = 1L;
  26. <#list subTab.originalColumns as po>
  27. /**${po.filedComment}*/
  28. <#if po.fieldName == primaryKeyField>
  29. @TableId(type = IdType.ASSIGN_ID)
  30. <#else>
  31. <#if po.fieldType =='java.util.Date'>
  32. <#if po.fieldDbType =='date'>
  33. @Excel(name = "${po.filedComment}", width = 15, format = "yyyy-MM-dd")
  34. @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
  35. @DateTimeFormat(pattern="yyyy-MM-dd")
  36. <#elseif po.fieldDbType =='datetime'>
  37. @Excel(name = "${po.filedComment}", width = 20, format = "yyyy-MM-dd HH:mm:ss")
  38. @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
  39. @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
  40. </#if>
  41. <#else>
  42. <#if !subTab.foreignKeys?seq_contains(po.fieldName?cap_first)>
  43. @Excel(name = "${po.filedComment}", width = 15)
  44. </#if>
  45. </#if>
  46. </#if>
  47. @ApiModelProperty(value = "${po.filedComment}")
  48. private <#if po.fieldType=='java.sql.Blob'>byte[]<#else>${po.fieldType}</#if> ${po.fieldName};
  49. </#list>
  50. }
  51. </#list>