package ${basePackage}.pojo.dtos.${lowerTableName}; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * * @ClassName: ${firstUpperTableName}DTO * @Description: ${tableExplain} * @Author: ${author} * @Date: ${date} * @Version: ${version} **/ @ApiModel public class ${firstUpperTableName}DTO { @ApiModelProperty(name = "${firstLowerTableName}Id", value = "主键") private String ${firstLowerTableName}Id; <#list fieldList! as field> <#if field.fieldType == "number"> @ApiModelProperty(name = "${field.fieldName}", value = "${field.fieldExplain}") private Integer ${field.fieldName}; <#elseif field.fieldType == "double"> @ApiModelProperty(name = "${field.fieldName}", value = "${field.fieldExplain}") private Double ${field.fieldName}; <#elseif field.fieldType == "radio" || field.fieldType == "checkbox" || field.fieldType == "select"> @ApiModelProperty(name = "${field.fieldName}", value = "${field.fieldExplain}") private String ${field.fieldName}; @ApiModelProperty(name = "${field.fieldName}DictionaryName", value = "${field.fieldExplain}字典名称") private String ${field.fieldName}DictionaryName; <#elseif field.fieldType == "innerJoin" || field.fieldType == "leftJoin" || field.fieldType == "rightJoin"> @ApiModelProperty(name = "${field.fieldName}", value = "${field.fieldExplain}") private String ${field.fieldName}; <#list field.listJoinTableField! as joinTableField> <#if joinTableField.listShow == 1> @ApiModelProperty(name = "${joinTableField.fieldName}JoinBy${field.firstUpperFieldName}", value = "${field.fieldExplain}的${joinTableField.fieldExplain}") private String ${joinTableField.fieldName}JoinBy${field.firstUpperFieldName}; <#else> @ApiModelProperty(name = "${field.fieldName}", value = "${field.fieldExplain}") private String ${field.fieldName}; public String get${firstUpperTableName}Id() { return ${firstLowerTableName}Id == null ? "" : ${firstLowerTableName}Id; } public void set${firstUpperTableName}Id(String ${firstLowerTableName}Id) { this.${firstLowerTableName}Id = ${firstLowerTableName}Id; } <#list fieldList! as field> <#if field.fieldType == "number"> public Integer get${field.firstUpperFieldName}() { return ${field.fieldName} == null ? 0 : ${field.fieldName}; } public void set${field.firstUpperFieldName}(Integer ${field.fieldName}) { this.${field.fieldName} = ${field.fieldName}; } <#elseif field.fieldType == "double"> public Double get${field.firstUpperFieldName}() { return ${field.fieldName} == null ? 0D : ${field.fieldName}; } public void set${field.firstUpperFieldName}(Double ${field.fieldName}) { this.${field.fieldName} = ${field.fieldName}; } <#elseif field.fieldType == "radio" || field.fieldType == "checkbox" || field.fieldType == "select"> public String get${field.firstUpperFieldName}() { return ${field.fieldName} == null ? "" : ${field.fieldName}; } public void set${field.firstUpperFieldName}(String ${field.fieldName}) { this.${field.fieldName} = ${field.fieldName}; } public String get${field.firstUpperFieldName}DictionaryName() { return ${field.fieldName}DictionaryName == null ? "" : ${field.fieldName}DictionaryName; } public void set${field.firstUpperFieldName}DictionaryName(String ${field.fieldName}DictionaryName) { this.${field.fieldName}DictionaryName = ${field.fieldName}DictionaryName; } <#elseif field.fieldType == "innerJoin" || field.fieldType == "leftJoin" || field.fieldType == "rightJoin"> public String get${field.firstUpperFieldName}() { return ${field.fieldName} == null ? "" : ${field.fieldName}; } public void set${field.firstUpperFieldName}(String ${field.fieldName}) { this.${field.fieldName} = ${field.fieldName}; } <#list field.listJoinTableField! as joinTableField> <#if joinTableField.listShow == 1> public String get${joinTableField.firstUpperFieldName}JoinBy${field.firstUpperFieldName}() { return ${joinTableField.fieldName}JoinBy${field.firstUpperFieldName} == null ? "" : ${joinTableField.fieldName}JoinBy${field.firstUpperFieldName}; } public void set${joinTableField.firstUpperFieldName}JoinBy${field.firstUpperFieldName}(String ${joinTableField.fieldName}JoinBy${field.firstUpperFieldName}) { this.${joinTableField.fieldName}JoinBy${field.firstUpperFieldName} = ${joinTableField.fieldName}JoinBy${field.firstUpperFieldName}; } <#else> public String get${field.firstUpperFieldName}() { return ${field.fieldName} == null ? "" : ${field.fieldName}; } public void set${field.firstUpperFieldName}(String ${field.fieldName}) { this.${field.fieldName} = ${field.fieldName}; } }