diff --git a/src/main/resources/yangliu/XXXEntityDTO.javai b/src/main/resources/yangliu/XXXEntityDTO.javai new file mode 100644 index 0000000..5401825 --- /dev/null +++ b/src/main/resources/yangliu/XXXEntityDTO.javai @@ -0,0 +1,31 @@ +package ${bussiPackage}.dto; + +import com.enjoy.common.core.annotation.Excel; +import com.enjoy.common.core.utils.iqc.ExcelImport; +import com.enjoy.common.core.web.domain.BaseEntity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.*; +import lombok.experimental.Accessors; +import org.springframework.format.annotation.DateTimeFormat; +import java.util.Date; + +import ${bussiPackage}.${entityPackage}.${entityName}; + +/** + * @Description: ${tableVo.ftlDescription} + * @Author: ${author} + * @Date: ${.now?string["yyyy-MM-dd"]} + * @Version: V1.0 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="${tableName} DTO对象", description="${tableVo.ftlDescription}") +public class ${entityName}DTO extends ${entityName}{ + private static final long serialVersionUID = 1L; +} diff --git a/src/main/resources/yangliu/XXXEntityDto.javai b/src/main/resources/yangliu/XXXEntityDto.javai deleted file mode 100644 index 3145d83..0000000 --- a/src/main/resources/yangliu/XXXEntityDto.javai +++ /dev/null @@ -1,61 +0,0 @@ -package ${bussiPackage}.dto; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.enjoy.common.core.annotation.Excel; -import com.enjoy.common.core.utils.iqc.ExcelImport; -import com.enjoy.common.core.web.domain.BaseEntity; -import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.*; -import lombok.experimental.Accessors; -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 -@AllArgsConstructor -@NoArgsConstructor -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="${tableName}对象", description="${tableVo.ftlDescription}") -public class ${entityName}Dto{ - private static final long serialVersionUID = 1L; - <#list originalColumns as po> - /**${po.filedComment}*/ - <#if po.fieldName == primaryKeyField> - <#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") - - <#else> - @Excel(name = "${po.filedComment}", width = 15) - @ExcelImport("${po.filedComment}") - - - @ApiModelProperty(value = "${po.filedComment}",example = "${po.filedComment}") - private <#if po.fieldType=='java.sql.Blob'>byte[]<#else>${po.fieldType} ${po.fieldName}; - -} diff --git a/src/main/resources/yangliu/XXXEntityVO.javai b/src/main/resources/yangliu/XXXEntityVO.javai new file mode 100644 index 0000000..50b094d --- /dev/null +++ b/src/main/resources/yangliu/XXXEntityVO.javai @@ -0,0 +1,31 @@ +package ${bussiPackage}.vo; + +import com.enjoy.common.core.annotation.Excel; +import com.enjoy.common.core.utils.iqc.ExcelImport; +import com.enjoy.common.core.web.domain.BaseEntity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.*; +import lombok.experimental.Accessors; +import org.springframework.format.annotation.DateTimeFormat; +import java.util.Date; + +import ${bussiPackage}.${entityPackage}.${entityName}; + +/** + * @Description: ${tableVo.ftlDescription} + * @Author: ${author} + * @Date: ${.now?string["yyyy-MM-dd"]} + * @Version: V1.0 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="${tableName} VO对象", description="${tableVo.ftlDescription}") +public class ${entityName}VO extends ${entityName}{ + private static final long serialVersionUID = 1L; +} diff --git a/src/main/resources/yangliu/XXXEntityVo.javai b/src/main/resources/yangliu/XXXEntityVo.javai deleted file mode 100644 index 3ba8680..0000000 --- a/src/main/resources/yangliu/XXXEntityVo.javai +++ /dev/null @@ -1,61 +0,0 @@ -package ${bussiPackage}.vo; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.enjoy.common.core.annotation.Excel; -import com.enjoy.common.core.utils.iqc.ExcelImport; -import com.enjoy.common.core.web.domain.BaseEntity; -import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.*; -import lombok.experimental.Accessors; -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 -@AllArgsConstructor -@NoArgsConstructor -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="${tableName}对象", description="${tableVo.ftlDescription}") -public class ${entityName}Vo{ - private static final long serialVersionUID = 1L; - <#list originalColumns as po> - /**${po.filedComment}*/ - <#if po.fieldName == primaryKeyField> - <#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") - - <#else> - @Excel(name = "${po.filedComment}", width = 15) - @ExcelImport("${po.filedComment}") - - - @ApiModelProperty(value = "${po.filedComment}",example = "${po.filedComment}") - private <#if po.fieldType=='java.sql.Blob'>byte[]<#else>${po.fieldType} ${po.fieldName}; - -} diff --git a/src/main/resources/yangliu/XXXMapper.xmli b/src/main/resources/yangliu/XXXMapper.xmli index 6daabec..41bcf71 100644 --- a/src/main/resources/yangliu/XXXMapper.xmli +++ b/src/main/resources/yangliu/XXXMapper.xmli @@ -1,7 +1,7 @@ - + <#list originalColumns as po> <#if po.fieldName == primaryKeyField>