【update】修改生成器模板
This commit is contained in:
+10
-1
@@ -28,5 +28,14 @@
|
|||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
@ApiModelProperty(value = "${po.filedComment}")
|
@ApiModelProperty(value = "${po.filedComment}")
|
||||||
private ${po.fieldType} ${po.fieldName};
|
<#if po.fieldDbType=="Date">
|
||||||
|
<#if po.classType=="date">
|
||||||
|
private java.time.LocalDate ${po.fieldName};
|
||||||
|
<#else>
|
||||||
|
private java.time.LocalDateTime ${po.fieldName};
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
private ${po.fieldType} ${po.fieldName};
|
||||||
|
</#if>
|
||||||
|
|
||||||
</#if>
|
</#if>
|
||||||
-1
@@ -2,7 +2,6 @@ package ${bussiPackage}.${entityPackage}.entity;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.util.Date;
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
|||||||
+9
@@ -1,5 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="${bussiPackage}.${entityPackage}.mapper.${entityName}Mapper">
|
<mapper namespace="${bussiPackage}.${entityPackage}.mapper.${entityName}Mapper">
|
||||||
|
<resultMap id="${entityName}ResultMap" type="${bussiPackage}.${entityPackage}.entity.${entityName}">
|
||||||
|
<#list originalColumns as field>
|
||||||
|
<#if field.fieldDbName=="id">
|
||||||
|
<id column="${field.fieldDbName}" property="${field.fieldName}" />
|
||||||
|
<#else>
|
||||||
|
<result column="${field.fieldDbName}" property="${field.fieldName}" />
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
|
||||||
|
</resultMap>
|
||||||
</mapper>
|
</mapper>
|
||||||
Reference in New Issue
Block a user