update 优化 代码生成器

feature/model
疯狂的狮子Li 1 year ago
parent 512108cf5a
commit 7b6dc06a06

@ -56,7 +56,7 @@ public class GenController extends BaseController {
GenTable table = genTableService.selectGenTableById(tableId); GenTable table = genTableService.selectGenTableById(tableId);
List<GenTable> tables = genTableService.selectGenTableAll(); List<GenTable> tables = genTableService.selectGenTableAll();
List<GenTableColumn> list = genTableService.selectGenTableColumnListByTableId(tableId); List<GenTableColumn> list = genTableService.selectGenTableColumnListByTableId(tableId);
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<>(3);
map.put("info", table); map.put("info", table);
map.put("rows", list); map.put("rows", list);
map.put("tables", tables); map.put("tables", tables);

@ -178,7 +178,6 @@ public class GenUtils {
* *
* @param replacementm * @param replacementm
* @param searchList * @param searchList
* @return
*/ */
public static String replaceFirst(String replacementm, String[] searchList) { public static String replaceFirst(String replacementm, String[] searchList) {
String text = replacementm; String text = replacementm;

@ -109,7 +109,7 @@ public class VelocityUtils {
* @return * @return
*/ */
public static List<String> getTemplateList(String tplCategory) { public static List<String> getTemplateList(String tplCategory) {
List<String> templates = new ArrayList<String>(); List<String> templates = new ArrayList<>();
templates.add("vm/java/domain.java.vm"); templates.add("vm/java/domain.java.vm");
templates.add("vm/java/vo.java.vm"); templates.add("vm/java/vo.java.vm");
templates.add("vm/java/bo.java.vm"); templates.add("vm/java/bo.java.vm");
@ -208,7 +208,7 @@ public class VelocityUtils {
*/ */
public static HashSet<String> getImportList(GenTable genTable) { public static HashSet<String> getImportList(GenTable genTable) {
List<GenTableColumn> columns = genTable.getColumns(); List<GenTableColumn> columns = genTable.getColumns();
HashSet<String> importList = new HashSet<String>(); HashSet<String> importList = new HashSet<>();
for (GenTableColumn column : columns) { for (GenTableColumn column : columns) {
if (!column.isSuperColumn() && GenConstants.TYPE_DATE.equals(column.getJavaType())) { if (!column.isSuperColumn() && GenConstants.TYPE_DATE.equals(column.getJavaType())) {
importList.add("java.util.Date"); importList.add("java.util.Date");

Loading…
Cancel
Save