From 90750d420f560bce03be00c3d8e29b0a28fe9b5c Mon Sep 17 00:00:00 2001 From: gaohanghang <1341947277@qq.com> Date: Tue, 14 Jan 2020 22:54:18 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E5=8E=BB=E9=99=A4=20mybatis=20=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E4=B8=AD=E7=9A=84=E6=96=B9=E6=8B=AC=E5=8F=B7[]?= =?UTF-8?q?=EF=BC=8C=E4=BD=BF=E4=BB=A3=E7=A0=81=E6=9B=B4=E7=BE=8E=E8=A7=82?= =?UTF-8?q?=202.=20=E4=BF=AE=E6=94=B9=E6=A8=A1=E6=9D=BF=E9=87=8C=E7=9A=84?= =?UTF-8?q?=E7=B1=BB=E6=B3=A8=E9=87=8A=E6=A0=B7=E5=BC=8F=EF=BC=8C=E4=BD=BF?= =?UTF-8?q?=E6=B3=A8=E9=87=8A=E6=9B=B4=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../beetlsql/beetlcontroller.ftl | 7 ++++--- .../code-generator/beetlsql/beetlentity.ftl | 7 ++++--- .../beetlsql/beetlentitydto.ftl | 7 ++++--- .../code-generator/jdbc-template/jtdao.ftl | 7 ++++--- .../jdbc-template/jtdaoimpl.ftl | 7 ++++--- .../templates/code-generator/jpa/entity.ftl | 7 ++++--- .../code-generator/jpa/jpacontroller.ftl | 7 ++++--- .../code-generator/jpa/repository.ftl | 7 ++++--- .../mybatis-plus/pluscontroller.ftl | 7 ++++--- .../mybatis-plus/plusmapper.ftl | 7 ++++--- .../code-generator/mybatis/controller.ftl | 18 ++++++++--------- .../code-generator/mybatis/mapper.ftl | 20 +++++++++---------- .../code-generator/mybatis/model.ftl | 7 ++++--- .../code-generator/mybatis/service.ftl | 8 ++++---- .../code-generator/mybatis/service_impl.ftl | 8 ++++---- 15 files changed, 71 insertions(+), 60 deletions(-) diff --git a/generator-web/src/main/resources/templates/code-generator/beetlsql/beetlcontroller.ftl b/generator-web/src/main/resources/templates/code-generator/beetlsql/beetlcontroller.ftl index f8b6736..a9604ed 100644 --- a/generator-web/src/main/resources/templates/code-generator/beetlsql/beetlcontroller.ftl +++ b/generator-web/src/main/resources/templates/code-generator/beetlsql/beetlcontroller.ftl @@ -7,9 +7,10 @@ import java.util.List; import java.util.Map; /** -* ${classInfo.classComment} -* @author ${authorName} ${.now?string('yyyy-MM-dd')} -*/ + * @description ${classInfo.classComment} + * @author ${authorName} + * @date ${.now?string('yyyy-MM-dd HH:mm:ss')} + */ @RestController @RequestMapping("/${classInfo.className?uncap_first}") public class ${classInfo.className}Controller { diff --git a/generator-web/src/main/resources/templates/code-generator/beetlsql/beetlentity.ftl b/generator-web/src/main/resources/templates/code-generator/beetlsql/beetlentity.ftl index a3c42ae..381f3ae 100644 --- a/generator-web/src/main/resources/templates/code-generator/beetlsql/beetlentity.ftl +++ b/generator-web/src/main/resources/templates/code-generator/beetlsql/beetlentity.ftl @@ -4,9 +4,10 @@ import java.util.Date; import java.util.List; /** -* ${classInfo.classComment} -* @author ${authorName} ${.now?string('yyyy-MM-dd')} -*/ + * @description ${classInfo.classComment} + * @author ${authorName} + * @date ${.now?string('yyyy-MM-dd HH:mm:ss')} + */ @Data public class ${classInfo.className} implements Serializable { diff --git a/generator-web/src/main/resources/templates/code-generator/beetlsql/beetlentitydto.ftl b/generator-web/src/main/resources/templates/code-generator/beetlsql/beetlentitydto.ftl index 9e25e2f..9665c5c 100644 --- a/generator-web/src/main/resources/templates/code-generator/beetlsql/beetlentitydto.ftl +++ b/generator-web/src/main/resources/templates/code-generator/beetlsql/beetlentitydto.ftl @@ -6,8 +6,9 @@ import java.util.Date; import java.util.List; /** - * ${classInfo.classComment} - * @author ${authorName} ${.now?string('yyyy-MM-dd')} + * @description ${classInfo.classComment} + * @author ${authorName} + * @date ${.now?string('yyyy-MM-dd HH:mm:ss')} */ @Data @ApiModel("${classInfo.classComment}") @@ -23,4 +24,4 @@ public class ${classInfo.className}DTO { } -} \ No newline at end of file +} diff --git a/generator-web/src/main/resources/templates/code-generator/jdbc-template/jtdao.ftl b/generator-web/src/main/resources/templates/code-generator/jdbc-template/jtdao.ftl index 4e2a8f9..14bc245 100644 --- a/generator-web/src/main/resources/templates/code-generator/jdbc-template/jtdao.ftl +++ b/generator-web/src/main/resources/templates/code-generator/jdbc-template/jtdao.ftl @@ -2,9 +2,10 @@ import java.util.List; /** -* ${classInfo.classComment} -* @author ${authorName} ${.now?string('yyyy-MM-dd')} -*/ + * @description ${classInfo.classComment} + * @author ${authorName} + * @date ${.now?string('yyyy-MM-dd HH:mm:ss')} + */ public interface I${classInfo.className}DAO { int add(${classInfo.className} ${classInfo.className?uncap_first}); diff --git a/generator-web/src/main/resources/templates/code-generator/jdbc-template/jtdaoimpl.ftl b/generator-web/src/main/resources/templates/code-generator/jdbc-template/jtdaoimpl.ftl index 5e13882..a3b62c0 100644 --- a/generator-web/src/main/resources/templates/code-generator/jdbc-template/jtdaoimpl.ftl +++ b/generator-web/src/main/resources/templates/code-generator/jdbc-template/jtdaoimpl.ftl @@ -6,9 +6,10 @@ import org.springframework.stereotype.Repository; import java.util.List; /** -* ${classInfo.classComment} -* @author ${authorName} ${.now?string('yyyy-MM-dd')} -*/ + * @description ${classInfo.classComment} + * @author ${authorName} + * @date ${.now?string('yyyy-MM-dd HH:mm:ss')} + */ @Repository public class ${classInfo.className}DaoImpl implements I${classInfo.className}Dao{ diff --git a/generator-web/src/main/resources/templates/code-generator/jpa/entity.ftl b/generator-web/src/main/resources/templates/code-generator/jpa/entity.ftl index d2cb299..6bb8cbf 100644 --- a/generator-web/src/main/resources/templates/code-generator/jpa/entity.ftl +++ b/generator-web/src/main/resources/templates/code-generator/jpa/entity.ftl @@ -13,9 +13,10 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** -* ${classInfo.classComment} -* @author ${authorName} ${.now?string('yyyy-MM-dd')} -*/ + * @description ${classInfo.classComment} + * @author ${authorName} + * @date ${.now?string('yyyy-MM-dd HH:mm:ss')} + */ @Entity @Data @Table(name="${classInfo.tableName}") diff --git a/generator-web/src/main/resources/templates/code-generator/jpa/jpacontroller.ftl b/generator-web/src/main/resources/templates/code-generator/jpa/jpacontroller.ftl index 59975ce..bbe7ff2 100644 --- a/generator-web/src/main/resources/templates/code-generator/jpa/jpacontroller.ftl +++ b/generator-web/src/main/resources/templates/code-generator/jpa/jpacontroller.ftl @@ -15,9 +15,10 @@ import java.util.List; import java.util.Map; /** -* ${classInfo.classComment} -* @author ${authorName} ${.now?string('yyyy-MM-dd')} -*/ + * @description ${classInfo.classComment} + * @author ${authorName} + * @date ${.now?string('yyyy-MM-dd HH:mm:ss')} + */ @RestController @RequestMapping("/${classInfo.className?uncap_first}") public class ${classInfo.className}Controller { diff --git a/generator-web/src/main/resources/templates/code-generator/jpa/repository.ftl b/generator-web/src/main/resources/templates/code-generator/jpa/repository.ftl index e11838a..dbfb469 100644 --- a/generator-web/src/main/resources/templates/code-generator/jpa/repository.ftl +++ b/generator-web/src/main/resources/templates/code-generator/jpa/repository.ftl @@ -14,9 +14,10 @@ import org.springframework.data.jpa.repository.Query; import org.springframework.stereotype.Repository; /** -* ${classInfo.classComment} -* @author ${authorName} ${.now?string('yyyy-MM-dd')} -*/ + * @description ${classInfo.classComment} + * @author ${authorName} + * @date ${.now?string('yyyy-MM-dd HH:mm:ss')} + */ @Repository public interface ${classInfo.className}Repository extends JpaRepository<${classInfo.className},Integer> { diff --git a/generator-web/src/main/resources/templates/code-generator/mybatis-plus/pluscontroller.ftl b/generator-web/src/main/resources/templates/code-generator/mybatis-plus/pluscontroller.ftl index f6c517f..3686847 100644 --- a/generator-web/src/main/resources/templates/code-generator/mybatis-plus/pluscontroller.ftl +++ b/generator-web/src/main/resources/templates/code-generator/mybatis-plus/pluscontroller.ftl @@ -11,9 +11,10 @@ import java.util.List; import java.util.Map; /** -* ${classInfo.classComment} -* @author ${authorName} ${.now?string('yyyy-MM-dd')} -*/ + * @description ${classInfo.classComment} + * @author ${authorName} + * @date ${.now?string('yyyy-MM-dd HH:mm:ss')} + */ @RestController @RequestMapping("/${classInfo.className?uncap_first}") public class ${classInfo.className}Controller { diff --git a/generator-web/src/main/resources/templates/code-generator/mybatis-plus/plusmapper.ftl b/generator-web/src/main/resources/templates/code-generator/mybatis-plus/plusmapper.ftl index 37e9456..231dbd5 100644 --- a/generator-web/src/main/resources/templates/code-generator/mybatis-plus/plusmapper.ftl +++ b/generator-web/src/main/resources/templates/code-generator/mybatis-plus/plusmapper.ftl @@ -3,9 +3,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.springframework.stereotype.Repository; /** -* ${classInfo.classComment} -* @author ${authorName} ${.now?string('yyyy-MM-dd')} -*/ + * @description ${classInfo.classComment} + * @author ${authorName} + * @date ${.now?string('yyyy-MM-dd HH:mm:ss')} + */ @Repository public interface ${classInfo.className}Mapper extends BaseMapper<${classInfo.className}> { diff --git a/generator-web/src/main/resources/templates/code-generator/mybatis/controller.ftl b/generator-web/src/main/resources/templates/code-generator/mybatis/controller.ftl index 7af61a3..37cd417 100644 --- a/generator-web/src/main/resources/templates/code-generator/mybatis/controller.ftl +++ b/generator-web/src/main/resources/templates/code-generator/mybatis/controller.ftl @@ -9,10 +9,10 @@ import java.util.List; import java.util.Map; /** -* ${classInfo.classComment} -* @author ${authorName} -* @date ${.now?string('yyyy/MM/dd')} -*/ + * @description ${classInfo.classComment} + * @author ${authorName} + * @date ${.now?string('yyyy-MM-dd HH:mm:ss')} + */ @RestController @RequestMapping(value = "/${classInfo.className}") public class ${classInfo.className}Controller { @@ -21,7 +21,7 @@ public class ${classInfo.className}Controller { private ${classInfo.className}Service ${classInfo.className?uncap_first}Service; /** - * [新增] + * 新增 * @author ${authorName} * @date ${.now?string('yyyy/MM/dd')} **/ @@ -31,7 +31,7 @@ public class ${classInfo.className}Controller { } /** - * [刪除] + * 刪除 * @author ${authorName} * @date ${.now?string('yyyy/MM/dd')} **/ @@ -41,7 +41,7 @@ public class ${classInfo.className}Controller { } /** - * [更新] + * 更新 * @author ${authorName} * @date ${.now?string('yyyy/MM/dd')} **/ @@ -51,7 +51,7 @@ public class ${classInfo.className}Controller { } /** - * [查询] 根据主键 id 查询 + * 查询 根据主键 id 查询 * @author ${authorName} * @date ${.now?string('yyyy/MM/dd')} **/ @@ -61,7 +61,7 @@ public class ${classInfo.className}Controller { } /** - * [查询] 分页查询 + * 查询 分页查询 * @author ${authorName} * @date ${.now?string('yyyy/MM/dd')} **/ diff --git a/generator-web/src/main/resources/templates/code-generator/mybatis/mapper.ftl b/generator-web/src/main/resources/templates/code-generator/mybatis/mapper.ftl index 2512852..f6d024d 100644 --- a/generator-web/src/main/resources/templates/code-generator/mybatis/mapper.ftl +++ b/generator-web/src/main/resources/templates/code-generator/mybatis/mapper.ftl @@ -4,51 +4,51 @@ import org.springframework.stereotype.Repository; import java.util.List; /** -* ${classInfo.classComment} -* @author ${authorName} -* @date ${.now?string('yyyy/MM/dd')} -*/ + * @description ${classInfo.classComment} + * @author ${authorName} + * @date ${.now?string('yyyy-MM-dd HH:mm:ss')} + */ @Mapper @Repository public interface ${classInfo.className}Mapper { /** - * [新增] + * 新增 * @author ${authorName} * @date ${.now?string('yyyy/MM/dd')} **/ int insert(${classInfo.className} ${classInfo.className?uncap_first}); /** - * [刪除] + * 刪除 * @author ${authorName} * @date ${.now?string('yyyy/MM/dd')} **/ int delete(int id); /** - * [更新] + * 更新 * @author ${authorName} * @date ${.now?string('yyyy/MM/dd')} **/ int update(${classInfo.className} ${classInfo.className?uncap_first}); /** - * [查询] 根据主键 id 查询 + * 查询 根据主键 id 查询 * @author ${authorName} * @date ${.now?string('yyyy/MM/dd')} **/ ${classInfo.className} load(int id); /** - * [查询] 分页查询 + * 查询 分页查询 * @author ${authorName} * @date ${.now?string('yyyy/MM/dd')} **/ List<${classInfo.className}> pageList(int offset,int pagesize); /** - * [查询] 分页查询 count + * 查询 分页查询 count * @author ${authorName} * @date ${.now?string('yyyy/MM/dd')} **/ diff --git a/generator-web/src/main/resources/templates/code-generator/mybatis/model.ftl b/generator-web/src/main/resources/templates/code-generator/mybatis/model.ftl index e7909be..b360fdd 100644 --- a/generator-web/src/main/resources/templates/code-generator/mybatis/model.ftl +++ b/generator-web/src/main/resources/templates/code-generator/mybatis/model.ftl @@ -3,9 +3,10 @@ import java.util.Date; import java.util.List; /** -* ${classInfo.classComment} -* @author ${authorName} ${.now?string('yyyy-MM-dd')} -*/ + * @description ${classInfo.classComment} + * @author ${authorName} + * @date ${.now?string('yyyy-MM-dd HH:mm:ss')} + */ public class ${classInfo.className} implements Serializable { private static final long serialVersionUID = 1L; diff --git a/generator-web/src/main/resources/templates/code-generator/mybatis/service.ftl b/generator-web/src/main/resources/templates/code-generator/mybatis/service.ftl index 0e78ee7..7dfcf72 100644 --- a/generator-web/src/main/resources/templates/code-generator/mybatis/service.ftl +++ b/generator-web/src/main/resources/templates/code-generator/mybatis/service.ftl @@ -1,10 +1,10 @@ import java.util.Map; /** -* ${classInfo.classComment} -* @author ${authorName} -* @date ${.now?string('yyyy/MM/dd')} -*/ + * @description ${classInfo.classComment} + * @author ${authorName} + * @date ${.now?string('yyyy-MM-dd HH:mm:ss')} + */ public interface ${classInfo.className}Service { /** diff --git a/generator-web/src/main/resources/templates/code-generator/mybatis/service_impl.ftl b/generator-web/src/main/resources/templates/code-generator/mybatis/service_impl.ftl index a5d6e89..86b30e8 100644 --- a/generator-web/src/main/resources/templates/code-generator/mybatis/service_impl.ftl +++ b/generator-web/src/main/resources/templates/code-generator/mybatis/service_impl.ftl @@ -7,10 +7,10 @@ import java.util.List; import java.util.Map; /** -* ${classInfo.classComment} -* @author ${authorName} -* @date ${.now?string('yyyy/MM/dd')} -*/ + * @description ${classInfo.classComment} + * @author ${authorName} + * @date ${.now?string('yyyy-MM-dd HH:mm:ss')} + */ @Service public class ${classInfo.className}ServiceImpl implements ${classInfo.className}Service {