From b387240235caf541e7bb756e854dbc781c4af4bf Mon Sep 17 00:00:00 2001 From: thj <18883325829@163.com> Date: Fri, 1 Oct 2021 11:15:28 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=A5=E6=9C=9F=20:=20?= =?UTF-8?q?2021-10-01=20=E8=83=8C=E6=99=AF=20:=20=E5=BD=93=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=20mybatis=E7=BB=84=E4=BB=B6=E7=94=9F=E6=88=90?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=97=B6,=E5=90=84=E4=B8=AA=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E4=B9=8B=E9=97=B4=E5=AF=B9=E4=BA=8E=E5=AE=9E=E4=BD=93?= =?UTF-8?q?=E7=B1=BB=E4=BD=BF=E7=94=A8=E5=90=8D=E7=A7=B0=E4=B8=8D=E4=B8=80?= =?UTF-8?q?=E8=87=B4,=E9=9C=80=E8=A6=81=E6=89=8B=E5=8A=A8=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E9=83=A8=E5=88=86=E4=BB=A3=E7=A0=81=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=20:=20=20=20=20=201=20mybatis.ftl=20=E7=BB=9F?= =?UTF-8?q?=E4=B8=80=E4=BD=BF=E7=94=A8=20=E4=B8=8D=E5=B8=A6=20Entity=20?= =?UTF-8?q?=E7=9A=84=20=E5=AE=9E=E4=BD=93=E7=B1=BB,=E4=BF=9D=E8=AF=81=20my?= =?UTF-8?q?batis=E6=89=80=E6=9C=89=E7=BB=84=E4=BB=B6=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E4=BF=9D=E6=8C=81=E4=B8=80=E8=87=B4,=E9=81=BF=E5=85=8D?= =?UTF-8?q?=E6=89=8B=E5=8A=A8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../code-generator/mybatis/mybatis.ftl | 176 +++++++++--------- 1 file changed, 88 insertions(+), 88 deletions(-) diff --git a/generator-web/src/main/resources/templates/code-generator/mybatis/mybatis.ftl b/generator-web/src/main/resources/templates/code-generator/mybatis/mybatis.ftl index 3406a1c..5031716 100644 --- a/generator-web/src/main/resources/templates/code-generator/mybatis/mybatis.ftl +++ b/generator-web/src/main/resources/templates/code-generator/mybatis/mybatis.ftl @@ -1,89 +1,89 @@ - - - - - - <#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0> - <#list classInfo.fieldList as fieldItem > - - - - - - - <#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0> - <#list classInfo.fieldList as fieldItem > - ${fieldItem.columnName}<#if fieldItem_has_next>, - - - - - - INSERT INTO ${classInfo.tableName} - - <#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0> - <#list classInfo.fieldList as fieldItem > - <#if fieldItem.columnName != "id" > - - ${fieldItem.columnName}<#if fieldItem_has_next>, - ${r""} - - - - - - <#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0> - <#list classInfo.fieldList as fieldItem > - <#if fieldItem.columnName != "id" > - <#--<#if fieldItem.columnName="addtime" || fieldItem.columnName="updatetime" > - ${r""} - NOW()<#if fieldItem_has_next>, - ${r""} - <#else>--> - - ${r"#{"}${fieldItem.fieldName}${r"}"}<#if fieldItem_has_next>, - ${r""} - <#----> - - - - - - - - DELETE FROM ${classInfo.tableName} - WHERE id = ${r"#{id}"} - - - - UPDATE ${classInfo.tableName} - - <#list classInfo.fieldList as fieldItem > - <#if fieldItem.columnName != "id" && fieldItem.columnName != "AddTime" && fieldItem.columnName != "UpdateTime" > - ${fieldItem.columnName} = ${r"#{"}${fieldItem.fieldName}${r"}"}<#if fieldItem_has_next>,${r""} - - - - WHERE id = ${r"#{"}id${r"}"} - - - - - - - - - + + + + + + <#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0> + <#list classInfo.fieldList as fieldItem > + + + + + + + <#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0> + <#list classInfo.fieldList as fieldItem > + ${fieldItem.columnName}<#if fieldItem_has_next>, + + + + + + INSERT INTO ${classInfo.tableName} + + <#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0> + <#list classInfo.fieldList as fieldItem > + <#if fieldItem.columnName != "id" > + + ${fieldItem.columnName}<#if fieldItem_has_next>, + ${r""} + + + + + + <#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0> + <#list classInfo.fieldList as fieldItem > + <#if fieldItem.columnName != "id" > + <#--<#if fieldItem.columnName="addtime" || fieldItem.columnName="updatetime" > + ${r""} + NOW()<#if fieldItem_has_next>, + ${r""} + <#else>--> + + ${r"#{"}${fieldItem.fieldName}${r"}"}<#if fieldItem_has_next>, + ${r""} + <#----> + + + + + + + + DELETE FROM ${classInfo.tableName} + WHERE id = ${r"#{id}"} + + + + UPDATE ${classInfo.tableName} + + <#list classInfo.fieldList as fieldItem > + <#if fieldItem.columnName != "id" && fieldItem.columnName != "AddTime" && fieldItem.columnName != "UpdateTime" > + ${fieldItem.columnName} = ${r"#{"}${fieldItem.fieldName}${r"}"}<#if fieldItem_has_next>,${r""} + + + + WHERE id = ${r"#{"}id${r"}"} + + + + + + + + + \ No newline at end of file From 78975fc86d762773b010cc0343032e3b1843ee4e Mon Sep 17 00:00:00 2001 From: thj <18883325829@163.com> Date: Fri, 1 Oct 2021 11:21:20 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=A5=E6=9C=9F=20:=20?= =?UTF-8?q?2021-10-01=20=E8=83=8C=E6=99=AF=20:=20=E5=BD=93=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=20mybatis=E7=BB=84=E4=BB=B6=E7=94=9F=E6=88=90?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=97=B6,=E5=90=84=E4=B8=AA=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E4=B9=8B=E9=97=B4=E8=BF=94=E5=9B=9E=E7=9A=84=E5=AE=9E?= =?UTF-8?q?=E4=BD=93=E7=B1=BB=20=E4=B8=8D=E5=90=8C,=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E6=89=8B=E5=8A=A8=20=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=80=BC=E7=B1=BB=E5=9E=8B=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=20:=20=20=20=20=201=20controller.ftl=20=E7=BB=9F?= =?UTF-8?q?=E4=B8=80=20=E8=BF=94=E5=9B=9E=20Object=20=E5=BE=85=E8=80=83?= =?UTF-8?q?=E8=99=91=E6=96=B9=E6=A1=88:=20=20=20=20=201=20=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E5=8F=AF=E4=BB=A5=E6=94=B9=E4=B8=BA=20=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=20=E6=8C=87=E5=AE=9A=E5=AE=9E=E4=BD=93=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/templates/code-generator/mybatis/controller.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 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 69697c7..c5859af 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 @@ -38,7 +38,7 @@ public class ${classInfo.className}Controller { * @date ${.now?string('yyyy/MM/dd')} **/ @RequestMapping("/delete") - public ReturnT delete(int id){ + public Object delete(int id){ return ${classInfo.className?uncap_first}Service.delete(id); } @@ -48,7 +48,7 @@ public class ${classInfo.className}Controller { * @date ${.now?string('yyyy/MM/dd')} **/ @RequestMapping("/update") - public ReturnT update(${classInfo.className} ${classInfo.className?uncap_first}){ + public Object update(${classInfo.className} ${classInfo.className?uncap_first}){ return ${classInfo.className?uncap_first}Service.update(${classInfo.className?uncap_first}); } From ec949f97e0494529a62dcba1045584766f4d62e0 Mon Sep 17 00:00:00 2001 From: thj <18883325829@163.com> Date: Fri, 1 Oct 2021 16:07:52 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=A5=E6=9C=9F=20:=20?= =?UTF-8?q?2021-10-01=20=E8=83=8C=E6=99=AF=20:=20=E5=BD=93=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=20mybatis=E7=BB=84=E4=BB=B6=E7=94=9F=E6=88=90?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=97=B6,=E5=90=84=E4=B8=AA=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E4=B9=8B=E9=97=B4=20dao=20=E5=90=8D=E5=AD=97=E4=B8=8D?= =?UTF-8?q?=E5=90=8C=20=E4=BF=AE=E6=94=B9=20:=20=20=20=20=201=20mybatis.ft?= =?UTF-8?q?l=20=E7=BB=9F=E4=B8=80=20=E6=94=B9=E4=B8=BAMapper=20=E5=BE=85?= =?UTF-8?q?=E8=80=83=E8=99=91=E6=96=B9=E6=A1=88:=20=20=20=20=201=20?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E5=8F=AF=E4=BB=A5=E6=94=B9=E4=B8=BA=20?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=20=E6=8C=87=E5=AE=9A=E5=AE=9E=E4=BD=93?= =?UTF-8?q?=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/templates/code-generator/mybatis/mybatis.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator-web/src/main/resources/templates/code-generator/mybatis/mybatis.ftl b/generator-web/src/main/resources/templates/code-generator/mybatis/mybatis.ftl index 5031716..24b0f0e 100644 --- a/generator-web/src/main/resources/templates/code-generator/mybatis/mybatis.ftl +++ b/generator-web/src/main/resources/templates/code-generator/mybatis/mybatis.ftl @@ -1,7 +1,7 @@ - + <#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0> From 371ff03a5f701c8922b032e4cb51d62df9e48270 Mon Sep 17 00:00:00 2001 From: thj <18883325829@163.com> Date: Thu, 7 Oct 2021 09:32:40 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=A5=E6=9C=9F=20:=20?= =?UTF-8?q?2021-10-07=20=E8=83=8C=E6=99=AF=20:=20mybatis=20=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E6=96=87=E4=BB=B6=E7=94=9F=E6=88=90=E7=9A=84=20?= =?UTF-8?q?=E8=A1=A8=E5=90=8D=20=E5=92=8C=20=E8=BE=93=E5=85=A5=E7=9A=84=20?= =?UTF-8?q?sql=20=E8=AF=AD=E5=8F=A5=E4=B8=8D=E4=B8=80=E8=87=B4,=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=20=E4=BB=8E=20=E6=95=B0=E6=8D=AE=E5=BA=93=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E7=AB=AF=E7=9B=B4=E6=8E=A5=E5=A4=8D=E5=88=B6=E4=B8=8B?= =?UTF-8?q?=E6=9D=A5=E7=9A=84=20create=20=E8=AF=AD=E5=8F=A5=20=E7=BB=8F?= =?UTF-8?q?=E8=BF=87=20=E7=94=9F=E6=88=90=E4=BB=A3=E7=A0=81=20=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E7=94=9F=E6=88=90=E7=9A=84=20xml=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E4=BF=AE=E6=94=B9=E8=A1=A8=E5=90=8D=20?= =?UTF-8?q?=E6=89=8D=E8=83=BD=E5=A4=9F=E4=BD=BF=E7=94=A8=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=20:=20=20=20=20=201=20mybatis.ftl=20=E5=B0=86=20table?= =?UTF-8?q?=5Fname=20=E7=BB=9F=E4=B8=80=20=E6=94=B9=E4=B8=BA=20originaltab?= =?UTF-8?q?lename?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/code-generator/mybatis/mybatis.ftl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/generator-web/src/main/resources/templates/code-generator/mybatis/mybatis.ftl b/generator-web/src/main/resources/templates/code-generator/mybatis/mybatis.ftl index 24b0f0e..c80073a 100644 --- a/generator-web/src/main/resources/templates/code-generator/mybatis/mybatis.ftl +++ b/generator-web/src/main/resources/templates/code-generator/mybatis/mybatis.ftl @@ -20,7 +20,7 @@ - INSERT INTO ${classInfo.tableName} + INSERT INTO ${classInfo.originTableName} <#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0> <#list classInfo.fieldList as fieldItem > @@ -52,12 +52,12 @@ - DELETE FROM ${classInfo.tableName} + DELETE FROM ${classInfo.originTableName} WHERE id = ${r"#{id}"} - UPDATE ${classInfo.tableName} + UPDATE ${classInfo.originTableName} <#list classInfo.fieldList as fieldItem > <#if fieldItem.columnName != "id" && fieldItem.columnName != "AddTime" && fieldItem.columnName != "UpdateTime" > @@ -71,19 +71,19 @@ \ No newline at end of file From 1c6efb400b350e3ddebcebf0524fa08ce9d81889 Mon Sep 17 00:00:00 2001 From: thj <18883325829@163.com> Date: Thu, 7 Oct 2021 09:53:47 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=A5=E6=9C=9F=20:=20?= =?UTF-8?q?2021-10-07=20=E8=83=8C=E6=99=AF=20:=20jdbc-template=20=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E6=96=87=E4=BB=B6=E7=94=9F=E6=88=90=E7=9A=84=20?= =?UTF-8?q?=E8=A1=A8=E5=90=8D=20=E5=92=8C=20=E8=BE=93=E5=85=A5=E7=9A=84=20?= =?UTF-8?q?sql=20=E8=AF=AD=E5=8F=A5=E4=B8=8D=E4=B8=80=E8=87=B4,=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=20=E4=BB=8E=20=E6=95=B0=E6=8D=AE=E5=BA=93=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E7=AB=AF=E7=9B=B4=E6=8E=A5=E5=A4=8D=E5=88=B6=E4=B8=8B?= =?UTF-8?q?=E6=9D=A5=E7=9A=84=20create=20=E8=AF=AD=E5=8F=A5=20=E7=BB=8F?= =?UTF-8?q?=E8=BF=87=20=E7=94=9F=E6=88=90=E4=BB=A3=E7=A0=81=20=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E7=94=9F=E6=88=90=E7=9A=84=20impl=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E4=BF=AE=E6=94=B9=E8=A1=A8=E5=90=8D=20?= =?UTF-8?q?=E6=89=8D=E8=83=BD=E5=A4=9F=E4=BD=BF=E7=94=A8=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=20:=20=20=20=20=201=20mybatis.ftl=20=E5=B0=86=20table?= =?UTF-8?q?=5Fname=20=E7=BB=9F=E4=B8=80=20=E6=94=B9=E4=B8=BA=20originaltab?= =?UTF-8?q?lename?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../code-generator/jdbc-template/jtdaoimpl.ftl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 f3e9388..944c2d3 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 @@ -19,13 +19,13 @@ public class ${classInfo.className}DaoImpl implements I${classInfo.className}Dao @Override public int add(${classInfo.className} ${classInfo.className?uncap_first}) { - return jdbcTemplate.update("insert into ${classInfo.tableName} (<#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0><#list classInfo.fieldList as fieldItem >${fieldItem.columnName}<#if fieldItem_has_next>, ) values (<#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0><#list classInfo.fieldList as fieldItem >?<#if fieldItem_has_next>, )", + return jdbcTemplate.update("insert into ${classInfo.originTableName} (<#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0><#list classInfo.fieldList as fieldItem >${fieldItem.columnName}<#if fieldItem_has_next>, ) values (<#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0><#list classInfo.fieldList as fieldItem >?<#if fieldItem_has_next>, )", <#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0><#list classInfo.fieldList as fieldItem >${classInfo.className?uncap_first}.get${fieldItem.fieldName?cap_first}()<#if fieldItem_has_next>,); } @Override public int update(${classInfo.className} ${classInfo.className?uncap_first}) { - return jdbcTemplate.update("UPDATE ${classInfo.tableName} SET <#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0><#list classInfo.fieldList as fieldItem ><#if fieldItem_index gt 0 >${fieldItem.columnName}=?<#if fieldItem_has_next>," + return jdbcTemplate.update("UPDATE ${classInfo.originTableName} SET <#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0><#list classInfo.fieldList as fieldItem ><#if fieldItem_index gt 0 >${fieldItem.columnName}=?<#if fieldItem_has_next>," +" where <#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0><#list classInfo.fieldList as fieldItem ><#if fieldItem_index = 0>${fieldItem.columnName}=?<#break >", <#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0> <#list classInfo.fieldList as fieldItem ><#if fieldItem_index gt 0 >${classInfo.className?uncap_first}.get${fieldItem.fieldName?cap_first}(), @@ -35,12 +35,12 @@ public class ${classInfo.className}DaoImpl implements I${classInfo.className}Dao @Override public int delete(int id) { - return jdbcTemplate.update("DELETE from ${classInfo.tableName} where <#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0><#list classInfo.fieldList as fieldItem ><#if fieldItem_index = 0>${fieldItem.columnName}=?<#break >",id); + return jdbcTemplate.update("DELETE from ${classInfo.originTableName} where <#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0><#list classInfo.fieldList as fieldItem ><#if fieldItem_index = 0>${fieldItem.columnName}=?<#break >",id); } @Override public ${classInfo.className} findById(int id) { - List<${classInfo.className}> list = jdbcTemplate.query("select * from ${classInfo.tableName} where <#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0><#list classInfo.fieldList as fieldItem ><#if fieldItem_index = 0>${fieldItem.columnName}=?<#break >", new Object[]{id}, new BeanPropertyRowMapper<${classInfo.className}>(${classInfo.className}.class)); + List<${classInfo.className}> list = jdbcTemplate.query("select * from ${classInfo.originTableName} where <#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0><#list classInfo.fieldList as fieldItem ><#if fieldItem_index = 0>${fieldItem.columnName}=?<#break >", new Object[]{id}, new BeanPropertyRowMapper<${classInfo.className}>(${classInfo.className}.class)); if(list!=null && !list.isEmpty() ){ return list.get(0); }else{ @@ -50,7 +50,7 @@ public class ${classInfo.className}DaoImpl implements I${classInfo.className}Dao @Override public List<${classInfo.className}> findAllList(Map params) { - List<${classInfo.className}> list = jdbcTemplate.query("select * from ${classInfo.tableName}", new Object[]{}, new BeanPropertyRowMapper<${classInfo.className}>(${classInfo.className}.class)); + List<${classInfo.className}> list = jdbcTemplate.query("select * from ${classInfo.originTableName}", new Object[]{}, new BeanPropertyRowMapper<${classInfo.className}>(${classInfo.className}.class)); if(list!=null && !list.isEmpty() ){ return list; }else{ From 1144a2137e95bc6c8875838ced662b115058b1f5 Mon Sep 17 00:00:00 2001 From: thj <18883325829@163.com> Date: Thu, 7 Oct 2021 09:57:20 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=A5=E6=9C=9F=20:=20?= =?UTF-8?q?2021-10-07=20=E8=83=8C=E6=99=AF=20:=20jpa=20=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=94=9F=E6=88=90=E7=9A=84=20=E8=A1=A8?= =?UTF-8?q?=E5=90=8D=20=E5=92=8C=20=E8=BE=93=E5=85=A5=E7=9A=84=20sql=20?= =?UTF-8?q?=E8=AF=AD=E5=8F=A5=E4=B8=8D=E4=B8=80=E8=87=B4,=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=20=E4=BB=8E=20=E6=95=B0=E6=8D=AE=E5=BA=93=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E7=AB=AF=E7=9B=B4=E6=8E=A5=E5=A4=8D=E5=88=B6=E4=B8=8B?= =?UTF-8?q?=E6=9D=A5=E7=9A=84=20create=20=E8=AF=AD=E5=8F=A5=20=E7=BB=8F?= =?UTF-8?q?=E8=BF=87=20=E7=94=9F=E6=88=90=E4=BB=A3=E7=A0=81=20=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E7=94=9F=E6=88=90=E7=9A=84=20=E5=AE=9E=E4=BD=93?= =?UTF-8?q?=E7=B1=BB=20=E6=96=87=E4=BB=B6=E9=9C=80=E8=A6=81=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E8=A1=A8=E5=90=8D=20=E6=89=8D=E8=83=BD=E5=A4=9F?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=20=E4=BF=AE=E6=94=B9=20:=20=20=20=20=201=20j?= =?UTF-8?q?pa.entity.ftl=20=E5=B0=86=20table=5Fname=20=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=20=E6=94=B9=E4=B8=BA=20originaltablename?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/templates/code-generator/jpa/entity.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ceb1456..a045f5d 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 @@ -21,7 +21,7 @@ import io.swagger.annotations.ApiModelProperty; */ @Entity <#if isLombok?exists && isLombok==true>@Data -<#if isComment?exists && isComment==true>@Table(name="${classInfo.tableName}")<#if isSwagger?exists && isSwagger==true> +<#if isComment?exists && isComment==true>@Table(name="${classInfo.originTableName}")<#if isSwagger?exists && isSwagger==true> @ApiModel("${classInfo.classComment}") public class ${classInfo.className} implements Serializable { From dac7d20eb80c812904a4102f8483c11dbbb0be35 Mon Sep 17 00:00:00 2001 From: Thixiaoxiao <45098520+Thixiaoxiao@users.noreply.github.com> Date: Fri, 22 Oct 2021 14:48:33 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 部分浏览器异常 --- generator-web/src/main/resources/statics/js/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generator-web/src/main/resources/statics/js/main.js b/generator-web/src/main/resources/statics/js/main.js index 524cd67..fd01eb0 100644 --- a/generator-web/src/main/resources/statics/js/main.js +++ b/generator-web/src/main/resources/statics/js/main.js @@ -166,7 +166,7 @@ function setAllCookie() { } function setOneCookie(key) { - setCookie(key, vm.formData.options[key], 60 * 60 * 24 * 7); + setCookie(key, vm.formData.options[key]); } /** @@ -192,4 +192,4 @@ function loadOneCookie(key) { */ function list_key_need_load() { return ["authorName","packageName","returnUtilSuccess","returnUtilFailure","ignorePrefix","tinyintTransType","timeTransType"]; -} \ No newline at end of file +}