|
|
@@ -122,7 +122,7 @@ public class VelocityUtils {
|
|
|
*
|
|
|
* @return 模板列表
|
|
|
*/
|
|
|
- public static List<String> getTemplateList(String tplCategory) {
|
|
|
+ public static List<String> getTemplateList(String tplCategory, String dsName) {
|
|
|
List<String> templates = new ArrayList<>();
|
|
|
templates.add("vm/java/domain.java.vm");
|
|
|
templates.add("vm/java/vo.java.vm");
|
|
|
@@ -133,7 +133,7 @@ public class VelocityUtils {
|
|
|
templates.add("vm/java/controller.java.vm");
|
|
|
templates.add("vm/xml/mapper.xml.vm");
|
|
|
|
|
|
- DataBaseType dataBaseType = DataBaseHelper.getDataBaseType();
|
|
|
+ DataBaseType dataBaseType = DataBaseHelper.getDataBaseType(dsName);
|
|
|
if (dataBaseType.isOracle()) {
|
|
|
templates.add("vm/sql/oracle/sql.vm");
|
|
|
} else if (dataBaseType.isPostgreSql()) {
|
|
|
@@ -158,7 +158,8 @@ public class VelocityUtils {
|
|
|
* @param template 模板
|
|
|
*/
|
|
|
public static boolean isUiFile(String template) {
|
|
|
- return template.contains("api.ts.vm") || template.contains("view.vue.vm") || template.contains("view-tree.vue.vm");
|
|
|
+ return template.contains("api.ts.vm") || template.contains("view.vue.vm")
|
|
|
+ || template.contains("view-tree.vue.vm");
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -265,7 +266,7 @@ public class VelocityUtils {
|
|
|
for (GenTableColumn column : columns) {
|
|
|
if (!column.isSuperColumn() && StringUtils.isNotEmpty(column.getDictType()) && StringUtils.equalsAny(
|
|
|
column.getHtmlType(),
|
|
|
- new String[]{GenConstants.HTML_SELECT, GenConstants.HTML_RADIO, GenConstants.HTML_CHECKBOX})) {
|
|
|
+ new String[] { GenConstants.HTML_SELECT, GenConstants.HTML_RADIO, GenConstants.HTML_CHECKBOX })) {
|
|
|
dicts.add("'" + column.getDictType() + "'");
|
|
|
}
|
|
|
}
|