Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
online-edu-backend
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
online-edu
online-edu-backend
Commits
6ebb92ac
Commit
6ebb92ac
authored
Apr 28, 2021
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码生成bug
parent
5183c400
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
10 deletions
+13
-10
BizConstants.java
src/main/java/com/qkdata/biz/common/BizConstants.java
+3
-0
CodeGenerator.java
src/test/java/com/qkdata/autogenerator/CodeGenerator.java
+10
-10
No files found.
src/main/java/com/qkdata/biz/common/BizConstants.java
View file @
6ebb92ac
...
...
@@ -27,4 +27,7 @@ public class BizConstants {
public
static
final
String
CONFIG_KEY_DISCOUNT_6MON
=
"discount_6mon"
;
public
static
final
String
CONFIG_KEY_DISCOUNT_12MON
=
"discount_12mon"
;
public
static
final
String
CONFIG_KEY_ENTERPRICE_VIP_PRICE
=
"enterprice_vip_price"
;
public
static
final
String
SMS_TEMPLATE_CODE
=
"T_LG_CAPTCHA"
;
public
static
final
String
MOBILE_CAPTCHA_PREFIX
=
"CAPTCHA_"
;
}
src/test/java/com/qkdata/autogenerator/CodeGenerator.java
View file @
6ebb92ac
...
...
@@ -88,17 +88,17 @@ public class CodeGenerator {
public
String
outputFile
(
TableInfo
tableInfo
)
{
// 自定义输出文件名 , 如果你 Entity 设置了前后缀、此处注意 xml 的名称会跟着发生变化!!
return
projectPath
+
"/src/main/resources/mappers/"
+
pc
.
getModuleName
()
+
"/"
+
tableInfo
.
getEntityName
()
+
"Mapper"
+
StringPool
.
DOT_XML
;
}
});
focList
.
add
(
new
FileOutConfig
(
serviceTemplatePath
)
{
@Override
public
String
outputFile
(
TableInfo
tableInfo
)
{
// 自定义输出文件名 , 如果你 Entity 设置了前后缀、此处注意 xml 的名称会跟着发生变化!!
return
projectPath
+
"src/main/java/"
+
pc
.
getModuleName
()
+
"/service/"
+
tableInfo
.
getEntityName
()
+
"Service"
+
StringPool
.
DOT_JAVA
;
+
"/"
+
tableInfo
.
getName
()
+
"Mapper"
+
StringPool
.
DOT_XML
;
}
});
// focList.add(new FileOutConfig(serviceTemplatePath) {
// @Override
// public String outputFile(TableInfo tableInfo) {
// // 自定义输出文件名 , 如果你 Entity 设置了前后缀、此处注意 xml 的名称会跟着发生变化!!
// return projectPath + "/src/main/java/" + pc.getModuleName()
// + "/service/" + tableInfo.getName() + "Service" + StringPool.DOT_JAVA;
// }
// });
/*
cfg.setFileCreate(new IFileCreate() {
@Override
...
...
@@ -144,7 +144,7 @@ public class CodeGenerator {
strategy
.
setSuperEntityColumns
(
"id"
,
"create_time"
,
"update_time"
);
strategy
.
setInclude
(
scanner
(
"表名,多个英文逗号分割"
).
split
(
","
));
strategy
.
setControllerMappingHyphenStyle
(
true
);
strategy
.
setSuperService
Impl
Class
(
"com.qkdata.common.base.service.impl.BaseServiceImpl"
);
strategy
.
setSuperServiceClass
(
"com.qkdata.common.base.service.impl.BaseServiceImpl"
);
// strategy.setTablePrefix(pc.getModuleName() + "_");
mpg
.
setStrategy
(
strategy
);
mpg
.
setTemplateEngine
(
new
FreemarkerTemplateEngine
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment