File tree 6 files changed +15
-6
lines changed
java/com/softdev/system/generator/service
resources/templates/code-generator
6 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 61
61
- 可在` applicaltion.yml ` 中的` OEM.mode ` 设置` js/css引入模式 ` 为` local ` (本地模式,默认)/` CDN ` (云CDN模式,在线网站推荐,省流量)
62
62
- OEM信息可以在` applicaltion.yml ` 中的` OEM ` 中更改
63
63
- * 支持公共js/css的Local/CDN模式切换,方便` 本地 ` 或者` 工具站 ` 进行部署,可以在` application.yml ` 的` OEM.Mode= ` 进行设置,之后请在` header-CDN-v2.html ` /` header-local-v2.html ` 中检查对应js/css配置是否正确。默认为` CDN ` 模式。对于没有网络的环境请使用` local ` 模式。
64
+ - 如何判断是否包含Date日期类并引入,搜索` <#assign importDdate = true /> ` 即可找到对应的方法判断和引入
64
65
65
66
# Branch Detail 分支介绍
66
67
- Master:主力分支,基于SpringBoot3+,需要JDK17+
67
68
- JDK11:兼容分支,基于SpringBoot2+,支持JDK8/JDK11/JDK17等版本,请自行(切换jdk11分支)[ https://github.com/moshowgame/SpringBootCodeGenerator/tree/jdk11 ]
68
69
- NewUI:新UI界面改版尝鲜
69
70
70
71
# 更新预告
71
- 1.计划引入DJANGO等其他语言的ORM模板,欢迎大家submit相关代码供参考
72
+ 1.计划优化一下前端界面,改善由于静态资源加载问题导致的访问缓慢问题,目前正在开发中
73
+ 2.根据大家Raised的Issue优化一下模板
72
74
73
75
# Update Logs
74
76
| 更新日期 | 更新内容 |
75
77
| :-----------| :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
78
+ | 2025.03.16 | 修复由于SQL类型大写导致无法转换的问题。(感谢@zzy-design 的反馈)<br > JPA模板:修复不开启Lombok情况下Set/Get方法生成问题;修复importDdate判断为true后没有引入日期类的问题(感谢@PenroseYang 的反馈) |
76
79
| 2024.12.29 | 优化前端加载速度,优化输出代码着色,CDN改字节跳动静态资源公共库。<br > |
77
80
| 2024.12.23 | 新增InsertSQL模式,采用JSQLParser引擎进行封装<br >优化代码封装<br >CDN恢复为staticfile.org加速(如果本地卡的话,建议切换local模式)。<br > |
78
81
| 2024.04.23 | 切换为更快更稳定的BootCDN进行加速。<br >前端NEWUI改版(基于AdminLTE+Bootstrap+Vue+ElementUI混合模式)。 |
Original file line number Diff line number Diff line change @@ -308,7 +308,8 @@ public ClassInfo processTableIntoClassInfo(ParamInfo paramInfo)
308
308
fieldName = columnName ;
309
309
}
310
310
columnLine = columnLine .substring (columnLine .indexOf ("`" ) + 1 ).trim ();
311
- String mysqlType = columnLine .split ("\\ s+" )[1 ];
311
+ //2025-03-16 修复由于类型大写导致无法转换的问题
312
+ String mysqlType = columnLine .split ("\\ s+" )[1 ].toLowerCase (Locale .ROOT );
312
313
if (mysqlType .contains ("(" )){
313
314
mysqlType = mysqlType .substring (0 , mysqlType .indexOf ("(" ));
314
315
}
Original file line number Diff line number Diff line change 8
8
</#if >
9
9
</#list >
10
10
</#if >
11
+ <#if importDdate?exists && importDdate==true >import java.util.Date;</#if >
11
12
import java.util.List;
12
13
import org.springframework.data.jpa.repository.JpaRepository;
13
14
import org.springframework.data.jpa.repository.Query;
Original file line number Diff line number Diff line change @@ -40,8 +40,10 @@ public class ${classInfo.className} implements Serializable {
40
40
</#list >
41
41
public ${classInfo.className} () {
42
42
}
43
- </#if >
44
43
44
+
45
+ <#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0 >
46
+ <#list classInfo.fieldList as fieldItem >
45
47
<#if isLombok?exists && isLombok==false >
46
48
public ${fieldItem.fieldClass} get${fieldItem.fieldName?cap_first } () {
47
49
return ${fieldItem.fieldName} ;
@@ -51,4 +53,6 @@ public class ${classInfo.className} implements Serializable {
51
53
this.${fieldItem.fieldName} = ${fieldItem.fieldName} ;
52
54
}
53
55
</#if >
56
+ </#list >
54
57
}
58
+ </#if ></#if >
Original file line number Diff line number Diff line change 8
8
</#if >
9
9
</#list >
10
10
</#if >
11
+ <#if importDdate?exists && importDdate==true >import java.util.Date;</#if >
11
12
import java.util.List;
12
13
import org.springframework.data.jpa.repository.JpaRepository;
13
14
import org.springframework.data.jpa.repository.Query;
@@ -21,6 +22,4 @@ import org.springframework.stereotype.Repository;
21
22
@Repository
22
23
public interface ${classInfo.className} Repository extends JpaRepository<${classInfo.className} ,Integer> {
23
24
24
-
25
-
26
- }
25
+ }
Original file line number Diff line number Diff line change 8
8
</#if >
9
9
</#list >
10
10
</#if >
11
+ <#if importDdate?exists && importDdate==true >import java.util.Date;</#if >
11
12
import java.util.List;
12
13
import io.mybatis.mapper.Mapper;
13
14
</#if >
You can’t perform that action at this time.
0 commit comments