From 8774eda6a9a4edcf29da827814cdb83fc0283654 Mon Sep 17 00:00:00 2001 From: wangbing Date: Mon, 6 Jul 2020 01:27:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=92=8CWEB=E9=9A=94?= =?UTF-8?q?=E7=A6=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 3956cfe8ee7360e1287f40a11dc6ce67e041707d --- .../dbtool/javafx/JavaFxApplication.java | 2 +- .../javafx/ctrl/OptionSelectController.java | 29 +- .../dbtool/javafx/manger/XmlManager.java | 4 +- .../manger/callable/SpringBootCallable.java | 223 ++++++++------- .../wbsite/dbtool/javafx/po/SelectItem.java | 10 + src/main/resources/fxml/OptionSelect.fxml | 3 +- .../LogErrAjax.java => wsvr/LogerrAjax.java} | 56 ++-- .../ajax/{wsys => wsvr}/ProfilesAjax.java | 22 +- .../ajax/{wmnt => wsys}/ScheduleAjax.java | 0 .../java/frame/schedule/Scheduler.java | 2 +- .../java/frame/validation/Select.java | 5 + .../java/module/wsvr/ent/Logerr.java | 74 +++++ .../module/{wsys => wsvr}/ent/Profiles.java | 16 +- .../java/module/wsvr/mgr/LogerrManager.java | 67 +++++ .../mgr/LogerrManagerImpl.java} | 76 ++--- .../{wsys => wsvr}/mgr/ProfilesManager.java | 22 +- .../mgr/ProfilesManagerImpl.java | 41 ++- .../mpr/LogerrMapper.java} | 24 +- .../{wsys => wsvr}/mpr/ProfilesMapper.java | 8 +- .../module/wsvr/mpr/SQLite_LogerrMapper.xml | 157 +++++++++++ .../mpr/SQLite_ProfilesMapper.xml | 80 +++--- .../module/wsvr/req/LogerrCreateRequest.java | 77 +++++ .../module/wsvr/req/LogerrDeleteRequest.java | 29 ++ .../req/LogerrFindRequest.java} | 40 +-- .../module/wsvr/req/LogerrUpdateRequest.java | 91 ++++++ .../req/ProfilesCreateRequest.java | 24 +- .../req/ProfilesDeleteRequest.java | 8 +- .../req/ProfilesFindRequest.java | 12 +- .../req/ProfilesUpdateRequest.java | 26 +- .../module/wsvr/rsp/LogerrCreateResponse.java | 26 ++ .../module/wsvr/rsp/LogerrDeleteResponse.java | 26 ++ .../module/wsvr/rsp/LogerrFindResponse.java | 14 + .../module/wsvr/rsp/LogerrUpdateResponse.java | 26 ++ .../rsp/ProfilesCreateResponse.java | 6 +- .../rsp/ProfilesDeleteResponse.java | 6 +- .../module/wsvr/rsp/ProfilesFindResponse.java | 13 + .../rsp/ProfilesUpdateResponse.java | 6 +- .../java/module/wsys/ent/LogErr.java | 117 -------- .../java/module/wsys/mgr/LogErrManager.java | 66 ----- .../module/wsys/req/LogErrCreateRequest.java | 116 -------- .../module/wsys/req/LogErrUpdateRequest.java | 47 ---- .../module/wsys/rsp/LogErrFindResponse.java | 14 - .../module/wsys/rsp/ProfilesFindResponse.java | 14 - .../SpringBoot/resources/dbtool/wadmin.xml | 142 ++++------ .../resources/dbtool/wsys/MySQL_ALL_TABLE.sql | 44 --- .../resources/dbtool/wsys/MySQL_LOG_ERR.sql | 23 -- .../resources/dbtool/wsys/MySQL_PROFILES.sql | 19 -- .../dbtool/wsys/Oracle_ALL_TABLE.sql | 68 ----- .../resources/dbtool/wsys/Oracle_LOG_ERR.sql | 38 --- .../resources/dbtool/wsys/Oracle_PROFILES.sql | 30 -- .../dbtool/wsys/SQLite_ALL_TABLE.sql | 42 +-- .../resources/dbtool/wsys/SQLite_LOG_ERR.sql | 22 -- .../resources/dbtool/wsys/SQLite_PROFILES.sql | 18 -- .../resources/templates/screen/index.ftl | 8 +- .../resources/templates/screen/module/mgr.ftl | 14 +- .../templates/screen/module/wmnt/logErr.ftl | 254 ----------------- .../templates/screen/module/wsvr/logerr.ftl | 263 ++++++++++++++++++ .../screen/module/{wsys => wsvr}/profiles.ftl | 48 ++-- .../screen/module/{wmnt => wsys}/schedule.ftl | 2 +- .../SpringBoot/test/wsvr/LogerrTest.java | 112 ++++++++ .../test/{wsys => wsvr}/ProfilesTest.java | 54 ++-- .../SpringBoot/test/wsys/LogErrTest.java | 118 -------- 62 files changed, 1504 insertions(+), 1540 deletions(-) rename src/main/resources/modules/SpringBoot/java/action/ajax/{wmnt/LogErrAjax.java => wsvr/LogerrAjax.java} (51%) rename src/main/resources/modules/SpringBoot/java/action/ajax/{wsys => wsvr}/ProfilesAjax.java (83%) rename src/main/resources/modules/SpringBoot/java/action/ajax/{wmnt => wsys}/ScheduleAjax.java (100%) create mode 100644 src/main/resources/modules/SpringBoot/java/module/wsvr/ent/Logerr.java rename src/main/resources/modules/SpringBoot/java/module/{wsys => wsvr}/ent/Profiles.java (83%) create mode 100644 src/main/resources/modules/SpringBoot/java/module/wsvr/mgr/LogerrManager.java rename src/main/resources/modules/SpringBoot/java/module/{wsys/mgr/LogErrManagerImpl.java => wsvr/mgr/LogerrManagerImpl.java} (61%) rename src/main/resources/modules/SpringBoot/java/module/{wsys => wsvr}/mgr/ProfilesManager.java (73%) rename src/main/resources/modules/SpringBoot/java/module/{wsys => wsvr}/mgr/ProfilesManagerImpl.java (84%) rename src/main/resources/modules/SpringBoot/java/module/{wsys/mpr/LogErrMapper.java => wsvr/mpr/LogerrMapper.java} (71%) rename src/main/resources/modules/SpringBoot/java/module/{wsys => wsvr}/mpr/ProfilesMapper.java (92%) create mode 100644 src/main/resources/modules/SpringBoot/java/module/wsvr/mpr/SQLite_LogerrMapper.xml rename src/main/resources/modules/SpringBoot/java/module/{wsys => wsvr}/mpr/SQLite_ProfilesMapper.xml (73%) create mode 100644 src/main/resources/modules/SpringBoot/java/module/wsvr/req/LogerrCreateRequest.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/wsvr/req/LogerrDeleteRequest.java rename src/main/resources/modules/SpringBoot/java/module/{wsys/req/LogErrFindRequest.java => wsvr/req/LogerrFindRequest.java} (53%) create mode 100644 src/main/resources/modules/SpringBoot/java/module/wsvr/req/LogerrUpdateRequest.java rename src/main/resources/modules/SpringBoot/java/module/{wsys => wsvr}/req/ProfilesCreateRequest.java (67%) rename src/main/resources/modules/SpringBoot/java/module/{wsys => wsvr}/req/ProfilesDeleteRequest.java (82%) rename src/main/resources/modules/SpringBoot/java/module/{wsys => wsvr}/req/ProfilesFindRequest.java (84%) rename src/main/resources/modules/SpringBoot/java/module/{wsys => wsvr}/req/ProfilesUpdateRequest.java (71%) create mode 100644 src/main/resources/modules/SpringBoot/java/module/wsvr/rsp/LogerrCreateResponse.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/wsvr/rsp/LogerrDeleteResponse.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/wsvr/rsp/LogerrFindResponse.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/wsvr/rsp/LogerrUpdateResponse.java rename src/main/resources/modules/SpringBoot/java/module/{wsys => wsvr}/rsp/ProfilesCreateResponse.java (81%) rename src/main/resources/modules/SpringBoot/java/module/{wsys => wsvr}/rsp/ProfilesDeleteResponse.java (83%) create mode 100644 src/main/resources/modules/SpringBoot/java/module/wsvr/rsp/ProfilesFindResponse.java rename src/main/resources/modules/SpringBoot/java/module/{wsys => wsvr}/rsp/ProfilesUpdateResponse.java (83%) delete mode 100644 src/main/resources/modules/SpringBoot/java/module/wsys/ent/LogErr.java delete mode 100644 src/main/resources/modules/SpringBoot/java/module/wsys/mgr/LogErrManager.java delete mode 100644 src/main/resources/modules/SpringBoot/java/module/wsys/req/LogErrCreateRequest.java delete mode 100644 src/main/resources/modules/SpringBoot/java/module/wsys/req/LogErrUpdateRequest.java delete mode 100644 src/main/resources/modules/SpringBoot/java/module/wsys/rsp/LogErrFindResponse.java delete mode 100644 src/main/resources/modules/SpringBoot/java/module/wsys/rsp/ProfilesFindResponse.java delete mode 100644 src/main/resources/modules/SpringBoot/resources/dbtool/wsys/MySQL_LOG_ERR.sql delete mode 100644 src/main/resources/modules/SpringBoot/resources/dbtool/wsys/MySQL_PROFILES.sql delete mode 100644 src/main/resources/modules/SpringBoot/resources/dbtool/wsys/Oracle_LOG_ERR.sql delete mode 100644 src/main/resources/modules/SpringBoot/resources/dbtool/wsys/Oracle_PROFILES.sql delete mode 100644 src/main/resources/modules/SpringBoot/resources/dbtool/wsys/SQLite_LOG_ERR.sql delete mode 100644 src/main/resources/modules/SpringBoot/resources/dbtool/wsys/SQLite_PROFILES.sql delete mode 100644 src/main/resources/modules/SpringBoot/resources/templates/screen/module/wmnt/logErr.ftl create mode 100644 src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsvr/logerr.ftl rename src/main/resources/modules/SpringBoot/resources/templates/screen/module/{wsys => wsvr}/profiles.ftl (81%) rename src/main/resources/modules/SpringBoot/resources/templates/screen/module/{wmnt => wsys}/schedule.ftl (99%) create mode 100644 src/main/resources/modules/SpringBoot/test/wsvr/LogerrTest.java rename src/main/resources/modules/SpringBoot/test/{wsys => wsvr}/ProfilesTest.java (67%) delete mode 100644 src/main/resources/modules/SpringBoot/test/wsys/LogErrTest.java diff --git a/src/main/java/xyz/wbsite/dbtool/javafx/JavaFxApplication.java b/src/main/java/xyz/wbsite/dbtool/javafx/JavaFxApplication.java index 10195187..816ecdb2 100644 --- a/src/main/java/xyz/wbsite/dbtool/javafx/JavaFxApplication.java +++ b/src/main/java/xyz/wbsite/dbtool/javafx/JavaFxApplication.java @@ -789,7 +789,7 @@ public class JavaFxApplication extends Application { field.setFieldType(FieldType.Date.name()); } if (newValue.toUpperCase().endsWith("_TYPE")) { - field.setFieldType(FieldType.Dict.name()); + field.setFieldType(FieldType.Select.name()); } } }); diff --git a/src/main/java/xyz/wbsite/dbtool/javafx/ctrl/OptionSelectController.java b/src/main/java/xyz/wbsite/dbtool/javafx/ctrl/OptionSelectController.java index fcc3b067..b7b9abfb 100644 --- a/src/main/java/xyz/wbsite/dbtool/javafx/ctrl/OptionSelectController.java +++ b/src/main/java/xyz/wbsite/dbtool/javafx/ctrl/OptionSelectController.java @@ -13,7 +13,6 @@ import javafx.scene.control.cell.TextFieldTableCell; import javafx.util.Callback; import javafx.util.converter.DefaultStringConverter; import xyz.wbsite.dbtool.javafx.po.SelectItem; -import xyz.wbsite.dbtool.javafx.po.SelectItem; import java.util.ArrayList; import java.util.List; @@ -113,13 +112,35 @@ public class OptionSelectController { }; } }); + columns.get(1).setCellValueFactory(new PropertyValueFactory("label")); + columns.get(1).setCellFactory(new Callback() { + @Override + public TableCell call(TableColumn param) { + + param.setOnEditCommit(new EventHandler() { + @Override + public void handle(TableColumn.CellEditEvent event) { + int row = event.getTablePosition().getRow(); + SelectItem field = data.get(row); + field.setLabel((String) event.getNewValue()); + } + }); + return new TextFieldTableCell(new DefaultStringConverter()) { + @Override + public void updateItem(Object item, boolean empty) { + super.updateItem(item, empty); + int index = this.getTableRow().getIndex(); + } + }; + } + }); ObservableList ObservableList = FXCollections.observableArrayList(); ObservableList.addAll(data); datas.setItems(ObservableList); } - public void refresh(){ + public void refresh() { ObservableList ObservableList = FXCollections.observableArrayList(); ObservableList.addAll(data); datas.setItems(ObservableList); @@ -127,7 +148,9 @@ public class OptionSelectController { public SelectItem getNewSelectItem() { String baseValue = "VALUE"; + String baseLabel = "值"; String value = baseValue; + String label = baseLabel; int k = 0; do { int i; @@ -139,9 +162,11 @@ public class OptionSelectController { if (i < data.size()) { k++; value = baseValue + k; + label = baseLabel + k; } else { SelectItem SelectItem = new SelectItem(); SelectItem.setValue(value); + SelectItem.setLabel(label); return SelectItem; } } while (true); diff --git a/src/main/java/xyz/wbsite/dbtool/javafx/manger/XmlManager.java b/src/main/java/xyz/wbsite/dbtool/javafx/manger/XmlManager.java index aed192a9..f5099223 100644 --- a/src/main/java/xyz/wbsite/dbtool/javafx/manger/XmlManager.java +++ b/src/main/java/xyz/wbsite/dbtool/javafx/manger/XmlManager.java @@ -230,7 +230,7 @@ public class XmlManager { String value = annotation.value(); Method method = ClassUtil.getMethod(field.getName(), o.getClass()); Object invoke = method.invoke(o); - element.setAttribute(value, invoke.toString()); + element.setAttribute(value, invoke == null ? "" : invoke.toString()); } } catch (Exception e) { e.printStackTrace(); @@ -257,7 +257,7 @@ public class XmlManager { Method method = ClassUtil.setMethod(field.getName(), o.getClass(), field.getType()); method.setAccessible(true); method.invoke(o, getDataBase(attribute)); - }else if (field.getType() == Frame.class) { + } else if (field.getType() == Frame.class) { Method method = ClassUtil.setMethod(field.getName(), o.getClass(), field.getType()); method.setAccessible(true); method.invoke(o, getFrame(attribute)); diff --git a/src/main/java/xyz/wbsite/dbtool/javafx/manger/callable/SpringBootCallable.java b/src/main/java/xyz/wbsite/dbtool/javafx/manger/callable/SpringBootCallable.java index c152a16f..f39294f9 100644 --- a/src/main/java/xyz/wbsite/dbtool/javafx/manger/callable/SpringBootCallable.java +++ b/src/main/java/xyz/wbsite/dbtool/javafx/manger/callable/SpringBootCallable.java @@ -203,9 +203,9 @@ public class SpringBootCallable implements Callable { freeMarkerManager.outputTemp(Tool.createFile(wsys, name), "SpringBoot/java/action/ajax/wsys/" + name, ctx); } - File wmnt = Tool.createPath(ajax, "wmnt"); - for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/java/action/ajax/wmnt/")) { - freeMarkerManager.outputTemp(Tool.createFile(wsys, name), "SpringBoot/java/action/ajax/wmnt/" + name, ctx); + File wsvr = Tool.createPath(ajax, "wsvr"); + for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/java/action/ajax/wsvr/")) { + freeMarkerManager.outputTemp(Tool.createFile(wsvr, name), "SpringBoot/java/action/ajax/wsvr/" + name, ctx); } } } @@ -359,118 +359,127 @@ public class SpringBootCallable implements Callable { } public void generateModuleFor服务框架(File root, Project project) { - HashMap ctx = new HashMap(); - ctx.put("project", project); - ctx.put("domain", project.getDomain()); - ctx.put("author", project.getAuthor()); - ctx.put("dataBase", project.getDatabase().toString()); - File ent = Tool.createPath(root, "wsvr", "ent"); - File mpr = Tool.createPath(root, "wsvr", "mpr"); - File mgr = Tool.createPath(root, "wsvr", "mgr"); - File req = Tool.createPath(root, "wsvr", "req"); - File rsp = Tool.createPath(root, "wsvr", "rsp"); - for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/java/module/wsvr/ent/")) { - freeMarkerManager.outputTemp(Tool.createFile(ent, name), "SpringBoot/java/module/wsvr/ent/" + name, ctx); - } - for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/java/module/wsvr/mgr/")) { - freeMarkerManager.outputTemp(Tool.createFile(mgr, name), "SpringBoot/java/module/wsvr/mgr/" + name, ctx); - } - for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/java/module/wsvr/mpr/")) { - if (name.endsWith(".java")) { - freeMarkerManager.outputTemp(Tool.createFile(mpr, name), "SpringBoot/java/module/wsvr/mpr/" + name, ctx); - } else if (name.contains(project.getDatabase().name())) { - freeMarkerManager.outputTemp(Tool.createFile(mpr, name.replaceAll(project.getDatabase().name() + "_", "")), "SpringBoot/java/module/wsvr/mpr/" + name, ctx); + Module wsvrModule = tryGetModule(project, "wsvr"); + if (wsvrModule == null || !wsvrModule.getNeedGenerate()) {// 防止与系统冲突,一般不会重复,通常是架构重新设计时遇到 + HashMap ctx = new HashMap(); + ctx.put("project", project); + ctx.put("domain", project.getDomain()); + ctx.put("author", project.getAuthor()); + ctx.put("dataBase", project.getDatabase().toString()); + File ent = Tool.createPath(root, "wsvr", "ent"); + File mpr = Tool.createPath(root, "wsvr", "mpr"); + File mgr = Tool.createPath(root, "wsvr", "mgr"); + File req = Tool.createPath(root, "wsvr", "req"); + File rsp = Tool.createPath(root, "wsvr", "rsp"); + for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/java/module/wsvr/ent/")) { + freeMarkerManager.outputTemp(Tool.createFile(ent, name), "SpringBoot/java/module/wsvr/ent/" + name, ctx); + } + for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/java/module/wsvr/mgr/")) { + freeMarkerManager.outputTemp(Tool.createFile(mgr, name), "SpringBoot/java/module/wsvr/mgr/" + name, ctx); + } + for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/java/module/wsvr/mpr/")) { + if (name.endsWith(".java")) { + freeMarkerManager.outputTemp(Tool.createFile(mpr, name), "SpringBoot/java/module/wsvr/mpr/" + name, ctx); + } else if (name.contains(project.getDatabase().name())) { + freeMarkerManager.outputTemp(Tool.createFile(mpr, name.replaceAll(project.getDatabase().name() + "_", "")), "SpringBoot/java/module/wsvr/mpr/" + name, ctx); + } + } + for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/java/module/wsvr/req/")) { + freeMarkerManager.outputTemp(Tool.createFile(req, name), "SpringBoot/java/module/wsvr/req/" + name, ctx); + } + for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/java/module/wsvr/rsp/")) { + freeMarkerManager.outputTemp(Tool.createFile(rsp, name), "SpringBoot/java/module/wsvr/rsp/" + name, ctx); } - } - for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/java/module/wsvr/req/")) { - freeMarkerManager.outputTemp(Tool.createFile(req, name), "SpringBoot/java/module/wsvr/req/" + name, ctx); - } - for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/java/module/wsvr/rsp/")) { - freeMarkerManager.outputTemp(Tool.createFile(rsp, name), "SpringBoot/java/module/wsvr/rsp/" + name, ctx); } } public void generateModuleFor接口框架(File root, Project project) { - HashMap ctx = new HashMap(); - ctx.put("project", project); - ctx.put("domain", project.getDomain()); - ctx.put("author", project.getAuthor()); - ctx.put("dataBase", project.getDatabase().toString()); - File ent = Tool.createPath(root, "wsys", "ent"); - File mpr = Tool.createPath(root, "wsys", "mpr"); - File mgr = Tool.createPath(root, "wsys", "mgr"); - File req = Tool.createPath(root, "wsys", "req"); - File rsp = Tool.createPath(root, "wsys", "rsp"); - Pattern compile = Pattern.compile("Dict.*"); - for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/java/module/wsys/ent/")) { - if (compile.matcher(name).find()) { - freeMarkerManager.outputTemp(Tool.createFile(ent, name), "SpringBoot/java/module/wsys/ent/" + name, ctx); + Module wsysModule = tryGetModule(project, "wsys"); + if (wsysModule == null || !wsysModule.getNeedGenerate()) {// 防止与系统冲突,一般不会重复,通常是架构重新设计时遇到 + HashMap ctx = new HashMap(); + ctx.put("project", project); + ctx.put("domain", project.getDomain()); + ctx.put("author", project.getAuthor()); + ctx.put("dataBase", project.getDatabase().toString()); + File ent = Tool.createPath(root, "wsys", "ent"); + File mpr = Tool.createPath(root, "wsys", "mpr"); + File mgr = Tool.createPath(root, "wsys", "mgr"); + File req = Tool.createPath(root, "wsys", "req"); + File rsp = Tool.createPath(root, "wsys", "rsp"); + Pattern compile = Pattern.compile("Dict.*"); + for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/java/module/wsys/ent/")) { + if (compile.matcher(name).find()) { + freeMarkerManager.outputTemp(Tool.createFile(ent, name), "SpringBoot/java/module/wsys/ent/" + name, ctx); + } } - } - for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/java/module/wsys/mgr/")) { - if (compile.matcher(name).find()) { - freeMarkerManager.outputTemp(Tool.createFile(mgr, name), "SpringBoot/java/module/wsys/mgr/" + name, ctx); + for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/java/module/wsys/mgr/")) { + if (compile.matcher(name).find()) { + freeMarkerManager.outputTemp(Tool.createFile(mgr, name), "SpringBoot/java/module/wsys/mgr/" + name, ctx); + } } - } - for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/java/module/wsys/mpr/")) { - if (compile.matcher(name).find()) { - if (name.endsWith(".java")) { - freeMarkerManager.outputTemp(Tool.createFile(mpr, name), "SpringBoot/java/module/wsys/mpr/" + name, ctx); - } else if (name.contains(project.getDatabase().name())) { - freeMarkerManager.outputTemp(Tool.createFile(mpr, name.replaceAll(project.getDatabase().name() + "_", "")), "SpringBoot/java/module/wsys/mpr/" + name, ctx); + for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/java/module/wsys/mpr/")) { + if (compile.matcher(name).find()) { + if (name.endsWith(".java")) { + freeMarkerManager.outputTemp(Tool.createFile(mpr, name), "SpringBoot/java/module/wsys/mpr/" + name, ctx); + } else if (name.contains(project.getDatabase().name())) { + freeMarkerManager.outputTemp(Tool.createFile(mpr, name.replaceAll(project.getDatabase().name() + "_", "")), "SpringBoot/java/module/wsys/mpr/" + name, ctx); + } } } - } - for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/java/module/wsys/req/")) { - if (compile.matcher(name).find()) { - freeMarkerManager.outputTemp(Tool.createFile(req, name), "SpringBoot/java/module/wsys/req/" + name, ctx); + for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/java/module/wsys/req/")) { + if (compile.matcher(name).find()) { + freeMarkerManager.outputTemp(Tool.createFile(req, name), "SpringBoot/java/module/wsys/req/" + name, ctx); + } } - } - for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/java/module/wsys/rsp/")) { - if (compile.matcher(name).find()) { - freeMarkerManager.outputTemp(Tool.createFile(rsp, name), "SpringBoot/java/module/wsys/rsp/" + name, ctx); + for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/java/module/wsys/rsp/")) { + if (compile.matcher(name).find()) { + freeMarkerManager.outputTemp(Tool.createFile(rsp, name), "SpringBoot/java/module/wsys/rsp/" + name, ctx); + } } } } public void generateModuleFor网页框架(File root, Project project) { - HashMap ctx = new HashMap(); - ctx.put("project", project); - ctx.put("domain", project.getDomain()); - ctx.put("moduleName", "wsys"); - ctx.put("author", project.getAuthor()); - ctx.put("dataBase", project.getDatabase().toString()); + Module wsysModule = tryGetModule(project, "wsys"); + if (wsysModule == null || !wsysModule.getNeedGenerate()) {// 防止与系统冲突,一般不会重复,通常是架构重新设计时遇到 + HashMap ctx = new HashMap(); + ctx.put("project", project); + ctx.put("domain", project.getDomain()); + ctx.put("moduleName", "wsys"); + ctx.put("author", project.getAuthor()); + ctx.put("dataBase", project.getDatabase().toString()); - File ent = Tool.createPath(root, "wsys", "ent"); - File mpr = Tool.createPath(root, "wsys", "mpr"); - File mgr = Tool.createPath(root, "wsys", "mgr"); - File req = Tool.createPath(root, "wsys", "req"); - File rsp = Tool.createPath(root, "wsys", "rsp"); - for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/java/module/wsys/ent/")) { - freeMarkerManager.outputTemp(Tool.createFile(ent, name), "SpringBoot/java/module/wsys/ent/" + name, ctx); - } + File ent = Tool.createPath(root, "wsys", "ent"); + File mpr = Tool.createPath(root, "wsys", "mpr"); + File mgr = Tool.createPath(root, "wsys", "mgr"); + File req = Tool.createPath(root, "wsys", "req"); + File rsp = Tool.createPath(root, "wsys", "rsp"); + for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/java/module/wsys/ent/")) { + freeMarkerManager.outputTemp(Tool.createFile(ent, name), "SpringBoot/java/module/wsys/ent/" + name, ctx); + } - for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/java/module/wsys/mgr/")) { - if (name.contains("TokensManager") && project.getFrame().value() < Frame.接口框架.value()) {// 当不需要Web和Api时不需要处理Token问题 - continue; + for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/java/module/wsys/mgr/")) { + if (name.contains("TokensManager") && project.getFrame().value() < Frame.接口框架.value()) {// 当不需要Web和Api时不需要处理Token问题 + continue; + } + freeMarkerManager.outputTemp(Tool.createFile(mgr, name), "SpringBoot/java/module/wsys/mgr/" + name, ctx); } - freeMarkerManager.outputTemp(Tool.createFile(mgr, name), "SpringBoot/java/module/wsys/mgr/" + name, ctx); - } - for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/java/module/wsys/mpr/")) { - if (name.endsWith(".java")) { - freeMarkerManager.outputTemp(Tool.createFile(mpr, name), "SpringBoot/java/module/wsys/mpr/" + name, ctx); - } else if (name.contains(project.getDatabase().name())) { - freeMarkerManager.outputTemp(Tool.createFile(mpr, name.replaceAll(project.getDatabase().name() + "_", "")), "SpringBoot/java/module/wsys/mpr/" + name, ctx); + for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/java/module/wsys/mpr/")) { + if (name.endsWith(".java")) { + freeMarkerManager.outputTemp(Tool.createFile(mpr, name), "SpringBoot/java/module/wsys/mpr/" + name, ctx); + } else if (name.contains(project.getDatabase().name())) { + freeMarkerManager.outputTemp(Tool.createFile(mpr, name.replaceAll(project.getDatabase().name() + "_", "")), "SpringBoot/java/module/wsys/mpr/" + name, ctx); + } } - } - for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/java/module/wsys/req/")) { - freeMarkerManager.outputTemp(Tool.createFile(req, name), "SpringBoot/java/module/wsys/req/" + name, ctx); - } + for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/java/module/wsys/req/")) { + freeMarkerManager.outputTemp(Tool.createFile(req, name), "SpringBoot/java/module/wsys/req/" + name, ctx); + } - for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/java/module/wsys/rsp/")) { - freeMarkerManager.outputTemp(Tool.createFile(rsp, name), "SpringBoot/java/module/wsys/rsp/" + name, ctx); + for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/java/module/wsys/rsp/")) { + freeMarkerManager.outputTemp(Tool.createFile(rsp, name), "SpringBoot/java/module/wsys/rsp/" + name, ctx); + } } } @@ -760,13 +769,20 @@ public class SpringBootCallable implements Callable { //生成网页 if (project.getFrame().value() >= Frame.网页框架.value()) { - File wsys = Tool.createPath(screen, "wsys"); - for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/resources/templates/screen/module/wsys/")) { - Tool.outputResource("SpringBoot/resources/templates/screen/module/wsys/" + name, Tool.createFile(wsys, name)); + Module wsysModule = tryGetModule(project, "wsys");// 防止与系统冲突,一般不会重复,通常是架构重新设计时遇到 + if (wsysModule == null || !wsysModule.getNeedGenerate()) { + File wsys = Tool.createPath(screen, "wsys"); + for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/resources/templates/screen/module/wsys/")) { + Tool.outputResource("SpringBoot/resources/templates/screen/module/wsys/" + name, Tool.createFile(wsys, name)); + } } - File wmnt = Tool.createPath(screen, "wmnt"); - for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/resources/templates/screen/module/wmnt/")) { - Tool.outputResource("SpringBoot/resources/templates/screen/module/wmnt/" + name, Tool.createFile(wmnt, name)); + + Module wsvrModule = tryGetModule(project, "wsvr");// 防止与系统冲突,一般不会重复,通常是架构重新设计时遇到 + if (wsvrModule == null || !wsvrModule.getNeedGenerate()) { + File wsvr = Tool.createPath(screen, "wsvr"); + for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/resources/templates/screen/module/wsvr/")) { + Tool.outputResource("SpringBoot/resources/templates/screen/module/wsvr/" + name, Tool.createFile(wsvr, name)); + } } } } @@ -882,4 +898,13 @@ public class SpringBootCallable implements Callable { freeMarkerManager.outputTemp(Tool.createFile(root, "ExcelTest.java"), "SpringBoot/test/ExcelTest.java", ctx); } } + + private Module tryGetModule(Project project, String moduleName) { + for (Module module : project.getModules()) { + if (module.getModuleName().equals(moduleName)) { + return module; + } + } + return null; + } } diff --git a/src/main/java/xyz/wbsite/dbtool/javafx/po/SelectItem.java b/src/main/java/xyz/wbsite/dbtool/javafx/po/SelectItem.java index 5df0f254..add8b826 100644 --- a/src/main/java/xyz/wbsite/dbtool/javafx/po/SelectItem.java +++ b/src/main/java/xyz/wbsite/dbtool/javafx/po/SelectItem.java @@ -6,6 +6,8 @@ import xyz.wbsite.dbtool.javafx.annotation.Property; public class SelectItem { @Property("value") private String value; + @Property("label") + private String label; public String getValue() { return value; @@ -14,4 +16,12 @@ public class SelectItem { public void setValue(String value) { this.value = value; } + + public String getLabel() { + return label; + } + + public void setLabel(String label) { + this.label = label; + } } diff --git a/src/main/resources/fxml/OptionSelect.fxml b/src/main/resources/fxml/OptionSelect.fxml index 00972ea2..3745b167 100644 --- a/src/main/resources/fxml/OptionSelect.fxml +++ b/src/main/resources/fxml/OptionSelect.fxml @@ -24,7 +24,8 @@
- + +
diff --git a/src/main/resources/modules/SpringBoot/java/action/ajax/wmnt/LogErrAjax.java b/src/main/resources/modules/SpringBoot/java/action/ajax/wsvr/LogerrAjax.java similarity index 51% rename from src/main/resources/modules/SpringBoot/java/action/ajax/wmnt/LogErrAjax.java rename to src/main/resources/modules/SpringBoot/java/action/ajax/wsvr/LogerrAjax.java index 320fc0a6..89110450 100644 --- a/src/main/resources/modules/SpringBoot/java/action/ajax/wmnt/LogErrAjax.java +++ b/src/main/resources/modules/SpringBoot/java/action/ajax/wsvr/LogerrAjax.java @@ -1,4 +1,4 @@ -package ${domain}.action.ajax.wmnt; +package ${domain}.action.ajax.wsvr; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.multipart.MultipartFile; @@ -11,63 +11,63 @@ import ${domain}.frame.utils.LogUtil; import ${domain}.frame.utils.MapperUtil; import ${domain}.frame.utils.ResponseUtil; import ${domain}.frame.utils.ValidationUtil; -import ${domain}.module.wsys.ent.LogErr; -import ${domain}.module.wsys.mgr.LogErrManager; -import ${domain}.module.wsys.req.LogErrCreateRequest; -import ${domain}.module.wsys.req.LogErrDeleteRequest; -import ${domain}.module.wsys.req.LogErrFindRequest; -import ${domain}.module.wsys.req.LogErrUpdateRequest; -import ${domain}.module.wsys.rsp.LogErrCreateResponse; -import ${domain}.module.wsys.rsp.LogErrDeleteResponse; -import ${domain}.module.wsys.rsp.LogErrFindResponse; -import ${domain}.module.wsys.rsp.LogErrUpdateResponse; +import ${domain}.module.wsvr.ent.Logerr; +import ${domain}.module.wsvr.mgr.LogerrManager; +import ${domain}.module.wsvr.req.LogerrCreateRequest; +import ${domain}.module.wsvr.req.LogerrDeleteRequest; +import ${domain}.module.wsvr.req.LogerrFindRequest; +import ${domain}.module.wsvr.req.LogerrUpdateRequest; +import ${domain}.module.wsvr.rsp.LogerrCreateResponse; +import ${domain}.module.wsvr.rsp.LogerrDeleteResponse; +import ${domain}.module.wsvr.rsp.LogerrFindResponse; +import ${domain}.module.wsvr.rsp.LogerrUpdateResponse; import java.io.IOException; import java.util.List; -public class LogErrAjax { +public class LogerrAjax { @Autowired - private LogErrManager logErrManager; + private LogerrManager logerrManager; - public LogErrCreateResponse create(LogErrCreateRequest request) { - return logErrManager.create(request, LocalData.getToken()); + public LogerrCreateResponse create(LogerrCreateRequest request) { + return logerrManager.create(request, LocalData.getToken()); } - public LogErrDeleteResponse delete(LogErrDeleteRequest request) { - return logErrManager.delete(request, LocalData.getToken()); + public LogerrDeleteResponse delete(LogerrDeleteRequest request) { + return logerrManager.delete(request, LocalData.getToken()); } - public LogErrUpdateResponse update(LogErrUpdateRequest request) { - return logErrManager.update(request, LocalData.getToken()); + public LogerrUpdateResponse update(LogerrUpdateRequest request) { + return logerrManager.update(request, LocalData.getToken()); } - public LogErrFindResponse find(LogErrFindRequest request) { - return logErrManager.find(request, LocalData.getToken()); + public LogerrFindResponse find(LogerrFindRequest request) { + return logerrManager.find(request, LocalData.getToken()); } public Object template(){ - return ResponseUtil.apply(new WExcel<>(LogErr.class)); + return ResponseUtil.apply(new WExcel<>(Logerr.class)); } - public Object exports(LogErrFindRequest request) { - LogErrFindResponse response = logErrManager.find(request, LocalData.getToken()); + public Object exports(LogerrFindRequest request) { + LogerrFindResponse response = logerrManager.find(request, LocalData.getToken()); if (response.hasError()) { return response; } else if (response.getTotalCount() == 0) { response.addError(ErrorType.BUSINESS_ERROR, "导出数据为空"); return response; } - return ResponseUtil.apply(new WExcel<>(LogErr.class).addDatas(response.getResult())); + return ResponseUtil.apply(new WExcel<>(Logerr.class).addDatas(response.getResult())); } public Object imports(MultipartFile file) { BaseResponse baseResponse = new BaseResponse(); try { - WExcel sheet = new WExcel<>(LogErr.class).read(file.getBytes(), new WExcel.Processor() { + WExcel sheet = new WExcel<>(Logerr.class).read(file.getBytes(), new WExcel.Processor() { @Override - public List exec(LogErr o, int index) { - LogErrCreateRequest request = MapperUtil.map(o, LogErrCreateRequest.class); + public List exec(Logerr o, int index) { + LogerrCreateRequest request = MapperUtil.map(o, LogerrCreateRequest.class); return ValidationUtil.validate(request); } }); diff --git a/src/main/resources/modules/SpringBoot/java/action/ajax/wsys/ProfilesAjax.java b/src/main/resources/modules/SpringBoot/java/action/ajax/wsvr/ProfilesAjax.java similarity index 83% rename from src/main/resources/modules/SpringBoot/java/action/ajax/wsys/ProfilesAjax.java rename to src/main/resources/modules/SpringBoot/java/action/ajax/wsvr/ProfilesAjax.java index 75648520..54c411ed 100644 --- a/src/main/resources/modules/SpringBoot/java/action/ajax/wsys/ProfilesAjax.java +++ b/src/main/resources/modules/SpringBoot/java/action/ajax/wsvr/ProfilesAjax.java @@ -1,4 +1,4 @@ -package ${domain}.action.ajax.wsys; +package ${domain}.action.ajax.wsvr; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.multipart.MultipartFile; @@ -11,16 +11,16 @@ import ${domain}.frame.base.BaseResponse; import ${domain}.frame.utils.ResponseUtil; import ${domain}.frame.utils.ValidationUtil; import ${domain}.frame.excel.exception.TemplateNotMatchException; -import ${domain}.module.wsys.ent.Profiles; -import ${domain}.module.wsys.mgr.ProfilesManager; -import ${domain}.module.wsys.req.ProfilesCreateRequest; -import ${domain}.module.wsys.req.ProfilesDeleteRequest; -import ${domain}.module.wsys.req.ProfilesFindRequest; -import ${domain}.module.wsys.req.ProfilesUpdateRequest; -import ${domain}.module.wsys.rsp.ProfilesCreateResponse; -import ${domain}.module.wsys.rsp.ProfilesDeleteResponse; -import ${domain}.module.wsys.rsp.ProfilesFindResponse; -import ${domain}.module.wsys.rsp.ProfilesUpdateResponse; +import ${domain}.module.wsvr.ent.Profiles; +import ${domain}.module.wsvr.mgr.ProfilesManager; +import ${domain}.module.wsvr.req.ProfilesCreateRequest; +import ${domain}.module.wsvr.req.ProfilesDeleteRequest; +import ${domain}.module.wsvr.req.ProfilesFindRequest; +import ${domain}.module.wsvr.req.ProfilesUpdateRequest; +import ${domain}.module.wsvr.rsp.ProfilesCreateResponse; +import ${domain}.module.wsvr.rsp.ProfilesDeleteResponse; +import ${domain}.module.wsvr.rsp.ProfilesFindResponse; +import ${domain}.module.wsvr.rsp.ProfilesUpdateResponse; import java.io.IOException; import java.util.List; diff --git a/src/main/resources/modules/SpringBoot/java/action/ajax/wmnt/ScheduleAjax.java b/src/main/resources/modules/SpringBoot/java/action/ajax/wsys/ScheduleAjax.java similarity index 100% rename from src/main/resources/modules/SpringBoot/java/action/ajax/wmnt/ScheduleAjax.java rename to src/main/resources/modules/SpringBoot/java/action/ajax/wsys/ScheduleAjax.java diff --git a/src/main/resources/modules/SpringBoot/java/frame/schedule/Scheduler.java b/src/main/resources/modules/SpringBoot/java/frame/schedule/Scheduler.java index c7e27c3a..ec50938e 100644 --- a/src/main/resources/modules/SpringBoot/java/frame/schedule/Scheduler.java +++ b/src/main/resources/modules/SpringBoot/java/frame/schedule/Scheduler.java @@ -83,7 +83,7 @@ public class Scheduler extends ThreadPoolTaskScheduler implements ErrorHandler { if (matcher.find()) { String taskName = matcher.group(1); String taskId = matcher.group(2); - ${domain}.module.wsys.mgr.LogErrManager logErrManager = xyz.wbsite.frame.auth.LocalData.getBean(${domain}.module.wsys.mgr.LogErrManager.class); + xyz.wbsite.module.wsvr.mgr.LogerrManager logErrManager = xyz.wbsite.frame.auth.LocalData.getBean(xyz.wbsite.module.wsvr.mgr.LogerrManager.class); if (logErrManager != null) logErrManager.addErr("SYS_ERR", "任务" + taskName + "执行错误", "任务" + taskName + "执行错误" + ",任务ID" + taskId); } diff --git a/src/main/resources/modules/SpringBoot/java/frame/validation/Select.java b/src/main/resources/modules/SpringBoot/java/frame/validation/Select.java index 2eb0ea45..71d0ea79 100644 --- a/src/main/resources/modules/SpringBoot/java/frame/validation/Select.java +++ b/src/main/resources/modules/SpringBoot/java/frame/validation/Select.java @@ -1,6 +1,7 @@ package ${domain}.frame.validation; import javax.validation.Constraint; +import javax.validation.Payload; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; @@ -15,4 +16,8 @@ public @interface Select { String message() default "选项验证错误"; String[] value() default {}; + + Class[] groups() default {}; + + Class[] payload() default {}; } diff --git a/src/main/resources/modules/SpringBoot/java/module/wsvr/ent/Logerr.java b/src/main/resources/modules/SpringBoot/java/module/wsvr/ent/Logerr.java new file mode 100644 index 00000000..a82bffd2 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/wsvr/ent/Logerr.java @@ -0,0 +1,74 @@ +package ${domain}.module.wsvr.ent; + +import com.alibaba.excel.annotation.ExcelProperty; +import ${domain}.frame.base.BaseEntity; +import ${domain}.frame.excel.annotation.ExcelNote; +import ${domain}.frame.excel.annotation.ExcelSheet; + +/** + * LOGERR - 错误日志 + * + * @author wangbing + * @version 0.0.1 + * @since 2020-07-06 + */ +@ExcelSheet("错误日志") +public class Logerr extends BaseEntity { + + /** + * LOG_TYPE - 日志类型 + */ + @ExcelProperty("日志类型") + @ExcelNote("") + private String logType; + /** + * LOG_TITLE - 任务标题 + */ + @ExcelProperty("任务标题") + @ExcelNote("") + private String logTitle; + /** + * LOG_NOTE - 日志描述 + */ + @ExcelProperty("日志描述") + @ExcelNote("") + private String logNote; + /** + * LOG_STATE - 日志状态 + */ + @ExcelProperty("日志状态") + @ExcelNote("") + private String logState; + + public String getLogType() { + return this.logType; + } + + public void setLogType(String logType) { + this.logType = logType; + } + + public String getLogTitle() { + return this.logTitle; + } + + public void setLogTitle(String logTitle) { + this.logTitle = logTitle; + } + + public String getLogNote() { + return this.logNote; + } + + public void setLogNote(String logNote) { + this.logNote = logNote; + } + + public String getLogState() { + return this.logState; + } + + public void setLogState(String logState) { + this.logState = logState; + } +} \ No newline at end of file diff --git a/src/main/resources/modules/SpringBoot/java/module/wsys/ent/Profiles.java b/src/main/resources/modules/SpringBoot/java/module/wsvr/ent/Profiles.java similarity index 83% rename from src/main/resources/modules/SpringBoot/java/module/wsys/ent/Profiles.java rename to src/main/resources/modules/SpringBoot/java/module/wsvr/ent/Profiles.java index de6f8874..86ba173c 100644 --- a/src/main/resources/modules/SpringBoot/java/module/wsys/ent/Profiles.java +++ b/src/main/resources/modules/SpringBoot/java/module/wsvr/ent/Profiles.java @@ -1,16 +1,16 @@ -package ${domain}.module.wsys.ent; +package ${domain}.module.wsvr.ent; +import com.alibaba.excel.annotation.ExcelProperty; import ${domain}.frame.base.BaseEntity; import ${domain}.frame.excel.annotation.ExcelNote; -import com.alibaba.excel.annotation.ExcelProperty; import ${domain}.frame.excel.annotation.ExcelSheet; /** * PROFILES - 系统配置 * - * @author author + * @author wangbing * @version 0.0.1 - * @since 2020-05-24 + * @since 2020-07-06 */ @ExcelSheet("系统配置") public class Profiles extends BaseEntity { @@ -22,15 +22,15 @@ public class Profiles extends BaseEntity { @ExcelNote("") private String active; /** - * KEY - 键 + * KEY - 配置键 */ - @ExcelProperty("键") + @ExcelProperty("配置键") @ExcelNote("") private String key; /** - * VALUE - 值 + * VALUE - 配置值 */ - @ExcelProperty("值") + @ExcelProperty("配置值") @ExcelNote("") private String value; diff --git a/src/main/resources/modules/SpringBoot/java/module/wsvr/mgr/LogerrManager.java b/src/main/resources/modules/SpringBoot/java/module/wsvr/mgr/LogerrManager.java new file mode 100644 index 00000000..715348b8 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/wsvr/mgr/LogerrManager.java @@ -0,0 +1,67 @@ +package ${domain}.module.wsvr.mgr; + +import ${domain}.frame.auth.Token; +import ${domain}.module.wsvr.req.LogerrCreateRequest; +import ${domain}.module.wsvr.req.LogerrDeleteRequest; +import ${domain}.module.wsvr.req.LogerrFindRequest; +import ${domain}.module.wsvr.req.LogerrUpdateRequest; +import ${domain}.module.wsvr.rsp.LogerrCreateResponse; +import ${domain}.module.wsvr.rsp.LogerrDeleteResponse; +import ${domain}.module.wsvr.rsp.LogerrFindResponse; +import ${domain}.module.wsvr.rsp.LogerrUpdateResponse; + +/** + * 错误日志 + * + * @author wangbing + * @version 0.0.1 + * @since 2020-07-06 + */ +public interface LogerrManager { + + /** + * 插入 + * + * @param request 请求对象 + * @param token 令牌 + * @return + */ + LogerrCreateResponse create(LogerrCreateRequest request, Token token); + + /** + * 逻辑删除 + * + * @param request 请求对象 + * @param token 令牌 + * @return + */ + LogerrDeleteResponse delete(LogerrDeleteRequest request, Token token); + + /** + * 更新 + * + * @param request 请求对象 + * @param token 令牌 + * @return + */ + LogerrUpdateResponse update(LogerrUpdateRequest request, Token token); + + /** + * 查询 + * + * @param request 请求对象 + * @param token 令牌 + * @return + */ + LogerrFindResponse find(LogerrFindRequest request, Token token); + + /** + * 快速添加错误日志 + * + * @param logType 日志类型 + * @param logTitle 标题 + * @param logNote 描述 + * @return + */ + boolean addErr(String logType, String logTitle, String logNote); +} diff --git a/src/main/resources/modules/SpringBoot/java/module/wsys/mgr/LogErrManagerImpl.java b/src/main/resources/modules/SpringBoot/java/module/wsvr/mgr/LogerrManagerImpl.java similarity index 61% rename from src/main/resources/modules/SpringBoot/java/module/wsys/mgr/LogErrManagerImpl.java rename to src/main/resources/modules/SpringBoot/java/module/wsvr/mgr/LogerrManagerImpl.java index 07e57348..d4df4669 100644 --- a/src/main/resources/modules/SpringBoot/java/module/wsys/mgr/LogErrManagerImpl.java +++ b/src/main/resources/modules/SpringBoot/java/module/wsvr/mgr/LogerrManagerImpl.java @@ -1,4 +1,4 @@ -package ${domain}.module.wsys.mgr; +package ${domain}.module.wsvr.mgr; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; @@ -7,36 +7,36 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import ${domain}.frame.auth.LocalData; -import ${domain}.frame.base.ErrorType; import ${domain}.frame.auth.Token; +import ${domain}.frame.base.ErrorType; import ${domain}.frame.utils.IDgenerator; import ${domain}.frame.utils.MapperUtil; import ${domain}.frame.utils.Message; import ${domain}.frame.utils.ValidationUtil; -import ${domain}.module.wsys.ent.LogErr; -import ${domain}.module.wsys.mpr.LogErrMapper; -import ${domain}.module.wsys.req.LogErrCreateRequest; -import ${domain}.module.wsys.req.LogErrDeleteRequest; -import ${domain}.module.wsys.req.LogErrFindRequest; -import ${domain}.module.wsys.req.LogErrUpdateRequest; -import ${domain}.module.wsys.rsp.LogErrCreateResponse; -import ${domain}.module.wsys.rsp.LogErrDeleteResponse; -import ${domain}.module.wsys.rsp.LogErrFindResponse; -import ${domain}.module.wsys.rsp.LogErrUpdateResponse; +import ${domain}.module.wsvr.ent.Logerr; +import ${domain}.module.wsvr.mpr.LogerrMapper; +import ${domain}.module.wsvr.req.LogerrCreateRequest; +import ${domain}.module.wsvr.req.LogerrDeleteRequest; +import ${domain}.module.wsvr.req.LogerrFindRequest; +import ${domain}.module.wsvr.req.LogerrUpdateRequest; +import ${domain}.module.wsvr.rsp.LogerrCreateResponse; +import ${domain}.module.wsvr.rsp.LogerrDeleteResponse; +import ${domain}.module.wsvr.rsp.LogerrFindResponse; +import ${domain}.module.wsvr.rsp.LogerrUpdateResponse; /** - * LOG_ERR - 错误日志 + * LOGERR - 错误日志 * * @author wangbing * @version 0.0.1 - * @since 2017-01-01 + * @since 2020-07-06 */ @Transactional @Service -public class LogErrManagerImpl implements LogErrManager { +public class LogerrManagerImpl implements LogerrManager { @Autowired - private LogErrMapper logErrMapper; + private LogerrMapper logerrMapper; /** * 插入 @@ -45,8 +45,8 @@ public class LogErrManagerImpl implements LogErrManager { * @param token 令牌 * @return 响应 */ - public LogErrCreateResponse create(LogErrCreateRequest request, Token token) { - LogErrCreateResponse response = new LogErrCreateResponse(); + public LogerrCreateResponse create(LogerrCreateRequest request, Token token) { + LogerrCreateResponse response = new LogerrCreateResponse(); ValidationUtil.validate(request, response); if (response.hasError()) { @@ -54,10 +54,10 @@ public class LogErrManagerImpl implements LogErrManager { } long id = IDgenerator.nextId(); - LogErr entity = MapperUtil.map(request, LogErr.class); + ${domain}.module.wsvr.ent.Logerr entity = MapperUtil.map(request, ${domain}.module.wsvr.ent.Logerr.class); entity.setId(id); - long result = logErrMapper.insert(entity, token); + long result = logerrMapper.insert(entity, token); if (1L != result) { response.addError(ErrorType.BUSINESS_ERROR, Message.CREATE_FAILURE); return response; @@ -74,15 +74,15 @@ public class LogErrManagerImpl implements LogErrManager { * @param token 令牌 * @return 响应 */ - public LogErrDeleteResponse delete(LogErrDeleteRequest request, Token token) { - LogErrDeleteResponse response = new LogErrDeleteResponse(); + public LogerrDeleteResponse delete(LogerrDeleteRequest request, Token token) { + LogerrDeleteResponse response = new LogerrDeleteResponse(); ValidationUtil.validate(request, response); if (response.hasError()) { return response; } - long result = logErrMapper.delete(request.getId(), token); + long result = logerrMapper.delete(request.getId(), token); if (1L != result) { response.addError(ErrorType.BUSINESS_ERROR, Message.DELETE_FAILURE); return response; @@ -99,22 +99,22 @@ public class LogErrManagerImpl implements LogErrManager { * @param token 令牌 * @return 响应 */ - public LogErrUpdateResponse update(LogErrUpdateRequest request, Token token) { - LogErrUpdateResponse response = new LogErrUpdateResponse(); + public LogerrUpdateResponse update(LogerrUpdateRequest request, Token token) { + LogerrUpdateResponse response = new LogerrUpdateResponse(); ValidationUtil.validate(request, response); if (response.hasError()) { return response; } - LogErr entity = logErrMapper.getById(request.getId(), token); + ${domain}.module.wsvr.ent.Logerr entity = logerrMapper.getById(request.getId(), token); if (entity == null) { - response.addError(ErrorType.BUSINESS_ERROR, Message.GET_FAILURE); - return response; + response.addError(ErrorType.BUSINESS_ERROR, Message.GET_FAILURE); + return response; } MapperUtil.map(request, entity); - long result = logErrMapper.update(entity, token); + long result = logerrMapper.update(entity, token); if (1L != result) { response.addError(ErrorType.BUSINESS_ERROR, Message.UPDATE_FAILURE); return response; @@ -132,8 +132,8 @@ public class LogErrManagerImpl implements LogErrManager { * @return 响应 */ @Transactional(readOnly = true) - public LogErrFindResponse find(LogErrFindRequest request, Token token) { - LogErrFindResponse response = new LogErrFindResponse(); + public LogerrFindResponse find(LogerrFindRequest request, Token token) { + LogerrFindResponse response = new LogerrFindResponse(); ValidationUtil.validate(request, response); if (response.hasError()) { @@ -146,7 +146,7 @@ public class LogErrManagerImpl implements LogErrManager { if (StringUtil.isNotEmpty(request.getSortKey())) { PageHelper.orderBy(request.getSortKey() + " " + request.getSortType()); } - PageInfo pageInfo = new PageInfo<>(logErrMapper.find(request, token)); + PageInfo<${domain}.module.wsvr.ent.Logerr> pageInfo = new PageInfo<>(logerrMapper.find(request, token)); response.setResult(pageInfo.getList()); response.setTotalCount(pageInfo.getTotal()); @@ -157,20 +157,20 @@ public class LogErrManagerImpl implements LogErrManager { /** * 快速添加错误日志 * - * @param LogErrType SYS_ERR、BIZ_ERR + * @param logType 日志类型 * @param logTitle 标题 * @param logNote 描述 * @return */ - public boolean addErr(String LogErrType, String logTitle, String logNote){ - LogErr entity = new LogErr(); + public boolean addErr(String logType, String logTitle, String logNote){ + Logerr entity = new Logerr(); entity.setId(IDgenerator.nextId()); entity.setLogTitle(logTitle); entity.setLogNote(logNote); - entity.setLogErrType(LogErrType); - entity.setLogErrResult("0"); + entity.setLogType(logType); + entity.setLogState("0"); - long result = logErrMapper.insert(entity, LocalData.getSysToken()); + long result = logerrMapper.insert(entity, LocalData.getSysToken()); if (1L != result) { return false; } diff --git a/src/main/resources/modules/SpringBoot/java/module/wsys/mgr/ProfilesManager.java b/src/main/resources/modules/SpringBoot/java/module/wsvr/mgr/ProfilesManager.java similarity index 73% rename from src/main/resources/modules/SpringBoot/java/module/wsys/mgr/ProfilesManager.java rename to src/main/resources/modules/SpringBoot/java/module/wsvr/mgr/ProfilesManager.java index ee8723bb..1064c06f 100644 --- a/src/main/resources/modules/SpringBoot/java/module/wsys/mgr/ProfilesManager.java +++ b/src/main/resources/modules/SpringBoot/java/module/wsvr/mgr/ProfilesManager.java @@ -1,21 +1,21 @@ -package ${domain}.module.wsys.mgr; +package ${domain}.module.wsvr.mgr; import ${domain}.frame.auth.Token; -import ${domain}.module.wsys.req.ProfilesCreateRequest; -import ${domain}.module.wsys.req.ProfilesDeleteRequest; -import ${domain}.module.wsys.req.ProfilesFindRequest; -import ${domain}.module.wsys.req.ProfilesUpdateRequest; -import ${domain}.module.wsys.rsp.ProfilesCreateResponse; -import ${domain}.module.wsys.rsp.ProfilesDeleteResponse; -import ${domain}.module.wsys.rsp.ProfilesFindResponse; -import ${domain}.module.wsys.rsp.ProfilesUpdateResponse; +import ${domain}.module.wsvr.req.ProfilesCreateRequest; +import ${domain}.module.wsvr.req.ProfilesDeleteRequest; +import ${domain}.module.wsvr.req.ProfilesFindRequest; +import ${domain}.module.wsvr.req.ProfilesUpdateRequest; +import ${domain}.module.wsvr.rsp.ProfilesCreateResponse; +import ${domain}.module.wsvr.rsp.ProfilesDeleteResponse; +import ${domain}.module.wsvr.rsp.ProfilesFindResponse; +import ${domain}.module.wsvr.rsp.ProfilesUpdateResponse; /** * 系统配置 * - * @author author + * @author wangbing * @version 0.0.1 - * @since 2020-05-24 + * @since 2020-07-06 */ public interface ProfilesManager { diff --git a/src/main/resources/modules/SpringBoot/java/module/wsys/mgr/ProfilesManagerImpl.java b/src/main/resources/modules/SpringBoot/java/module/wsvr/mgr/ProfilesManagerImpl.java similarity index 84% rename from src/main/resources/modules/SpringBoot/java/module/wsys/mgr/ProfilesManagerImpl.java rename to src/main/resources/modules/SpringBoot/java/module/wsvr/mgr/ProfilesManagerImpl.java index ccdc160c..baf660d9 100644 --- a/src/main/resources/modules/SpringBoot/java/module/wsys/mgr/ProfilesManagerImpl.java +++ b/src/main/resources/modules/SpringBoot/java/module/wsvr/mgr/ProfilesManagerImpl.java @@ -1,7 +1,8 @@ -package ${domain}.module.wsys.mgr; +package ${domain}.module.wsvr.mgr; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; +import com.github.pagehelper.util.StringUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -11,30 +12,27 @@ import ${domain}.frame.base.ErrorType; import ${domain}.frame.utils.IDgenerator; import ${domain}.frame.utils.MapperUtil; import ${domain}.frame.utils.Message; -import ${domain}.frame.utils.StringUtil; import ${domain}.frame.utils.ValidationUtil; -import ${domain}.module.wsys.ent.Profiles; -import ${domain}.module.wsys.mpr.ProfilesMapper; -import ${domain}.module.wsys.req.ProfilesCreateRequest; -import ${domain}.module.wsys.req.ProfilesDeleteRequest; -import ${domain}.module.wsys.req.ProfilesFindRequest; -import ${domain}.module.wsys.req.ProfilesUpdateRequest; -import ${domain}.module.wsys.rsp.ProfilesCreateResponse; -import ${domain}.module.wsys.rsp.ProfilesDeleteResponse; -import ${domain}.module.wsys.rsp.ProfilesFindResponse; -import ${domain}.module.wsys.rsp.ProfilesUpdateResponse; - +import ${domain}.module.wsvr.mpr.ProfilesMapper; +import ${domain}.module.wsvr.req.ProfilesCreateRequest; +import ${domain}.module.wsvr.req.ProfilesDeleteRequest; +import ${domain}.module.wsvr.req.ProfilesFindRequest; +import ${domain}.module.wsvr.req.ProfilesUpdateRequest; +import ${domain}.module.wsvr.rsp.ProfilesCreateResponse; +import ${domain}.module.wsvr.rsp.ProfilesDeleteResponse; +import ${domain}.module.wsvr.rsp.ProfilesFindResponse; +import ${domain}.module.wsvr.rsp.ProfilesUpdateResponse; /** * PROFILES - 系统配置 * - * @author author + * @author wangbing * @version 0.0.1 - * @since 2020-05-24 + * @since 2020-07-06 */ @Transactional @Service -public class ProfilesManagerImpl implements ProfilesManager { +public class ProfilesManagerImpl implements ${domain}.module.wsvr.mgr.ProfilesManager { @Autowired private ProfilesMapper profilesMapper; @@ -54,22 +52,21 @@ public class ProfilesManagerImpl implements ProfilesManager { return response; } - {// 键唯一检查 + {// 配置键唯一检查 ProfilesFindRequest profilesFindRequest = new ProfilesFindRequest(); - profilesFindRequest.setActive(request.getActive()); profilesFindRequest.setKey(request.getKey()); ProfilesFindResponse profilesFindResponse = this.find(profilesFindRequest, token); if (profilesFindResponse.hasError()) { response.addErrors(profilesFindResponse.getErrors()); return response; } else if (profilesFindResponse.getTotalCount() > 0) { - response.addError(ErrorType.UNIQUENESS_ERROR, "[" + request.getKey() + "]键已存在,请检查!"); + response.addError(ErrorType.UNIQUENESS_ERROR, "[key]配置键已存在,请检查!"); return response; } } long id = IDgenerator.nextId(); - Profiles entity = MapperUtil.map(request, Profiles.class); + ${domain}.module.wsvr.ent.Profiles entity = MapperUtil.map(request, ${domain}.module.wsvr.ent.Profiles.class); entity.setId(id); long result = profilesMapper.insert(entity, token); @@ -122,7 +119,7 @@ public class ProfilesManagerImpl implements ProfilesManager { return response; } - Profiles entity = profilesMapper.getById(request.getId(), token); + ${domain}.module.wsvr.ent.Profiles entity = profilesMapper.getById(request.getId(), token); if (entity == null) { response.addError(ErrorType.BUSINESS_ERROR, Message.GET_FAILURE); return response; @@ -161,7 +158,7 @@ public class ProfilesManagerImpl implements ProfilesManager { if (StringUtil.isNotEmpty(request.getSortKey())) { PageHelper.orderBy(request.getSortKey() + " " + request.getSortType()); } - PageInfo pageInfo = new PageInfo<>(profilesMapper.find(request, token)); + PageInfo<${domain}.module.wsvr.ent.Profiles> pageInfo = new PageInfo<>(profilesMapper.find(request, token)); response.setResult(pageInfo.getList()); response.setTotalCount(pageInfo.getTotal()); diff --git a/src/main/resources/modules/SpringBoot/java/module/wsys/mpr/LogErrMapper.java b/src/main/resources/modules/SpringBoot/java/module/wsvr/mpr/LogerrMapper.java similarity index 71% rename from src/main/resources/modules/SpringBoot/java/module/wsys/mpr/LogErrMapper.java rename to src/main/resources/modules/SpringBoot/java/module/wsvr/mpr/LogerrMapper.java index cbced253..fc2dea0d 100644 --- a/src/main/resources/modules/SpringBoot/java/module/wsys/mpr/LogErrMapper.java +++ b/src/main/resources/modules/SpringBoot/java/module/wsvr/mpr/LogerrMapper.java @@ -1,21 +1,21 @@ -package ${domain}.module.wsys.mpr; +package ${domain}.module.wsvr.mpr; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import ${domain}.frame.auth.Token; -import ${domain}.module.wsys.ent.LogErr; -import ${domain}.module.wsys.req.LogErrFindRequest; +import ${domain}.module.wsvr.ent.Logerr; +import ${domain}.module.wsvr.req.LogerrFindRequest; import java.util.List; /** - * LOG_ERR - 错误日志 + * LOGERR - 错误日志 * * @author wangbing - * @since 2020-06-27 + * @since 2020-07-06 */ @Mapper -public interface LogErrMapper { +public interface LogerrMapper { /** * 插入 @@ -24,7 +24,7 @@ public interface LogErrMapper { * @param token 令牌 * @return 返回数量 */ - long insert(@Param("request") LogErr request, @Param("token") Token token); + long insert(@Param("request") Logerr request, @Param("token") Token token); /** * 批量插入 @@ -33,7 +33,7 @@ public interface LogErrMapper { * @param token 令牌 * @return 返回数量 */ - long insertBatch(@Param("list") List list, @Param("token") Token token); + long insertBatch(@Param("list") List list, @Param("token") Token token); /** * 逻辑删除 @@ -60,7 +60,7 @@ public interface LogErrMapper { * @param token 令牌 * @return 返回数量 */ - long update(@Param("request") LogErr request, @Param("token") Token token); + long update(@Param("request") Logerr request, @Param("token") Token token); /** * 查询 @@ -69,7 +69,7 @@ public interface LogErrMapper { * @param token 令牌 * @return 返回对象 */ - List find(@Param("request") LogErrFindRequest request, @Param("token") Token token); + List find(@Param("request") LogerrFindRequest request, @Param("token") Token token); /** * 获得对象 @@ -78,7 +78,7 @@ public interface LogErrMapper { * @param token 令牌 * @return 返回对象 */ - LogErr getById(@Param("id") Long id, @Param("token") Token token); + Logerr getById(@Param("id") Long id, @Param("token") Token token); /** * 获得对象 @@ -87,5 +87,5 @@ public interface LogErrMapper { * @param token 令牌 * @return 返回对象 */ - List getByIds(@Param("list") List list, @Param("token") Token token); + List getByIds(@Param("list") List list, @Param("token") Token token); } diff --git a/src/main/resources/modules/SpringBoot/java/module/wsys/mpr/ProfilesMapper.java b/src/main/resources/modules/SpringBoot/java/module/wsvr/mpr/ProfilesMapper.java similarity index 92% rename from src/main/resources/modules/SpringBoot/java/module/wsys/mpr/ProfilesMapper.java rename to src/main/resources/modules/SpringBoot/java/module/wsvr/mpr/ProfilesMapper.java index f033fe3f..a507e8fa 100644 --- a/src/main/resources/modules/SpringBoot/java/module/wsys/mpr/ProfilesMapper.java +++ b/src/main/resources/modules/SpringBoot/java/module/wsvr/mpr/ProfilesMapper.java @@ -1,10 +1,10 @@ -package ${domain}.module.wsys.mpr; +package ${domain}.module.wsvr.mpr; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import ${domain}.frame.auth.Token; -import ${domain}.module.wsys.ent.Profiles; -import ${domain}.module.wsys.req.ProfilesFindRequest; +import ${domain}.module.wsvr.ent.Profiles; +import ${domain}.module.wsvr.req.ProfilesFindRequest; import java.util.List; @@ -12,7 +12,7 @@ import java.util.List; * PROFILES - 系统配置 * * @author wangbing - * @since 2020-06-27 + * @since 2020-07-06 */ @Mapper public interface ProfilesMapper { diff --git a/src/main/resources/modules/SpringBoot/java/module/wsvr/mpr/SQLite_LogerrMapper.xml b/src/main/resources/modules/SpringBoot/java/module/wsvr/mpr/SQLite_LogerrMapper.xml new file mode 100644 index 00000000..49da4e5f --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/wsvr/mpr/SQLite_LogerrMapper.xml @@ -0,0 +1,157 @@ + + + + + "SYS_LOGERR" + + + "ID","LOG_TYPE","LOG_TITLE","LOG_NOTE","LOG_STATE","ROW_VERSION","IS_DELETED","CREATE_BY","CREATE_TIME","LAST_UPDATE_BY","LAST_UPDATE_TIME" + + + + + + + + + + + + + + + + + + INSERT INTO + + ( + + ) + VALUES + ( + ${r'#'}{request.id}, + ${r'#'}{request.logType,jdbcType=VARCHAR}, + ${r'#'}{request.logTitle,jdbcType=VARCHAR}, + ${r'#'}{request.logNote,jdbcType=VARCHAR}, + ${r'#'}{request.logState,jdbcType=VARCHAR}, + 0, + 0, + ${r'#'}{token.userId,jdbcType=NUMERIC}, + datetime('now','localtime'), + NULL, + NULL + ) + + + + INSERT INTO + + ( + + ) + VALUES + + ${r'#'}{item.id}, + ${r'#'}{item.logType,jdbcType=VARCHAR}, + ${r'#'}{item.logTitle,jdbcType=VARCHAR}, + ${r'#'}{item.logNote,jdbcType=VARCHAR}, + ${r'#'}{item.logState,jdbcType=VARCHAR}, + 0, + 0, + ${r'#'}{token.userId,jdbcType=NUMERIC}, + datetime('now','localtime'), + NULL, + NULL + + + + + UPDATE + + SET "IS_DELETED" = 1 + WHERE "IS_DELETED" = 0 + AND "ID" = ${r'#'}{id} + + + + UPDATE + + SET "IS_DELETED" = 1 + WHERE "IS_DELETED" = 0 + AND "ID" IN + + ${r'#'}{item} + + + + + UPDATE + + SET + LOG_TYPE = ${r'#'}{request.logType,jdbcType=VARCHAR}, + LOG_TITLE = ${r'#'}{request.logTitle,jdbcType=VARCHAR}, + LOG_NOTE = ${r'#'}{request.logNote,jdbcType=VARCHAR}, + LOG_STATE = ${r'#'}{request.logState,jdbcType=VARCHAR}, + "ROW_VERSION" = "ROW_VERSION" + 1, + "LAST_UPDATE_BY" = ${r'#'}{token.userId}, + "LAST_UPDATE_TIME" = datetime('now','localtime') + WHERE "IS_DELETED" = 0 + AND "ID" = ${r'#'}{request.id} + AND "ROW_VERSION" = ${r'#'}{request.rowVersion} + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/modules/SpringBoot/java/module/wsys/mpr/SQLite_ProfilesMapper.xml b/src/main/resources/modules/SpringBoot/java/module/wsvr/mpr/SQLite_ProfilesMapper.xml similarity index 73% rename from src/main/resources/modules/SpringBoot/java/module/wsys/mpr/SQLite_ProfilesMapper.xml rename to src/main/resources/modules/SpringBoot/java/module/wsvr/mpr/SQLite_ProfilesMapper.xml index fdab0dde..e0aa587a 100644 --- a/src/main/resources/modules/SpringBoot/java/module/wsys/mpr/SQLite_ProfilesMapper.xml +++ b/src/main/resources/modules/SpringBoot/java/module/wsvr/mpr/SQLite_ProfilesMapper.xml @@ -2,15 +2,15 @@ - + "SYS_PROFILES" - + "ID","ACTIVE","KEY","VALUE","ROW_VERSION","IS_DELETED","CREATE_BY","CREATE_TIME","LAST_UPDATE_BY","LAST_UPDATE_TIME" - - + + @@ -22,7 +22,7 @@ - + INSERT INTO @@ -31,13 +31,13 @@ ) VALUES ( - ${r"#"}{request.id}, - ${r"#"}{request.active,jdbcType=VARCHAR}, - ${r"#"}{request.key,jdbcType=VARCHAR}, - ${r"#"}{request.value,jdbcType=VARCHAR}, + ${r'#'}{request.id}, + ${r'#'}{request.active,jdbcType=VARCHAR}, + ${r'#'}{request.key,jdbcType=VARCHAR}, + ${r'#'}{request.value,jdbcType=VARCHAR}, 0, 0, - ${r"#"}{token.userId,jdbcType=NUMERIC}, + ${r'#'}{token.userId,jdbcType=NUMERIC}, datetime('now','localtime'), NULL, NULL @@ -52,19 +52,19 @@ ) VALUES - ${r"#"}{item.id}, - ${r"#"}{item.active,jdbcType=VARCHAR}, - ${r"#"}{item.key,jdbcType=VARCHAR}, - ${r"#"}{item.value,jdbcType=VARCHAR}, - 0, - 0, - ${r"#"}{token.userId,jdbcType=NUMERIC}, - datetime('now','localtime'), - NULL, - NULL + ${r'#'}{item.id}, + ${r'#'}{item.active,jdbcType=VARCHAR}, + ${r'#'}{item.key,jdbcType=VARCHAR}, + ${r'#'}{item.value,jdbcType=VARCHAR}, + 0, + 0, + ${r'#'}{token.userId,jdbcType=NUMERIC}, + datetime('now','localtime'), + NULL, + NULL - + UPDATE @@ -72,7 +72,7 @@ WHERE "IS_DELETED" = 0 AND "ID" = ${r'#'}{id} - + UPDATE @@ -80,23 +80,23 @@ WHERE "IS_DELETED" = 0 AND "ID" IN - ${r'#'}{item} - + ${r'#'}{item} + UPDATE SET - ACTIVE = ${r"#"}{request.active,jdbcType=VARCHAR}, - KEY = ${r"#"}{request.key,jdbcType=VARCHAR}, - VALUE = ${r"#"}{request.value,jdbcType=VARCHAR}, + ACTIVE = ${r'#'}{request.active,jdbcType=VARCHAR}, + KEY = ${r'#'}{request.key,jdbcType=VARCHAR}, + VALUE = ${r'#'}{request.value,jdbcType=VARCHAR}, "ROW_VERSION" = "ROW_VERSION" + 1, - "LAST_UPDATE_BY" = ${r"#"}{token.userId}, + "LAST_UPDATE_BY" = ${r'#'}{token.userId}, "LAST_UPDATE_TIME" = datetime('now','localtime') WHERE "IS_DELETED" = 0 - AND "ID" = ${r"#"}{request.id} - AND "ROW_VERSION" = ${r"#"}{request.rowVersion} + AND "ID" = ${r'#'}{request.id} + AND "ROW_VERSION" = ${r'#'}{request.rowVersion} @@ -125,8 +124,7 @@ FROM - WHERE - "IS_DELETED" = 0 + WHERE "IS_DELETED" = 0 - + \ No newline at end of file diff --git a/src/main/resources/modules/SpringBoot/java/module/wsvr/req/LogerrCreateRequest.java b/src/main/resources/modules/SpringBoot/java/module/wsvr/req/LogerrCreateRequest.java new file mode 100644 index 00000000..a9692cc7 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/wsvr/req/LogerrCreateRequest.java @@ -0,0 +1,77 @@ +package ${domain}.module.wsvr.req; + +import org.hibernate.validator.constraints.Length; +import ${domain}.frame.base.BaseRequest; +import ${domain}.frame.validation.Select; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; + +/** + * LogerrCreateRequest - 错误日志新增 + * + * @author wangbing + * @version 0.0.1 + * @since 2020-07-06 + */ +public class LogerrCreateRequest extends BaseRequest { + + /** + * 日志类型. + */ + @NotNull(message = "[logType]日志类型不能为NULL") + @Select({"系统错误", "任务错误", "业务错误"}) + private String logType; + + /** + * 任务标题. + */ + @NotBlank(message = "[logTitle]任务标题不能为空") + @Length(min = 0, max = 50, message = "[logTitle]任务标题长度不合法(0-50)") + private String logTitle; + + /** + * 日志描述. + */ + @Length(min = 0, max = 500, message = "[logNote]日志描述长度不合法(0-500)") + private String logNote; + + /** + * 日志状态. + */ + @NotNull(message = "[logState]日志状态不能为NULL") + @Select({"0", "1", "2"}) + private String logState; + + public String getLogType() { + return this.logType; + } + + public void setLogType(String logType) { + this.logType = logType; + } + + public String getLogTitle() { + return this.logTitle; + } + + public void setLogTitle(String logTitle) { + this.logTitle = logTitle; + } + + public String getLogNote() { + return this.logNote; + } + + public void setLogNote(String logNote) { + this.logNote = logNote; + } + + public String getLogState() { + return this.logState; + } + + public void setLogState(String logState) { + this.logState = logState; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/wsvr/req/LogerrDeleteRequest.java b/src/main/resources/modules/SpringBoot/java/module/wsvr/req/LogerrDeleteRequest.java new file mode 100644 index 00000000..fc3162d7 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/wsvr/req/LogerrDeleteRequest.java @@ -0,0 +1,29 @@ +package ${domain}.module.wsvr.req; + +import ${domain}.frame.base.BaseRequest; + +import javax.validation.constraints.NotNull; + +/** + * LogerrDeleteRequest - 错误日志删除 + * + * @author wangbing + * @version 0.0.1 + * @since 2020-07-06 + */ +public class LogerrDeleteRequest extends BaseRequest { + + /** + * 主键. + */ + @NotNull(message = "[id]主键不能为空") + private long id; + + public long getId() { + return this.id; + } + + public void setId(long id) { + this.id = id; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/wsys/req/LogErrFindRequest.java b/src/main/resources/modules/SpringBoot/java/module/wsvr/req/LogerrFindRequest.java similarity index 53% rename from src/main/resources/modules/SpringBoot/java/module/wsys/req/LogErrFindRequest.java rename to src/main/resources/modules/SpringBoot/java/module/wsvr/req/LogerrFindRequest.java index 3fac9a4d..e32007d7 100644 --- a/src/main/resources/modules/SpringBoot/java/module/wsys/req/LogErrFindRequest.java +++ b/src/main/resources/modules/SpringBoot/java/module/wsvr/req/LogerrFindRequest.java @@ -1,35 +1,35 @@ -package ${domain}.module.wsys.req; +package ${domain}.module.wsvr.req; import ${domain}.frame.base.BaseFindRequest; -import ${domain}.frame.validation.Dict; +import ${domain}.frame.validation.Select; import java.util.Date; /** - * LogErrFindRequest - 错误日志查询 + * LogerrFindRequest - 错误日志查询 * * @author wangbing * @version 0.0.1 - * @since 2020-06-07 + * @since 2020-07-06 */ -public class LogErrFindRequest extends BaseFindRequest { +public class LogerrFindRequest extends BaseFindRequest { /** - * 错误类型. + * 日志类型. */ - @Dict(name = "LOG_ERR_TYPE") - private String logErrType; + @Select({"系统错误", "任务错误", "业务错误"}) + private String logType; /** - * 日志标题. + * 任务标题. */ private String logTitle; /** - * 处理结果. + * 日志状态. */ - @Dict(name = "LOG_ERR_RESULT") - private String logErrResult; + @Select({"0", "1", "2"}) + private String logState; /** * 开始日期 @@ -41,12 +41,12 @@ public class LogErrFindRequest extends BaseFindRequest { */ private Date endDate; - public String getLogErrType() { - return this.logErrType; + public String getLogType() { + return this.logType; } - public void setLogErrType(String logErrType) { - this.logErrType = logErrType; + public void setLogType(String logType) { + this.logType = logType; } public String getLogTitle() { @@ -57,12 +57,12 @@ public class LogErrFindRequest extends BaseFindRequest { this.logTitle = logTitle; } - public String getLogErrResult() { - return this.logErrResult; + public String getLogState() { + return this.logState; } - public void setLogErrResult(String logErrResult) { - this.logErrResult = logErrResult; + public void setLogState(String logState) { + this.logState = logState; } public Date getStartDate() { diff --git a/src/main/resources/modules/SpringBoot/java/module/wsvr/req/LogerrUpdateRequest.java b/src/main/resources/modules/SpringBoot/java/module/wsvr/req/LogerrUpdateRequest.java new file mode 100644 index 00000000..0a33eca9 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/wsvr/req/LogerrUpdateRequest.java @@ -0,0 +1,91 @@ +package ${domain}.module.wsvr.req; + +import org.hibernate.validator.constraints.Length; +import ${domain}.frame.base.BaseUpdateRequest; +import ${domain}.frame.validation.Select; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; + +/** + * LogerrUpdateRequest - 错误日志更新 + * + * @author wangbing + * @version 0.0.1 + * @since 2020-07-06 + */ +public class LogerrUpdateRequest extends BaseUpdateRequest { + + /** + * 主键. + */ + @NotNull(message = "[id]主键不能为NULL") + private Long id; + + /** + * 日志类型. + */ + @NotNull(message = "[logType]日志类型不能为NULL") + @Select({"系统错误", "任务错误", "业务错误"}) + private String logType; + + /** + * 任务标题. + */ + @NotBlank(message = "[logTitle]任务标题不能为空") + @Length(min = 0, max = 50, message = "[logTitle]任务标题长度不合法(0-50)") + private String logTitle; + + /** + * 日志描述. + */ + @Length(min = 0, max = 500, message = "[logNote]日志描述长度不合法(0-500)") + private String logNote; + + /** + * 日志状态. + */ + @NotNull(message = "[logState]日志状态不能为NULL") + @Select({"0", "1", "2"}) + private String logState; + + public Long getId() { + return this.id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getLogType() { + return this.logType; + } + + public void setLogType(String logType) { + this.logType = logType; + } + + public String getLogTitle() { + return this.logTitle; + } + + public void setLogTitle(String logTitle) { + this.logTitle = logTitle; + } + + public String getLogNote() { + return this.logNote; + } + + public void setLogNote(String logNote) { + this.logNote = logNote; + } + + public String getLogState() { + return this.logState; + } + + public void setLogState(String logState) { + this.logState = logState; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/wsys/req/ProfilesCreateRequest.java b/src/main/resources/modules/SpringBoot/java/module/wsvr/req/ProfilesCreateRequest.java similarity index 67% rename from src/main/resources/modules/SpringBoot/java/module/wsys/req/ProfilesCreateRequest.java rename to src/main/resources/modules/SpringBoot/java/module/wsvr/req/ProfilesCreateRequest.java index 48c0a09a..56494cc1 100644 --- a/src/main/resources/modules/SpringBoot/java/module/wsys/req/ProfilesCreateRequest.java +++ b/src/main/resources/modules/SpringBoot/java/module/wsvr/req/ProfilesCreateRequest.java @@ -1,8 +1,8 @@ -package ${domain}.module.wsys.req; +package ${domain}.module.wsvr.req; -import ${domain}.frame.base.BaseRequest; -import ${domain}.frame.validation.Dict; import org.hibernate.validator.constraints.Length; +import ${domain}.frame.base.BaseRequest; +import ${domain}.frame.validation.Select; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; @@ -10,9 +10,9 @@ import javax.validation.constraints.NotNull; /** * ProfilesCreateRequest - 系统配置新增 * - * @author author + * @author wangbing * @version 0.0.1 - * @since 2020-05-24 + * @since 2020-07-06 */ public class ProfilesCreateRequest extends BaseRequest { @@ -20,21 +20,21 @@ public class ProfilesCreateRequest extends BaseRequest { * 环境. */ @NotNull(message = "[active]环境不能为NULL") - @Dict(name = "ACTIVE") + @Select({"dev", "prod"}) private String active; /** - * 键 + * 配置键. */ - @NotBlank(message = "[key]键不能为空") - @Length(min = 0, max = 50, message = "[key]键长度不合法(0-50)") + @NotBlank(message = "[key]配置键不能为空") + @Length(min = 0, max = 50, message = "[key]配置键长度不合法(0-50)") private String key; /** - * 值 + * 配置值. */ - @NotBlank(message = "[value]值不能为空") - @Length(min = 0, max = 50, message = "[value]值长度不合法(0-50)") + @NotBlank(message = "[value]配置值不能为空") + @Length(min = 0, max = 50, message = "[value]配置值长度不合法(0-50)") private String value; public String getActive() { diff --git a/src/main/resources/modules/SpringBoot/java/module/wsys/req/ProfilesDeleteRequest.java b/src/main/resources/modules/SpringBoot/java/module/wsvr/req/ProfilesDeleteRequest.java similarity index 82% rename from src/main/resources/modules/SpringBoot/java/module/wsys/req/ProfilesDeleteRequest.java rename to src/main/resources/modules/SpringBoot/java/module/wsvr/req/ProfilesDeleteRequest.java index cdbfe30f..75402ff2 100644 --- a/src/main/resources/modules/SpringBoot/java/module/wsys/req/ProfilesDeleteRequest.java +++ b/src/main/resources/modules/SpringBoot/java/module/wsvr/req/ProfilesDeleteRequest.java @@ -1,4 +1,4 @@ -package ${domain}.module.wsys.req; +package ${domain}.module.wsvr.req; import ${domain}.frame.base.BaseRequest; @@ -7,14 +7,14 @@ import javax.validation.constraints.NotNull; /** * ProfilesDeleteRequest - 系统配置删除 * - * @author author + * @author wangbing * @version 0.0.1 - * @since 2020-05-24 + * @since 2020-07-06 */ public class ProfilesDeleteRequest extends BaseRequest { /** - * 主键 + * 主键. */ @NotNull(message = "[id]主键不能为空") private long id; diff --git a/src/main/resources/modules/SpringBoot/java/module/wsys/req/ProfilesFindRequest.java b/src/main/resources/modules/SpringBoot/java/module/wsvr/req/ProfilesFindRequest.java similarity index 84% rename from src/main/resources/modules/SpringBoot/java/module/wsys/req/ProfilesFindRequest.java rename to src/main/resources/modules/SpringBoot/java/module/wsvr/req/ProfilesFindRequest.java index bf7efe29..37df30a4 100644 --- a/src/main/resources/modules/SpringBoot/java/module/wsys/req/ProfilesFindRequest.java +++ b/src/main/resources/modules/SpringBoot/java/module/wsvr/req/ProfilesFindRequest.java @@ -1,25 +1,27 @@ -package ${domain}.module.wsys.req; +package ${domain}.module.wsvr.req; import ${domain}.frame.base.BaseFindRequest; +import ${domain}.frame.validation.Select; import java.util.Date; /** * ProfilesFindRequest - 系统配置查询 * - * @author author + * @author wangbing * @version 0.0.1 - * @since 2020-05-24 + * @since 2020-07-06 */ public class ProfilesFindRequest extends BaseFindRequest { /** - * 环境 + * 环境. */ + @Select({"dev", "prod"}) private String active; /** - * 键 + * 配置键. */ private String key; diff --git a/src/main/resources/modules/SpringBoot/java/module/wsys/req/ProfilesUpdateRequest.java b/src/main/resources/modules/SpringBoot/java/module/wsvr/req/ProfilesUpdateRequest.java similarity index 71% rename from src/main/resources/modules/SpringBoot/java/module/wsys/req/ProfilesUpdateRequest.java rename to src/main/resources/modules/SpringBoot/java/module/wsvr/req/ProfilesUpdateRequest.java index ef528179..46b9ec40 100644 --- a/src/main/resources/modules/SpringBoot/java/module/wsys/req/ProfilesUpdateRequest.java +++ b/src/main/resources/modules/SpringBoot/java/module/wsvr/req/ProfilesUpdateRequest.java @@ -1,8 +1,8 @@ -package ${domain}.module.wsys.req; +package ${domain}.module.wsvr.req; -import ${domain}.frame.base.BaseUpdateRequest; -import ${domain}.frame.validation.Dict; import org.hibernate.validator.constraints.Length; +import ${domain}.frame.base.BaseUpdateRequest; +import ${domain}.frame.validation.Select; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; @@ -10,14 +10,14 @@ import javax.validation.constraints.NotNull; /** * ProfilesUpdateRequest - 系统配置更新 * - * @author author + * @author wangbing * @version 0.0.1 - * @since 2020-05-24 + * @since 2020-07-06 */ public class ProfilesUpdateRequest extends BaseUpdateRequest { /** - * 主键 + * 主键. */ @NotNull(message = "[id]主键不能为NULL") private Long id; @@ -26,21 +26,21 @@ public class ProfilesUpdateRequest extends BaseUpdateRequest { * 环境. */ @NotNull(message = "[active]环境不能为NULL") - @Dict(name = "ACTIVE") + @Select({"dev", "prod"}) private String active; /** - * 键 + * 配置键. */ - @NotBlank(message = "[key]键不能为空") - @Length(min = 0, max = 50, message = "[key]键长度不合法(0-50)") + @NotBlank(message = "[key]配置键不能为空") + @Length(min = 0, max = 50, message = "[key]配置键长度不合法(0-50)") private String key; /** - * 值 + * 配置值. */ - @NotBlank(message = "[value]值不能为空") - @Length(min = 0, max = 50, message = "[value]值长度不合法(0-50)") + @NotBlank(message = "[value]配置值不能为空") + @Length(min = 0, max = 50, message = "[value]配置值长度不合法(0-50)") private String value; public Long getId() { diff --git a/src/main/resources/modules/SpringBoot/java/module/wsvr/rsp/LogerrCreateResponse.java b/src/main/resources/modules/SpringBoot/java/module/wsvr/rsp/LogerrCreateResponse.java new file mode 100644 index 00000000..6bb1ef18 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/wsvr/rsp/LogerrCreateResponse.java @@ -0,0 +1,26 @@ +package ${domain}.module.wsvr.rsp; + +import ${domain}.frame.base.BaseResponse; + +/** + * LogerrCreateResponse - 错误日志 + * + * @author wangbing + * @version 0.0.1 + * @since 2020-07-06 + */ +public class LogerrCreateResponse extends BaseResponse { + + /** + * 主键 + */ + private Long id; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/wsvr/rsp/LogerrDeleteResponse.java b/src/main/resources/modules/SpringBoot/java/module/wsvr/rsp/LogerrDeleteResponse.java new file mode 100644 index 00000000..f41e8e90 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/wsvr/rsp/LogerrDeleteResponse.java @@ -0,0 +1,26 @@ +package ${domain}.module.wsvr.rsp; + +import ${domain}.frame.base.BaseResponse; + +/** + * LogerrDeleteResponse - 错误日志 + * + * @author wangbing + * @version 0.0.1 + * @since 2020-07-06 + */ +public class LogerrDeleteResponse extends BaseResponse { + + /** + * 删除数目 + */ + private Long result; + + public Long getResult() { + return this.result; + } + + public void setResult(Long result) { + this.result = result; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/wsvr/rsp/LogerrFindResponse.java b/src/main/resources/modules/SpringBoot/java/module/wsvr/rsp/LogerrFindResponse.java new file mode 100644 index 00000000..bc3773d8 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/wsvr/rsp/LogerrFindResponse.java @@ -0,0 +1,14 @@ +package ${domain}.module.wsvr.rsp; + +import ${domain}.frame.base.BaseFindResponse; +import ${domain}.module.wsvr.ent.Logerr; + +/** + * LogerrFindResponse - 错误日志 + * + * @author wangbing + * @version 0.0.1 + * @since 2020-07-06 + */ +public class LogerrFindResponse extends BaseFindResponse { +} \ No newline at end of file diff --git a/src/main/resources/modules/SpringBoot/java/module/wsvr/rsp/LogerrUpdateResponse.java b/src/main/resources/modules/SpringBoot/java/module/wsvr/rsp/LogerrUpdateResponse.java new file mode 100644 index 00000000..5690f4a3 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/wsvr/rsp/LogerrUpdateResponse.java @@ -0,0 +1,26 @@ +package ${domain}.module.wsvr.rsp; + +import ${domain}.frame.base.BaseResponse; + +/** + * LogerrUpdateResponse - 错误日志 + * + * @author wangbing + * @version 0.0.1 + * @since 2020-07-06 + */ +public class LogerrUpdateResponse extends BaseResponse { + + /** + * 更新数目 + */ + private Long result; + + public Long getResult() { + return this.result; + } + + public void setResult(Long result) { + this.result = result; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/wsys/rsp/ProfilesCreateResponse.java b/src/main/resources/modules/SpringBoot/java/module/wsvr/rsp/ProfilesCreateResponse.java similarity index 81% rename from src/main/resources/modules/SpringBoot/java/module/wsys/rsp/ProfilesCreateResponse.java rename to src/main/resources/modules/SpringBoot/java/module/wsvr/rsp/ProfilesCreateResponse.java index 5d437cea..695fcd7b 100644 --- a/src/main/resources/modules/SpringBoot/java/module/wsys/rsp/ProfilesCreateResponse.java +++ b/src/main/resources/modules/SpringBoot/java/module/wsvr/rsp/ProfilesCreateResponse.java @@ -1,13 +1,13 @@ -package ${domain}.module.wsys.rsp; +package ${domain}.module.wsvr.rsp; import ${domain}.frame.base.BaseResponse; /** * ProfilesCreateResponse - 系统配置 * - * @author author + * @author wangbing * @version 0.0.1 - * @since 2020-05-24 + * @since 2020-07-06 */ public class ProfilesCreateResponse extends BaseResponse { diff --git a/src/main/resources/modules/SpringBoot/java/module/wsys/rsp/ProfilesDeleteResponse.java b/src/main/resources/modules/SpringBoot/java/module/wsvr/rsp/ProfilesDeleteResponse.java similarity index 83% rename from src/main/resources/modules/SpringBoot/java/module/wsys/rsp/ProfilesDeleteResponse.java rename to src/main/resources/modules/SpringBoot/java/module/wsvr/rsp/ProfilesDeleteResponse.java index d83ef0dc..7ee70612 100644 --- a/src/main/resources/modules/SpringBoot/java/module/wsys/rsp/ProfilesDeleteResponse.java +++ b/src/main/resources/modules/SpringBoot/java/module/wsvr/rsp/ProfilesDeleteResponse.java @@ -1,13 +1,13 @@ -package ${domain}.module.wsys.rsp; +package ${domain}.module.wsvr.rsp; import ${domain}.frame.base.BaseResponse; /** * ProfilesDeleteResponse - 系统配置 * - * @author author + * @author wangbing * @version 0.0.1 - * @since 2020-05-24 + * @since 2020-07-06 */ public class ProfilesDeleteResponse extends BaseResponse { diff --git a/src/main/resources/modules/SpringBoot/java/module/wsvr/rsp/ProfilesFindResponse.java b/src/main/resources/modules/SpringBoot/java/module/wsvr/rsp/ProfilesFindResponse.java new file mode 100644 index 00000000..dd291569 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/wsvr/rsp/ProfilesFindResponse.java @@ -0,0 +1,13 @@ +package ${domain}.module.wsvr.rsp; + +import ${domain}.frame.base.BaseFindResponse; + +/** + * ProfilesFindResponse - 系统配置 + * + * @author wangbing + * @version 0.0.1 + * @since 2020-07-06 + */ +public class ProfilesFindResponse extends BaseFindResponse<${domain}.module.wsvr.ent.Profiles> { +} \ No newline at end of file diff --git a/src/main/resources/modules/SpringBoot/java/module/wsys/rsp/ProfilesUpdateResponse.java b/src/main/resources/modules/SpringBoot/java/module/wsvr/rsp/ProfilesUpdateResponse.java similarity index 83% rename from src/main/resources/modules/SpringBoot/java/module/wsys/rsp/ProfilesUpdateResponse.java rename to src/main/resources/modules/SpringBoot/java/module/wsvr/rsp/ProfilesUpdateResponse.java index 3a70ae7c..f4e810d6 100644 --- a/src/main/resources/modules/SpringBoot/java/module/wsys/rsp/ProfilesUpdateResponse.java +++ b/src/main/resources/modules/SpringBoot/java/module/wsvr/rsp/ProfilesUpdateResponse.java @@ -1,13 +1,13 @@ -package ${domain}.module.wsys.rsp; +package ${domain}.module.wsvr.rsp; import ${domain}.frame.base.BaseResponse; /** * ProfilesUpdateResponse - 系统配置 * - * @author author + * @author wangbing * @version 0.0.1 - * @since 2020-05-24 + * @since 2020-07-06 */ public class ProfilesUpdateResponse extends BaseResponse { diff --git a/src/main/resources/modules/SpringBoot/java/module/wsys/ent/LogErr.java b/src/main/resources/modules/SpringBoot/java/module/wsys/ent/LogErr.java deleted file mode 100644 index f63507f7..00000000 --- a/src/main/resources/modules/SpringBoot/java/module/wsys/ent/LogErr.java +++ /dev/null @@ -1,117 +0,0 @@ -package ${domain}.module.wsys.ent; - -import ${domain}.frame.excel.annotation.ExcelNote; -import ${domain}.frame.excel.annotation.ExcelSelect; -import com.alibaba.excel.annotation.ExcelProperty; -import ${domain}.frame.excel.annotation.ExcelSheet; -import ${domain}.frame.base.BaseEntity; - -/** - * LOG_ERR - 错误日志 - * - * @author wangbing - * @version 0.0.1 - * @since 2020-06-07 - */ -@ExcelSheet("错误日志") -public class LogErr extends BaseEntity { - - /** - * LOG_ERR_TYPE - 错误类型 - */ - @ExcelProperty("错误类型") - @ExcelNote("") - private String logErrType; - /** - * LOG_TITLE - 日志标题 - */ - @ExcelProperty("日志标题") - @ExcelNote("") - private String logTitle; - /** - * LOG_NOTE - 日志内容 - */ - @ExcelProperty("日志内容") - @ExcelNote("") - private String logNote; - /** - * LOG_ERR_RESULT - 处理结果 - */ - @ExcelProperty("处理结果") - @ExcelNote("") - private String logErrResult; - /** - * LOG_ATTR1 - 属性1 - */ - @ExcelProperty("属性1") - @ExcelNote("") - private String logAttr1; - /** - * LOG_ATTR2 - 属性2 - */ - @ExcelProperty("属性2") - @ExcelNote("") - private String logAttr2; - /** - * LOG_ATTR3 - 属性3 - */ - @ExcelProperty("属性3") - @ExcelNote("") - private String logAttr3; - - public String getLogErrType() { - return this.logErrType; - } - - public void setLogErrType(String logErrType) { - this.logErrType = logErrType; - } - - public String getLogTitle() { - return this.logTitle; - } - - public void setLogTitle(String logTitle) { - this.logTitle = logTitle; - } - - public String getLogNote() { - return this.logNote; - } - - public void setLogNote(String logNote) { - this.logNote = logNote; - } - - public String getLogErrResult() { - return this.logErrResult; - } - - public void setLogErrResult(String logErrResult) { - this.logErrResult = logErrResult; - } - - public String getLogAttr1() { - return this.logAttr1; - } - - public void setLogAttr1(String logAttr1) { - this.logAttr1 = logAttr1; - } - - public String getLogAttr2() { - return this.logAttr2; - } - - public void setLogAttr2(String logAttr2) { - this.logAttr2 = logAttr2; - } - - public String getLogAttr3() { - return this.logAttr3; - } - - public void setLogAttr3(String logAttr3) { - this.logAttr3 = logAttr3; - } -} \ No newline at end of file diff --git a/src/main/resources/modules/SpringBoot/java/module/wsys/mgr/LogErrManager.java b/src/main/resources/modules/SpringBoot/java/module/wsys/mgr/LogErrManager.java deleted file mode 100644 index cd868a55..00000000 --- a/src/main/resources/modules/SpringBoot/java/module/wsys/mgr/LogErrManager.java +++ /dev/null @@ -1,66 +0,0 @@ -package ${domain}.module.wsys.mgr; - -import ${domain}.frame.auth.Token; -import ${domain}.module.wsys.req.LogErrCreateRequest; -import ${domain}.module.wsys.req.LogErrDeleteRequest; -import ${domain}.module.wsys.req.LogErrFindRequest; -import ${domain}.module.wsys.req.LogErrUpdateRequest; -import ${domain}.module.wsys.rsp.LogErrCreateResponse; -import ${domain}.module.wsys.rsp.LogErrDeleteResponse; -import ${domain}.module.wsys.rsp.LogErrFindResponse; -import ${domain}.module.wsys.rsp.LogErrUpdateResponse; - -/** - * 错误日志 - * - * @author wangbing - * @version 0.0.1 - * @since 2017-01-01 - */ -public interface LogErrManager { - - /** - * 插入 - * - * @param request 请求对象 - * @param token 令牌 - * @return - */ - LogErrCreateResponse create(LogErrCreateRequest request, Token token); - - /** - * 逻辑删除 - * - * @param request 请求对象 - * @param token 令牌 - * @return - */ - LogErrDeleteResponse delete(LogErrDeleteRequest request, Token token); - - /** - * 更新 - * - * @param request 请求对象 - * @param token 令牌 - * @return - */ - LogErrUpdateResponse update(LogErrUpdateRequest request, Token token); - - /** - * 查询 - * - * @param request 请求对象 - * @param token 令牌 - * @return - */ - LogErrFindResponse find(LogErrFindRequest request, Token token); - - /** - * 快速添加错误日志 - * @param LogErrType SYS_ERR、BIZ_ERR - * @param title 标题 - * @param content 描述 - * @return - */ - boolean addErr(String LogErrType, String title, String content); -} diff --git a/src/main/resources/modules/SpringBoot/java/module/wsys/req/LogErrCreateRequest.java b/src/main/resources/modules/SpringBoot/java/module/wsys/req/LogErrCreateRequest.java deleted file mode 100644 index 959467ec..00000000 --- a/src/main/resources/modules/SpringBoot/java/module/wsys/req/LogErrCreateRequest.java +++ /dev/null @@ -1,116 +0,0 @@ -package ${domain}.module.wsys.req; - -import ${domain}.frame.base.BaseRequest; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.NotBlank; -import org.hibernate.validator.constraints.Length; -import ${domain}.frame.validation.Dict; - -/** - * LogErrCreateRequest - 错误日志新增 - * - * @author wangbing - * @version 0.0.1 - * @since 2020-06-07 - */ -public class LogErrCreateRequest extends BaseRequest { - - /** - * 错误类型. - */ - @Dict(name = "LOG_ERR_TYPE") - private String logErrType; - - /** - * 日志标题. - */ - @NotBlank(message = "[logTitle]日志标题不能为空") - @Length(min = 0, max = 50, message = "[logTitle]日志标题长度不合法(0-50)") - private String logTitle; - - /** - * 日志内容. - */ - private String logNote; - - /** - * 处理结果. - */ - @NotNull(message = "[logErrResult]处理结果不能为NULL") - @Dict(name = "LOG_ERR_RESULT") - private String logErrResult; - - /** - * 属性1. - */ - @Length(min = 0, max = 50, message = "[logAttr1]属性1长度不合法(0-50)") - private String logAttr1; - - /** - * 属性2. - */ - @Length(min = 0, max = 50, message = "[logAttr2]属性2长度不合法(0-50)") - private String logAttr2; - - /** - * 属性3. - */ - @Length(min = 0, max = 50, message = "[logAttr3]属性3长度不合法(0-50)") - private String logAttr3; - - public String getLogErrType() { - return this.logErrType; - } - - public void setLogErrType(String logErrType) { - this.logErrType = logErrType; - } - - public String getLogTitle() { - return this.logTitle; - } - - public void setLogTitle(String logTitle) { - this.logTitle = logTitle; - } - - public String getLogNote() { - return this.logNote; - } - - public void setLogNote(String logNote) { - this.logNote = logNote; - } - - public String getLogErrResult() { - return this.logErrResult; - } - - public void setLogErrResult(String logErrResult) { - this.logErrResult = logErrResult; - } - - public String getLogAttr1() { - return this.logAttr1; - } - - public void setLogAttr1(String logAttr1) { - this.logAttr1 = logAttr1; - } - - public String getLogAttr2() { - return this.logAttr2; - } - - public void setLogAttr2(String logAttr2) { - this.logAttr2 = logAttr2; - } - - public String getLogAttr3() { - return this.logAttr3; - } - - public void setLogAttr3(String logAttr3) { - this.logAttr3 = logAttr3; - } -} diff --git a/src/main/resources/modules/SpringBoot/java/module/wsys/req/LogErrUpdateRequest.java b/src/main/resources/modules/SpringBoot/java/module/wsys/req/LogErrUpdateRequest.java deleted file mode 100644 index 2d6a6bc7..00000000 --- a/src/main/resources/modules/SpringBoot/java/module/wsys/req/LogErrUpdateRequest.java +++ /dev/null @@ -1,47 +0,0 @@ -package ${domain}.module.wsys.req; - -import ${domain}.frame.base.BaseUpdateRequest; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import org.hibernate.validator.constraints.Length; -import javax.validation.constraints.NotEmpty; -import ${domain}.frame.validation.Dict; - -/** - * LogErrUpdateRequest - 错误日志更新 - * - * @author wangbing - * @version 0.0.1 - * @since 2020-06-07 - */ -public class LogErrUpdateRequest extends BaseUpdateRequest { - - /** - * 主键. - */ - @NotNull(message = "[id]主键不能为NULL") - private Long id; - - /** - * 处理结果. - */ - @NotNull(message = "[logErrResult]处理结果不能为NULL") - @Dict(name = "LOG_ERR_RESULT") - private String logErrResult; - - public Long getId() { - return this.id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getLogErrResult() { - return this.logErrResult; - } - - public void setLogErrResult(String logErrResult) { - this.logErrResult = logErrResult; - } -} diff --git a/src/main/resources/modules/SpringBoot/java/module/wsys/rsp/LogErrFindResponse.java b/src/main/resources/modules/SpringBoot/java/module/wsys/rsp/LogErrFindResponse.java deleted file mode 100644 index 8684043f..00000000 --- a/src/main/resources/modules/SpringBoot/java/module/wsys/rsp/LogErrFindResponse.java +++ /dev/null @@ -1,14 +0,0 @@ -package ${domain}.module.wsys.rsp; - -import ${domain}.frame.base.BaseFindResponse; -import ${domain}.module.wsys.ent.LogErr; - -/** - * LogErrFindResponse - 错误日志 - * - * @author wangbing - * @version 0.0.1 - * @since 2017-01-01 - */ -public class LogErrFindResponse extends BaseFindResponse { -} \ No newline at end of file diff --git a/src/main/resources/modules/SpringBoot/java/module/wsys/rsp/ProfilesFindResponse.java b/src/main/resources/modules/SpringBoot/java/module/wsys/rsp/ProfilesFindResponse.java deleted file mode 100644 index 09c2be5a..00000000 --- a/src/main/resources/modules/SpringBoot/java/module/wsys/rsp/ProfilesFindResponse.java +++ /dev/null @@ -1,14 +0,0 @@ -package ${domain}.module.wsys.rsp; - -import ${domain}.module.wsys.ent.Profiles; -import ${domain}.frame.base.BaseFindResponse; - -/** - * ProfilesFindResponse - 系统配置 - * - * @author author - * @version 0.0.1 - * @since 2020-05-24 - */ -public class ProfilesFindResponse extends BaseFindResponse { -} \ No newline at end of file diff --git a/src/main/resources/modules/SpringBoot/resources/dbtool/wadmin.xml b/src/main/resources/modules/SpringBoot/resources/dbtool/wadmin.xml index e1f93036..d4720669 100644 --- a/src/main/resources/modules/SpringBoot/resources/dbtool/wadmin.xml +++ b/src/main/resources/modules/SpringBoot/resources/dbtool/wadmin.xml @@ -1,10 +1,61 @@ - + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+
- - @@ -16,10 +67,8 @@ -
- @@ -32,10 +81,8 @@ -
- @@ -51,10 +98,8 @@ -
- @@ -74,10 +119,8 @@ -
- @@ -91,10 +134,8 @@ -
- @@ -105,10 +146,8 @@ -
- @@ -132,10 +171,8 @@ -
- @@ -152,10 +189,8 @@ -
- @@ -167,10 +202,8 @@ -
- @@ -182,35 +215,8 @@ - -
- - - - - - - - - - - - - - - - - - - - - - - -
- @@ -228,27 +234,8 @@ - -
- - - - - - - - - - - - - - - -
- @@ -261,10 +248,8 @@ -
- @@ -276,26 +261,7 @@ - -
- - - - - - - - - - - - - - - -
-
diff --git a/src/main/resources/modules/SpringBoot/resources/dbtool/wsys/MySQL_ALL_TABLE.sql b/src/main/resources/modules/SpringBoot/resources/dbtool/wsys/MySQL_ALL_TABLE.sql index 1c6bfe1d..87dcbee8 100644 --- a/src/main/resources/modules/SpringBoot/resources/dbtool/wsys/MySQL_ALL_TABLE.sql +++ b/src/main/resources/modules/SpringBoot/resources/dbtool/wsys/MySQL_ALL_TABLE.sql @@ -229,50 +229,6 @@ CREATE TABLE `SYS_ROLE_RES` ( PRIMARY KEY (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色资源关系'; --- ---------------------------- --- Table structure for LOG_ERR - 错误日志 --- Target : MySQL --- Author : wangbing --- Date: : 2020-06-07 --- ---------------------------- -CREATE TABLE `SYS_LOG_ERR` ( - `ID` BIGINT(20) NOT NULL COMMENT '主键', - `LOG_ERR_TYPE` VARCHAR(20) COMMENT '错误类型', - `LOG_TITLE` VARCHAR(50) NOT NULL COMMENT '日志标题', - `LOG_NOTE` TEXT COMMENT '日志内容', - `LOG_ERR_RESULT` VARCHAR(20) NOT NULL COMMENT '处理结果', - `LOG_ATTR1` VARCHAR(50) COMMENT '属性1', - `LOG_ATTR2` VARCHAR(50) COMMENT '属性2', - `LOG_ATTR3` VARCHAR(50) COMMENT '属性3', - `ROW_VERSION` BIGINT(20) NOT NULL DEFAULT 0 COMMENT '行版本', - `IS_DELETED` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否已删除', - `CREATE_BY` BIGINT(20) NOT NULL COMMENT '创建用户', - `CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间', - `LAST_UPDATE_BY` BIGINT(20) DEFAULT NULL COMMENT '最后更新用户', - `LAST_UPDATE_TIME` DATETIME DEFAULT NULL COMMENT '最后更新时间', -PRIMARY KEY (`ID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='错误日志'; - --- ---------------------------- --- Table structure for PROFILES - 系统配置 --- Target : MySQL --- Author : wangbing --- Date: : 2020-06-08 --- ---------------------------- -CREATE TABLE `SYS_PROFILES` ( - `ID` BIGINT(20) NOT NULL COMMENT '主键', - `ACTIVE` VARCHAR(20) NOT NULL COMMENT '环境', - `KEY` VARCHAR(50) NOT NULL COMMENT '键', - `VALUE` VARCHAR(50) NOT NULL COMMENT '值', - `ROW_VERSION` BIGINT(20) NOT NULL DEFAULT 0 COMMENT '行版本', - `IS_DELETED` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否已删除', - `CREATE_BY` BIGINT(20) NOT NULL COMMENT '创建用户', - `CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间', - `LAST_UPDATE_BY` BIGINT(20) DEFAULT NULL COMMENT '最后更新用户', - `LAST_UPDATE_TIME` DATETIME DEFAULT NULL COMMENT '最后更新时间', -PRIMARY KEY (`ID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='系统配置'; - -- ---------------------------- -- Table structure for TASK_SQL - SQL任务 -- Target : MySQL diff --git a/src/main/resources/modules/SpringBoot/resources/dbtool/wsys/MySQL_LOG_ERR.sql b/src/main/resources/modules/SpringBoot/resources/dbtool/wsys/MySQL_LOG_ERR.sql deleted file mode 100644 index 60dc0636..00000000 --- a/src/main/resources/modules/SpringBoot/resources/dbtool/wsys/MySQL_LOG_ERR.sql +++ /dev/null @@ -1,23 +0,0 @@ --- ---------------------------- --- Table structure for LOG_ERR - 错误日志 --- Target : MySQL --- Author : wangbing --- Date: : 2020-06-07 --- ---------------------------- -CREATE TABLE `SYS_LOG_ERR` ( - `ID` BIGINT(20) NOT NULL COMMENT '主键', - `LOG_ERR_TYPE` VARCHAR(20) COMMENT '错误类型', - `LOG_TITLE` VARCHAR(50) NOT NULL COMMENT '日志标题', - `LOG_NOTE` TEXT COMMENT '日志内容', - `LOG_ERR_RESULT` VARCHAR(20) NOT NULL COMMENT '处理结果', - `LOG_ATTR1` VARCHAR(50) COMMENT '属性1', - `LOG_ATTR2` VARCHAR(50) COMMENT '属性2', - `LOG_ATTR3` VARCHAR(50) COMMENT '属性3', - `ROW_VERSION` BIGINT(20) NOT NULL DEFAULT 0 COMMENT '行版本', - `IS_DELETED` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否已删除', - `CREATE_BY` BIGINT(20) NOT NULL COMMENT '创建用户', - `CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间', - `LAST_UPDATE_BY` BIGINT(20) DEFAULT NULL COMMENT '最后更新用户', - `LAST_UPDATE_TIME` DATETIME DEFAULT NULL COMMENT '最后更新时间', -PRIMARY KEY (`ID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='错误日志'; diff --git a/src/main/resources/modules/SpringBoot/resources/dbtool/wsys/MySQL_PROFILES.sql b/src/main/resources/modules/SpringBoot/resources/dbtool/wsys/MySQL_PROFILES.sql deleted file mode 100644 index 91a1abf1..00000000 --- a/src/main/resources/modules/SpringBoot/resources/dbtool/wsys/MySQL_PROFILES.sql +++ /dev/null @@ -1,19 +0,0 @@ --- ---------------------------- --- Table structure for PROFILES - 系统配置 --- Target : MySQL --- Author : wangbing --- Date: : 2020-06-08 --- ---------------------------- -CREATE TABLE `SYS_PROFILES` ( - `ID` BIGINT(20) NOT NULL COMMENT '主键', - `ACTIVE` VARCHAR(20) NOT NULL COMMENT '环境', - `KEY` VARCHAR(50) NOT NULL COMMENT '键', - `VALUE` VARCHAR(50) NOT NULL COMMENT '值', - `ROW_VERSION` BIGINT(20) NOT NULL DEFAULT 0 COMMENT '行版本', - `IS_DELETED` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否已删除', - `CREATE_BY` BIGINT(20) NOT NULL COMMENT '创建用户', - `CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间', - `LAST_UPDATE_BY` BIGINT(20) DEFAULT NULL COMMENT '最后更新用户', - `LAST_UPDATE_TIME` DATETIME DEFAULT NULL COMMENT '最后更新时间', -PRIMARY KEY (`ID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='系统配置'; diff --git a/src/main/resources/modules/SpringBoot/resources/dbtool/wsys/Oracle_ALL_TABLE.sql b/src/main/resources/modules/SpringBoot/resources/dbtool/wsys/Oracle_ALL_TABLE.sql index 2f2d5dea..75546859 100644 --- a/src/main/resources/modules/SpringBoot/resources/dbtool/wsys/Oracle_ALL_TABLE.sql +++ b/src/main/resources/modules/SpringBoot/resources/dbtool/wsys/Oracle_ALL_TABLE.sql @@ -360,44 +360,6 @@ COMMENT ON COLUMN "SYS_ROLE_RES"."CREATE_TIME" is '创建时间'; COMMENT ON COLUMN "SYS_ROLE_RES"."LAST_UPDATE_BY" is '最后更新用户'; COMMENT ON COLUMN "SYS_ROLE_RES"."LAST_UPDATE_TIME" is '最后更新时间'; --- ---------------------------- --- Table structure for LOG_ERR - 错误日志 --- Target : Oracle --- Author : wangbing --- Date: : 2020-06-18 --- ---------------------------- -CREATE TABLE "SYS_LOG_ERR" ( -"ID" NUMBER(19) NOT NULL, -"LOG_ERR_TYPE" VARCHAR(20) NULL, -"LOG_TITLE" VARCHAR2(50) NULL, -"LOG_NOTE" LONG NULL, -"LOG_ERR_RESULT" VARCHAR(20) NULL, -"LOG_ATTR1" VARCHAR2(50) NULL, -"LOG_ATTR2" VARCHAR2(50) NULL, -"LOG_ATTR3" VARCHAR2(50) NULL, -"ROW_VERSION" NUMBER(19) NOT NULL, -"IS_DELETED" CHAR(1) NOT NULL, -"CREATE_BY" NUMBER(19) NOT NULL, -"CREATE_TIME" DATE NOT NULL, -"LAST_UPDATE_BY" NUMBER(19) NULL, -"LAST_UPDATE_TIME" DATE NULL -); -COMMENT ON TABLE "SYS_LOG_ERR" is '错误日志'; -COMMENT ON COLUMN "SYS_LOG_ERR"."ID" is '主键'; -COMMENT ON COLUMN "SYS_LOG_ERR"."LOG_ERR_TYPE" is '错误类型'; -COMMENT ON COLUMN "SYS_LOG_ERR"."LOG_TITLE" is '日志标题'; -COMMENT ON COLUMN "SYS_LOG_ERR"."LOG_NOTE" is '日志内容'; -COMMENT ON COLUMN "SYS_LOG_ERR"."LOG_ERR_RESULT" is '处理结果'; -COMMENT ON COLUMN "SYS_LOG_ERR"."LOG_ATTR1" is '属性1'; -COMMENT ON COLUMN "SYS_LOG_ERR"."LOG_ATTR2" is '属性2'; -COMMENT ON COLUMN "SYS_LOG_ERR"."LOG_ATTR3" is '属性3'; -COMMENT ON COLUMN "SYS_LOG_ERR"."ROW_VERSION" is '行版本'; -COMMENT ON COLUMN "SYS_LOG_ERR"."IS_DELETED" is '是否已删除'; -COMMENT ON COLUMN "SYS_LOG_ERR"."CREATE_BY" is '创建用户'; -COMMENT ON COLUMN "SYS_LOG_ERR"."CREATE_TIME" is '创建时间'; -COMMENT ON COLUMN "SYS_LOG_ERR"."LAST_UPDATE_BY" is '最后更新用户'; -COMMENT ON COLUMN "SYS_LOG_ERR"."LAST_UPDATE_TIME" is '最后更新时间'; - -- ---------------------------- -- Table structure for TASK_SQL - SQL任务 -- Target : Oracle @@ -434,36 +396,6 @@ COMMENT ON COLUMN "SYS_TASK_SQL"."CREATE_TIME" is '创建时间'; COMMENT ON COLUMN "SYS_TASK_SQL"."LAST_UPDATE_BY" is '最后更新用户'; COMMENT ON COLUMN "SYS_TASK_SQL"."LAST_UPDATE_TIME" is '最后更新时间'; --- ---------------------------- --- Table structure for PROFILES - 系统配置 --- Target : Oracle --- Author : wangbing --- Date: : 2020-06-18 --- ---------------------------- -CREATE TABLE "SYS_PROFILES" ( -"ID" NUMBER(19) NOT NULL, -"ACTIVE" VARCHAR(20) NULL, -"KEY" VARCHAR2(50) NULL, -"VALUE" VARCHAR2(50) NULL, -"ROW_VERSION" NUMBER(19) NOT NULL, -"IS_DELETED" CHAR(1) NOT NULL, -"CREATE_BY" NUMBER(19) NOT NULL, -"CREATE_TIME" DATE NOT NULL, -"LAST_UPDATE_BY" NUMBER(19) NULL, -"LAST_UPDATE_TIME" DATE NULL -); -COMMENT ON TABLE "SYS_PROFILES" is '系统配置'; -COMMENT ON COLUMN "SYS_PROFILES"."ID" is '主键'; -COMMENT ON COLUMN "SYS_PROFILES"."ACTIVE" is '环境'; -COMMENT ON COLUMN "SYS_PROFILES"."KEY" is '键'; -COMMENT ON COLUMN "SYS_PROFILES"."VALUE" is '值'; -COMMENT ON COLUMN "SYS_PROFILES"."ROW_VERSION" is '行版本'; -COMMENT ON COLUMN "SYS_PROFILES"."IS_DELETED" is '是否已删除'; -COMMENT ON COLUMN "SYS_PROFILES"."CREATE_BY" is '创建用户'; -COMMENT ON COLUMN "SYS_PROFILES"."CREATE_TIME" is '创建时间'; -COMMENT ON COLUMN "SYS_PROFILES"."LAST_UPDATE_BY" is '最后更新用户'; -COMMENT ON COLUMN "SYS_PROFILES"."LAST_UPDATE_TIME" is '最后更新时间'; - -- ---------------------------- -- Table structure for DEVELOPER - 开发商 -- Target : Oracle diff --git a/src/main/resources/modules/SpringBoot/resources/dbtool/wsys/Oracle_LOG_ERR.sql b/src/main/resources/modules/SpringBoot/resources/dbtool/wsys/Oracle_LOG_ERR.sql deleted file mode 100644 index e67e0c14..00000000 --- a/src/main/resources/modules/SpringBoot/resources/dbtool/wsys/Oracle_LOG_ERR.sql +++ /dev/null @@ -1,38 +0,0 @@ --- ---------------------------- --- Table structure for LOG_ERR - 错误日志 --- Target : Oracle --- Author : wangbing --- Date: : 2020-06-18 --- ---------------------------- -CREATE TABLE "SYS_LOG_ERR" ( - "ID" NUMBER(19) NOT NULL, - "LOG_ERR_TYPE" VARCHAR(20) NULL, - "LOG_TITLE" VARCHAR2(50) NULL, - "LOG_NOTE" LONG NULL, - "LOG_ERR_RESULT" VARCHAR(20) NULL, - "LOG_ATTR1" VARCHAR2(50) NULL, - "LOG_ATTR2" VARCHAR2(50) NULL, - "LOG_ATTR3" VARCHAR2(50) NULL, - "ROW_VERSION" NUMBER(19) NOT NULL, - "IS_DELETED" CHAR(1) NOT NULL, - "CREATE_BY" NUMBER(19) NOT NULL, - "CREATE_TIME" DATE NOT NULL, - "LAST_UPDATE_BY" NUMBER(19) NULL, - "LAST_UPDATE_TIME" DATE NULL -); - -COMMENT ON TABLE "SYS_LOG_ERR" is '错误日志'; -COMMENT ON COLUMN "SYS_LOG_ERR"."ID" is '主键'; -COMMENT ON COLUMN "SYS_LOG_ERR"."LOG_ERR_TYPE" is '错误类型'; -COMMENT ON COLUMN "SYS_LOG_ERR"."LOG_TITLE" is '日志标题'; -COMMENT ON COLUMN "SYS_LOG_ERR"."LOG_NOTE" is '日志内容'; -COMMENT ON COLUMN "SYS_LOG_ERR"."LOG_ERR_RESULT" is '处理结果'; -COMMENT ON COLUMN "SYS_LOG_ERR"."LOG_ATTR1" is '属性1'; -COMMENT ON COLUMN "SYS_LOG_ERR"."LOG_ATTR2" is '属性2'; -COMMENT ON COLUMN "SYS_LOG_ERR"."LOG_ATTR3" is '属性3'; -COMMENT ON COLUMN "SYS_LOG_ERR"."ROW_VERSION" is '行版本'; -COMMENT ON COLUMN "SYS_LOG_ERR"."IS_DELETED" is '是否已删除'; -COMMENT ON COLUMN "SYS_LOG_ERR"."CREATE_BY" is '创建用户'; -COMMENT ON COLUMN "SYS_LOG_ERR"."CREATE_TIME" is '创建时间'; -COMMENT ON COLUMN "SYS_LOG_ERR"."LAST_UPDATE_BY" is '最后更新用户'; -COMMENT ON COLUMN "SYS_LOG_ERR"."LAST_UPDATE_TIME" is '最后更新时间'; diff --git a/src/main/resources/modules/SpringBoot/resources/dbtool/wsys/Oracle_PROFILES.sql b/src/main/resources/modules/SpringBoot/resources/dbtool/wsys/Oracle_PROFILES.sql deleted file mode 100644 index 4eb2d931..00000000 --- a/src/main/resources/modules/SpringBoot/resources/dbtool/wsys/Oracle_PROFILES.sql +++ /dev/null @@ -1,30 +0,0 @@ --- ---------------------------- --- Table structure for PROFILES - 系统配置 --- Target : Oracle --- Author : wangbing --- Date: : 2020-06-18 --- ---------------------------- -CREATE TABLE "SYS_PROFILES" ( - "ID" NUMBER(19) NOT NULL, - "ACTIVE" VARCHAR(20) NULL, - "KEY" VARCHAR2(50) NULL, - "VALUE" VARCHAR2(50) NULL, - "ROW_VERSION" NUMBER(19) NOT NULL, - "IS_DELETED" CHAR(1) NOT NULL, - "CREATE_BY" NUMBER(19) NOT NULL, - "CREATE_TIME" DATE NOT NULL, - "LAST_UPDATE_BY" NUMBER(19) NULL, - "LAST_UPDATE_TIME" DATE NULL -); - -COMMENT ON TABLE "SYS_PROFILES" is '系统配置'; -COMMENT ON COLUMN "SYS_PROFILES"."ID" is '主键'; -COMMENT ON COLUMN "SYS_PROFILES"."ACTIVE" is '环境'; -COMMENT ON COLUMN "SYS_PROFILES"."KEY" is '键'; -COMMENT ON COLUMN "SYS_PROFILES"."VALUE" is '值'; -COMMENT ON COLUMN "SYS_PROFILES"."ROW_VERSION" is '行版本'; -COMMENT ON COLUMN "SYS_PROFILES"."IS_DELETED" is '是否已删除'; -COMMENT ON COLUMN "SYS_PROFILES"."CREATE_BY" is '创建用户'; -COMMENT ON COLUMN "SYS_PROFILES"."CREATE_TIME" is '创建时间'; -COMMENT ON COLUMN "SYS_PROFILES"."LAST_UPDATE_BY" is '最后更新用户'; -COMMENT ON COLUMN "SYS_PROFILES"."LAST_UPDATE_TIME" is '最后更新时间'; diff --git a/src/main/resources/modules/SpringBoot/resources/dbtool/wsys/SQLite_ALL_TABLE.sql b/src/main/resources/modules/SpringBoot/resources/dbtool/wsys/SQLite_ALL_TABLE.sql index 44c6fe70..0c1999de 100644 --- a/src/main/resources/modules/SpringBoot/resources/dbtool/wsys/SQLite_ALL_TABLE.sql +++ b/src/main/resources/modules/SpringBoot/resources/dbtool/wsys/SQLite_ALL_TABLE.sql @@ -209,28 +209,6 @@ CREATE TABLE IF NOT EXISTS SYS_ROLE_RES ( "LAST_UPDATE_TIME" DATETIME ); -- ---------------------------- --- Table structure for LOG_ERR - 错误日志 --- Target : SQLite --- Author : wangbing --- Date: : 2020-06-07 --- ---------------------------- -CREATE TABLE IF NOT EXISTS SYS_LOG_ERR ( - "ID" BIGINT PRIMARY KEY NOT NULL, - "LOG_ERR_TYPE" VARCHAR(20), - "LOG_TITLE" VARCHAR(50) NOT NULL, - "LOG_NOTE" TEXT, - "LOG_ERR_RESULT" VARCHAR(20) NOT NULL, - "LOG_ATTR1" VARCHAR(50), - "LOG_ATTR2" VARCHAR(50), - "LOG_ATTR3" VARCHAR(50), - "ROW_VERSION" BIGINT NOT NULL, - "IS_DELETED" BOOLEAN NOT NULL, - "CREATE_BY" BIGINT NOT NULL, - "CREATE_TIME" DATETIME NOT NULL, - "LAST_UPDATE_BY" BIGINT, - "LAST_UPDATE_TIME" DATETIME -); --- ---------------------------- -- Table structure for TASK_SQL - SQL任务 -- Target : SQLite -- Author : author @@ -250,22 +228,4 @@ CREATE TABLE IF NOT EXISTS SYS_TASK_SQL ( "CREATE_TIME" DATETIME NOT NULL, "LAST_UPDATE_BY" BIGINT, "LAST_UPDATE_TIME" DATETIME -); --- ---------------------------- --- Table structure for PROFILES - 系统配置 --- Target : SQLite --- Author : author --- Date: : 2020-06-04 --- ---------------------------- -CREATE TABLE IF NOT EXISTS SYS_PROFILES ( - "ID" BIGINT PRIMARY KEY NOT NULL, - "ACTIVE" VARCHAR(20) NOT NULL, - "KEY" VARCHAR(50) NOT NULL, - "VALUE" VARCHAR(50) NOT NULL, - "ROW_VERSION" BIGINT NOT NULL, - "IS_DELETED" BOOLEAN NOT NULL, - "CREATE_BY" BIGINT NOT NULL, - "CREATE_TIME" DATETIME NOT NULL, - "LAST_UPDATE_BY" BIGINT, - "LAST_UPDATE_TIME" DATETIME -); +); \ No newline at end of file diff --git a/src/main/resources/modules/SpringBoot/resources/dbtool/wsys/SQLite_LOG_ERR.sql b/src/main/resources/modules/SpringBoot/resources/dbtool/wsys/SQLite_LOG_ERR.sql deleted file mode 100644 index 293d340e..00000000 --- a/src/main/resources/modules/SpringBoot/resources/dbtool/wsys/SQLite_LOG_ERR.sql +++ /dev/null @@ -1,22 +0,0 @@ --- ---------------------------- --- Table structure for LOG_ERR - 错误日志 --- Target : SQLite --- Author : wangbing --- Date: : 2020-06-07 --- ---------------------------- -CREATE TABLE IF NOT EXISTS SYS_LOG_ERR ( - "ID" BIGINT PRIMARY KEY NOT NULL, - "LOG_ERR_TYPE" VARCHAR(20), - "LOG_TITLE" VARCHAR(50) NOT NULL, - "LOG_NOTE" TEXT, - "LOG_ERR_RESULT" VARCHAR(20) NOT NULL, - "LOG_ATTR1" VARCHAR(50), - "LOG_ATTR2" VARCHAR(50), - "LOG_ATTR3" VARCHAR(50), - "ROW_VERSION" BIGINT NOT NULL, - "IS_DELETED" BOOLEAN NOT NULL, - "CREATE_BY" BIGINT NOT NULL, - "CREATE_TIME" DATETIME NOT NULL, - "LAST_UPDATE_BY" BIGINT, - "LAST_UPDATE_TIME" DATETIME -); diff --git a/src/main/resources/modules/SpringBoot/resources/dbtool/wsys/SQLite_PROFILES.sql b/src/main/resources/modules/SpringBoot/resources/dbtool/wsys/SQLite_PROFILES.sql deleted file mode 100644 index b051b142..00000000 --- a/src/main/resources/modules/SpringBoot/resources/dbtool/wsys/SQLite_PROFILES.sql +++ /dev/null @@ -1,18 +0,0 @@ --- ---------------------------- --- Table structure for PROFILES - 系统配置 --- Target : SQLite --- Author : author --- Date: : 2020-06-04 --- ---------------------------- -CREATE TABLE IF NOT EXISTS SYS_PROFILES ( - "ID" BIGINT PRIMARY KEY NOT NULL, - "ACTIVE" VARCHAR(20) NOT NULL, - "KEY" VARCHAR(50) NOT NULL, - "VALUE" VARCHAR(50) NOT NULL, - "ROW_VERSION" BIGINT NOT NULL, - "IS_DELETED" BOOLEAN NOT NULL, - "CREATE_BY" BIGINT NOT NULL, - "CREATE_TIME" DATETIME NOT NULL, - "LAST_UPDATE_BY" BIGINT, - "LAST_UPDATE_TIME" DATETIME -); diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/index.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/index.ftl index 7fb24728..fc6e4310 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/index.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/index.ftl @@ -28,7 +28,7 @@ 核心设置 ${print('<#if token.hasRes("DEV_PROFILES")>')} - 系统配置 + 系统配置 ${print('')} ${print('<#if token.hasRes("DEV_RES")>')} 资源管理 @@ -48,10 +48,10 @@ 监控运行 ${print('<#if token.hasRes("OBS_SCHEDULE")>')} - 调度监控 + 调度监控 ${print('')} ${print('<#if token.hasRes("OBS_LOG_ERR")>')} - 错误日志 + 错误日志 ${print('')} ${print('')} @@ -59,7 +59,7 @@ 字典管理 角色管理 diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/mgr.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/mgr.ftl index 43233fa1..e7acfa34 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/mgr.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/mgr.ftl @@ -62,7 +62,7 @@ <#list item.selectItems as st> - + @@ -318,11 +318,13 @@ <#elseif item.getFieldTypeJava() =="String" && item.fieldType == "Select"> - - <#list item.selectItems as st> - - - + + + <#list item.selectItems as st> + + + + <#elseif item.getFieldTypeJava() =="String" && item.getFieldLength() lte 50 && item.fieldType != "Dict"> diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wmnt/logErr.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wmnt/logErr.ftl deleted file mode 100644 index 5aa29793..00000000 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wmnt/logErr.ftl +++ /dev/null @@ -1,254 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - 搜索 - 重置 - - - - - - - - 解决 - - 搁置 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsvr/logerr.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsvr/logerr.ftl new file mode 100644 index 00000000..63ed4982 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsvr/logerr.ftl @@ -0,0 +1,263 @@ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + 搜索 + 重置 + + + + + + + + 新增 + + 导出 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 取 消 + 保存 + + +
+ diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/profiles.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsvr/profiles.ftl similarity index 81% rename from src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/profiles.ftl rename to src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsvr/profiles.ftl index 77623d55..0aca58a4 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/profiles.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsvr/profiles.ftl @@ -2,10 +2,13 @@ - + + + + - - + + @@ -69,21 +72,21 @@ - + label="配置键"> + label="配置值"> - + + + + - - + + - - + + 取 消 保存 - +