From d50cec8bf2b44ef5a76e9170388666a8cca48b18 Mon Sep 17 00:00:00 2001 From: gaohanghang <1341947277@qq.com> Date: Thu, 31 Oct 2019 17:31:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0mybatis=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=EF=BC=8C=E5=B0=86=E5=85=B6=E4=B8=AD=E7=9A=84=E7=B9=81=E4=BD=93?= =?UTF-8?q?=E4=B8=AD=E6=96=87=E6=94=B9=E4=B8=BA=E7=AE=80=E4=BD=93=E4=B8=AD?= =?UTF-8?q?=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../code-generator/mybatis/controller.ftl | 4 +- .../code-generator/mybatis/mapper.ftl | 114 +++++++++--------- .../code-generator/mybatis/service.ftl | 2 +- 3 files changed, 60 insertions(+), 60 deletions(-) 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 400aa888..7af61a33 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 @@ -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 9e0d060b..2512852e 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 @@ -1,57 +1,57 @@ -import org.apache.ibatis.annotations.Param; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import java.util.List; - -/** -* ${classInfo.classComment} -* @author ${authorName} -* @date ${.now?string('yyyy/MM/dd')} -*/ -@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 查詢 - * @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 - * @author ${authorName} - * @date ${.now?string('yyyy/MM/dd')} - **/ - int pageListCount(int offset,int pagesize); - -} +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; +import java.util.List; + +/** +* ${classInfo.classComment} +* @author ${authorName} +* @date ${.now?string('yyyy/MM/dd')} +*/ +@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 查询 + * @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 + * @author ${authorName} + * @date ${.now?string('yyyy/MM/dd')} + **/ + int pageListCount(int offset,int pagesize); + +} 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 11718e01..0e78ee73 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 @@ -23,7 +23,7 @@ public interface ${classInfo.className}Service { public ReturnT update(${classInfo.className} ${classInfo.className?uncap_first}); /** - * 根據主鍵 id 查詢 + * 根据主键 id 查询 */ public ${classInfo.className} load(int id);