f896ca0e15baf12e55788efe8dc9d934f9c2ee01.svn-base 1.8 KB

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