diff --git a/.gradle/6.7/executionHistory/executionHistory.bin b/.gradle/6.7/executionHistory/executionHistory.bin new file mode 100644 index 0000000..4788a74 Binary files /dev/null and b/.gradle/6.7/executionHistory/executionHistory.bin differ diff --git a/.gradle/6.7/executionHistory/executionHistory.lock b/.gradle/6.7/executionHistory/executionHistory.lock new file mode 100644 index 0000000..51904c9 Binary files /dev/null and b/.gradle/6.7/executionHistory/executionHistory.lock differ diff --git a/.gradle/6.7/fileChanges/last-build.bin b/.gradle/6.7/fileChanges/last-build.bin new file mode 100644 index 0000000..f76dd23 Binary files /dev/null and b/.gradle/6.7/fileChanges/last-build.bin differ diff --git a/.gradle/6.7/fileHashes/fileHashes.bin b/.gradle/6.7/fileHashes/fileHashes.bin new file mode 100644 index 0000000..4ef3554 Binary files /dev/null and b/.gradle/6.7/fileHashes/fileHashes.bin differ diff --git a/.gradle/6.7/fileHashes/fileHashes.lock b/.gradle/6.7/fileHashes/fileHashes.lock new file mode 100644 index 0000000..1217964 Binary files /dev/null and b/.gradle/6.7/fileHashes/fileHashes.lock differ diff --git a/.gradle/6.7/gc.properties b/.gradle/6.7/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock new file mode 100644 index 0000000..204efd2 Binary files /dev/null and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/.gradle/buildOutputCleanup/cache.properties b/.gradle/buildOutputCleanup/cache.properties new file mode 100644 index 0000000..3e25292 --- /dev/null +++ b/.gradle/buildOutputCleanup/cache.properties @@ -0,0 +1,2 @@ +#Mon Jan 04 21:36:33 CST 2021 +gradle.version=6.7 diff --git a/.gradle/buildOutputCleanup/outputFiles.bin b/.gradle/buildOutputCleanup/outputFiles.bin new file mode 100644 index 0000000..b1d3a54 Binary files /dev/null and b/.gradle/buildOutputCleanup/outputFiles.bin differ diff --git a/.gradle/checksums/checksums.lock b/.gradle/checksums/checksums.lock new file mode 100644 index 0000000..55c1dd3 Binary files /dev/null and b/.gradle/checksums/checksums.lock differ diff --git a/.gradle/configuration-cache/gc.properties b/.gradle/configuration-cache/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/.gradle/vcs-1/gc.properties b/.gradle/vcs-1/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/README.md b/README.md index 49cd367..30965fc 100644 --- a/README.md +++ b/README.md @@ -62,3 +62,11 @@ ![Image text](https://gitee.com/lwdillon/fx-falsework/raw/main/readme/log-dark.png) ![Image text](https://gitee.com/lwdillon/fx-falsework/raw/main/readme/log-light.png) + + 在线用户 + +![Image text](https://gitee.com/lwdillon/fx-falsework/raw/main/readme/online_user.png) + + 登录日志 + +![Image text](https://gitee.com/lwdillon/fx-falsework/raw/main/readme/login_log.png) diff --git a/falsework-client/pom.xml b/falsework-client/pom.xml index 1db2b6a..970d0b2 100644 --- a/falsework-client/pom.xml +++ b/falsework-client/pom.xml @@ -19,36 +19,40 @@ - - com.epri + com.fx falsework-sever 0.0.1-SNAPSHOT + compile + + + org.controlsfx + controlsfx + 11.0.3 - jfoenix jfoenix ${jfoenix.version} system - ${basedir}/libs/jfoenix-8.0.10.jar - - - datafx-flow - datafx-flow - ${datafx.version} - system - ${basedir}/libs/datafx-flow-8.0.2-SNAPSHOT.jar + ${pom.basedir}/libs/jfoenix-8.0.10.jar tilesfx tilesfx 1.6.8 system - ${basedir}/libs/tilesfx-1.6.8.jar + ${pom.basedir}/libs/tilesfx-1.6.8.jar + + + datafx-flow + datafx-flow + ${datafx.version} + system + ${pom.basedir}/libs/datafx-flow-8.0.2-SNAPSHOT.jar @@ -56,21 +60,21 @@ datafx-injection ${datafx.version} system - ${basedir}/libs/datafx-injection-8.0.2-SNAPSHOT.jar + ${pom.basedir}/libs/datafx-injection-8.0.2-SNAPSHOT.jar datafx-eventsystem datafx-eventsystem ${datafx.version} system - ${basedir}/libs/datafx-eventsystem-8.0.2-SNAPSHOT.jar + ${pom.basedir}/libs/datafx-eventsystem-8.0.2-SNAPSHOT.jar datafx-core datafx-core ${datafx.version} system - ${basedir}/libs/datafx-core-8.0.2-SNAPSHOT.jar + ${pom.basedir}/libs/datafx-core-8.0.2-SNAPSHOT.jar javax.inject @@ -156,6 +160,16 @@ javassist 3.18.1-GA + + org.java-websocket + Java-WebSocket + 1.5.1 + + + org.projectlombok + lombok + 1.18.16 + diff --git a/falsework-client/src/main/java/META-INF/MANIFEST.MF b/falsework-client/src/main/java/META-INF/MANIFEST.MF index 91f7f32..fcfd6bc 100644 --- a/falsework-client/src/main/java/META-INF/MANIFEST.MF +++ b/falsework-client/src/main/java/META-INF/MANIFEST.MF @@ -1,56 +1,58 @@ Manifest-Version: 1.0 -Main-Class: com.epri.fx.client.AppStartup -Class-Path: . libs/javax.inject-1.jar libs/tilesfx-1.6.8.jar libs/netfli - x-statistics-0.1.1.jar libs/jackson-core-2.11.0.jar libs/spring-boot-st - arter-security-2.3.0.RELEASE.jar libs/spring-boot-starter-logging-2.3.0 - .RELEASE.jar libs/spring-web-5.2.6.RELEASE.jar libs/jackson-module-para - meter-names-2.11.0.jar libs/datafx-injection-8.0.2-SNAPSHOT.jar libs/pi - nyin4j-2.5.0.jar libs/okhttp-3.14.8.jar libs/spring-context-support-5.2 - .6.RELEASE.jar libs/spring-boot-starter-json-2.3.0.RELEASE.jar libs/myb - atis-spring-2.0.5.jar libs/druid-spring-boot-starter-1.1.14.jar libs/Hi - kariCP-3.4.5.jar libs/xml-apis-1.0.b2.jar libs/datafx-core-8.0.2-SNAPSH - OT.jar libs/controlsfx-8.40.17.jar libs/pagehelper-spring-boot-autoconf - igure-1.2.5.jar libs/archaius-core-0.7.6.jar libs/commons-collections-3 - .2.1.jar libs/servo-core-0.10.1.jar libs/feign-jackson-10.9.jar libs/ja - karta.annotation-api-1.3.5.jar libs/jsr305-3.0.1.jar libs/ribbon-loadba - lancer-2.3.0.jar libs/tomcat-embed-websocket-9.0.35.jar libs/spring-con - text-5.2.6.RELEASE.jar libs/slf4j-api-1.7.30.jar libs/mybatis-spring-bo - ot-autoconfigure-2.1.3.jar libs/spring-boot-starter-jdbc-2.3.0.RELEASE. - jar libs/okio-1.17.2.jar libs/spring-tx-5.2.6.RELEASE.jar libs/jackson- - datatype-jsr310-2.11.0.jar libs/commons-lang3-3.10.jar libs/spring-boot - -starter-cache-2.3.0.RELEASE.jar libs/jsr311-api-1.1.1.jar libs/hystrix - -core-1.5.18.jar libs/httpcore-4.4.13.jar libs/datafx-flow-8.0.2-SNAPSH - OT.jar libs/ribbon-core-2.3.0.jar libs/log4j-api-2.13.2.jar libs/lucene - -queryparser-7.4.0.jar libs/joda-time-2.10.1.jar libs/servo-internal-0. - 10.1.jar libs/pagehelper-5.1.4.jar libs/annotations-2.0.0.jar libs/spri - ng-boot-starter-2.3.0.RELEASE.jar libs/lucene-core-7.4.0.jar libs/dom4j - -1.6.1.jar libs/feign-hystrix-10.9.jar libs/javassist-3.18.1-GA.jar lib - s/logback-classic-1.2.3.jar libs/observable-toogles-0.1.jar libs/DmJdbc - Driver-1.0.0.jar libs/jfoenix-8.0.10.jar libs/tomcat-embed-core-9.0.35. - jar libs/ikonli-javafx-2.4.0.jar libs/spring-security-config-5.3.2.RELE - ASE.jar libs/spring-boot-autoconfigure-2.3.0.RELEASE.jar libs/jakarta.e - l-3.0.3.jar libs/rxjava-1.3.8.jar libs/snakeyaml-1.26.jar libs/spring-s - ecurity-core-5.3.2.RELEASE.jar libs/spring-jdbc-5.2.6.RELEASE.jar libs/ - lucene-sandbox-7.4.0.jar libs/pagehelper-spring-boot-starter-1.2.5.jar - libs/log4j-to-slf4j-2.13.2.jar libs/HdrHistogram-2.1.9.jar libs/jjwt-0. - 7.0.jar libs/jersey-apache-client4-1.19.1.jar libs/spring-expression-5. - 2.6.RELEASE.jar libs/lucene-queries-7.4.0.jar libs/spring-security-web- - 5.3.2.RELEASE.jar libs/commons-logging-1.1.1.jar libs/feign-ribbon-10.9 - .jar libs/feign-okhttp-10.9.jar libs/ikonli-fontawesome5-pack-2.4.0.jar - libs/feign-core-10.9.jar libs/druid-1.1.14.jar libs/spring-core-5.2.6. - RELEASE.jar libs/commons-configuration-1.8.jar libs/spring-boot-starter - -tomcat-2.3.0.RELEASE.jar libs/logback-core-1.2.3.jar libs/lucene-group - ing-7.4.0.jar libs/spring-beans-5.2.6.RELEASE.jar libs/datafx-eventsyst - em-8.0.2-SNAPSHOT.jar libs/spring-boot-starter-web-2.3.0.RELEASE.jar li - bs/jackson-datatype-jdk8-2.11.0.jar libs/togglz-core-2.0.1.Final.jar li - bs/mysql-connector-java-8.0.20.jar libs/spring-webmvc-5.2.6.RELEASE.jar - libs/jul-to-slf4j-1.7.30.jar libs/spring-jcl-5.2.6.RELEASE.jar libs/ne - tflix-commons-util-0.1.1.jar libs/spring-boot-2.3.0.RELEASE.jar libs/co - mmons-lang-2.6.jar libs/jackson-annotations-2.11.0.jar libs/jackson-dat - abind-2.11.0.jar libs/jersey-client-1.19.1.jar libs/fontawesomefx-8.9.j - ar libs/ribbon-httpclient-2.2.0.jar libs/ikonli-core-2.4.0.jar libs/myb - atis-3.5.5.jar libs/jersey-core-1.19.1.jar libs/guava-16.0.1.jar libs/s - pring-aop-5.2.6.RELEASE.jar libs/commons-codec-1.14.jar libs/mybatis-sp - ring-boot-starter-2.1.3.jar libs/httpclient-4.5.12.jar libs/feign-slf4j - -10.9.jar libs/jsqlparser-1.0.jar +Main-Class: com.fx.client.AppStartup +Class-Path: . libs/annotations-2.0.0.jar libs/feign-slf4j-10.9.jar libs/se + rvo-core-0.10.1.jar libs/jackson-databind-2.10.0.pr3.jar libs/netflix-c + ommons-util-0.1.1.jar libs/ribbon-loadbalancer-2.3.0.jar libs/pagehelpe + r-5.1.4.jar libs/spring-boot-starter-websocket-2.4.1.jar libs/fontaweso + mefx-8.9.jar libs/httpcore-4.2.1.jar libs/HikariCP-3.4.5.jar libs/log4j + -to-slf4j-2.13.3.jar libs/javafx-graphics-11.0.2-mac.jar libs/log4j-api + -2.13.3.jar libs/spring-boot-starter-jdbc-2.4.0.jar libs/feign-okhttp-1 + 0.9.jar libs/druid-spring-boot-starter-1.1.14.jar libs/spring-web-5.3.2 + .jar libs/spring-security-config-5.4.2.jar libs/spring-boot-starter-2.4 + .1.jar libs/ribbon-core-2.3.0.jar libs/jackson-datatype-jsr310-2.11.3.j + ar libs/spring-aop-5.3.2.jar libs/junit-4.12.jar libs/spring-boot-start + er-quartz-2.4.1.jar libs/logback-core-1.1.7.jar libs/hamcrest-core-1.3. + jar libs/feign-core-10.9.jar libs/spring-security-core-5.4.2.jar libs/j + ersey-core-1.19.1.jar libs/spring-boot-2.4.1.jar libs/mybatis-spring-bo + ot-autoconfigure-2.1.4.jar libs/feign-jackson-10.9.jar libs/okio-1.17.2 + .jar libs/mybatis-spring-2.0.6.jar libs/jakarta.annotation-api-1.3.5.ja + r libs/tomcat-embed-websocket-9.0.41.jar libs/feign-ribbon-10.9.jar lib + s/datafx-flow-8.0.2-SNAPSHOT.jar libs/snakeyaml-1.27.jar libs/javassist + -3.18.1-GA.jar libs/joda-time-2.10.1.jar libs/spring-boot-starter-secur + ity-2.4.1.jar libs/okhttp-3.14.6.jar libs/DmJdbcDriver-1.0.0.jar libs/d + ruid-1.1.14.jar libs/jackson-annotations-2.10.0.pr3.jar libs/ikonli-jav + afx-2.4.0.jar libs/Java-WebSocket-1.5.1.jar libs/jsr305-3.0.1.jar libs/ + mybatis-spring-boot-starter-2.1.4.jar libs/commons-lang-2.6.jar libs/sp + ring-context-support-5.3.2.jar libs/spring-context-5.3.2.jar libs/jacks + on-module-parameter-names-2.11.3.jar libs/spring-boot-autoconfigure-1.5 + .12.RELEASE.jar libs/javafx-base-11.0.2.jar libs/ikonli-core-2.4.0.jar + libs/feign-hystrix-10.9.jar libs/spring-security-web-5.4.2.jar libs/spr + ing-expression-5.2.11.RELEASE.jar libs/rxjava-1.2.0.jar libs/slf4j-api- + 1.7.21.jar libs/spring-boot-starter-json-2.4.1.jar libs/lombok-1.18.16. + jar libs/javafx-media-11.0.2.jar libs/c3p0-0.9.5.4.jar libs/datafx-inje + ction-8.0.2-SNAPSHOT.jar libs/jul-to-slf4j-1.7.30.jar libs/jersey-apach + e-client4-1.19.1.jar libs/jfoenix-8.0.10.jar libs/jjwt-0.7.0.jar libs/c + ommons-lang3-3.4.jar libs/tomcat-embed-core-9.0.41.jar libs/netflix-sta + tistics-0.1.1.jar libs/controlsfx-11.0.3.jar libs/spring-messaging-5.3. + 2.jar libs/spring-tx-5.3.2.jar libs/spring-boot-starter-web-2.4.1.jar l + ibs/spring-boot-starter-tomcat-2.4.1.jar libs/spring-jcl-5.3.2.jar libs + /HikariCP-java7-2.4.13.jar libs/spring-beans-5.3.2.jar libs/HdrHistogra + m-2.1.9.jar libs/guava-16.0.1.jar libs/pinyin4j-2.5.0.jar libs/spring-w + ebsocket-5.3.2.jar libs/commons-collections-3.2.1.jar libs/datafx-event + system-8.0.2-SNAPSHOT.jar libs/httpclient-4.2.1.jar libs/mchange-common + s-java-0.2.15.jar libs/jakarta.el-3.0.3.jar libs/pagehelper-spring-boot + -autoconfigure-1.2.5.jar libs/javafx-base-11.0.2-mac.jar libs/jackson-c + ore-2.10.0.pr3.jar libs/ribbon-httpclient-2.2.0.jar libs/spring-boot-st + arter-cache-2.4.1.jar libs/commons-logging-1.1.1.jar libs/javafx-media- + 11.0.2-mac.jar libs/jsqlparser-1.0.jar libs/javafx-controls-11.0.2-mac. + jar libs/archaius-core-0.7.6.jar libs/spring-boot-starter-logging-2.4.1 + .jar libs/mysql-connector-java-8.0.20.jar libs/javafx-graphics-11.0.2.j + ar libs/javafx-controls-11.0.2.jar libs/javax.inject-1.jar libs/datafx- + core-8.0.2-SNAPSHOT.jar libs/quartz-2.3.2.jar libs/logback-classic-1.1. + 7.jar libs/spring-jdbc-5.3.1.jar libs/ikonli-fontawesome5-pack-2.4.0.ja + r libs/hystrix-core-1.5.18.jar libs/jersey-client-1.19.1.jar libs/commo + ns-configuration-1.8.jar libs/jsr311-api-1.1.1.jar libs/mybatis-3.5.6.j + ar libs/spring-webmvc-5.3.2.jar libs/servo-internal-0.10.1.jar libs/spr + ing-core-5.3.2.jar libs/jackson-datatype-jdk8-2.11.3.jar libs/pagehelpe + r-spring-boot-starter-1.2.5.jar libs/commons-codec-1.6.jar diff --git a/falsework-client/src/main/java/com/epri/fx/client/websocket/Session.java b/falsework-client/src/main/java/com/epri/fx/client/websocket/Session.java deleted file mode 100644 index 19cebbc..0000000 --- a/falsework-client/src/main/java/com/epri/fx/client/websocket/Session.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.epri.fx.client.websocket; - -import io.datafx.controller.injection.scopes.ApplicationScoped; -import io.datafx.controller.injection.scopes.FlowScoped; - -/** - * @description: - * @className: Session - * @author: liwen - * @date: 2020/6/24 16:17 - */ -@ApplicationScoped -public class Session { - - private int counter = 0; - - public Session() { - - } - - public void print(String from) { - System.out.println(from + ": counter = " + counter++); - } -} diff --git a/falsework-client/src/main/java/com/epri/fx/client/AppStartup.java b/falsework-client/src/main/java/com/fx/client/AppStartup.java similarity index 62% rename from falsework-client/src/main/java/com/epri/fx/client/AppStartup.java rename to falsework-client/src/main/java/com/fx/client/AppStartup.java index 48c7a98..466468c 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/AppStartup.java +++ b/falsework-client/src/main/java/com/fx/client/AppStartup.java @@ -1,8 +1,9 @@ -package com.epri.fx.client; +package com.fx.client; -import com.epri.fx.client.gui.uicomponents.control.LFXDecorator; -import com.epri.fx.client.gui.uicomponents.login.LoginController; -import com.epri.fx.client.store.ApplicatonStore; +import com.fx.client.gui.uicomponents.control.LFXDecorator; +import com.fx.client.gui.uicomponents.login.LoginController; +import com.fx.client.store.ApplicatonStore; +import com.fx.client.websocket.WSClient; import com.jfoenix.assets.JFoenixResources; import com.jfoenix.svg.SVGGlyph; import com.jfoenix.svg.SVGGlyphLoader; @@ -12,9 +13,10 @@ import io.datafx.controller.flow.Flow; import io.datafx.controller.flow.FlowHandler; import io.datafx.controller.flow.container.AnimatedFlowContainer; import io.datafx.controller.flow.container.ContainerAnimations; +import io.datafx.controller.flow.context.FXMLViewFlowContext; +import io.datafx.controller.flow.context.ViewFlowContext; import javafx.application.Application; import javafx.scene.Scene; -import javafx.scene.layout.StackPane; import javafx.scene.paint.Color; import javafx.scene.text.Font; import javafx.stage.Stage; @@ -32,7 +34,10 @@ import java.io.InputStream; */ public class AppStartup extends Application { + @FXMLViewFlowContext + private ViewFlowContext flowContext; + private ApplicationContext applicationContext = ApplicationContext.getInstance(); @Override public void init() throws Exception { @@ -40,7 +45,7 @@ public class AppStartup extends Application { InputStream in = AppStartup.class.getClassLoader().getResourceAsStream("fonts/msyh.ttf"); Font font1 = Font.loadFont(in, 12); - System.err.println(font1.getName()+"\t"+font1.getFamily()); + System.err.println(font1.getName() + "\t" + font1.getFamily()); ConfigurationManager.loadPropertiesFromResources("sample-client.properties"); // @@ -66,20 +71,20 @@ public class AppStartup extends Application { } }).start(); + Flow contentFlow = new Flow(LoginController.class); + AnimatedFlowContainer container = new AnimatedFlowContainer(Duration.millis(320), ContainerAnimations.SWIPE_LEFT); + flowContext = new ViewFlowContext(); + final FlowHandler contentFlowHandler = contentFlow.createHandler(flowContext); + applicationContext.register(stage, Stage.class); + applicationContext.register("ContentFlowHandler", contentFlowHandler); + contentFlowHandler.start(container); - ApplicationContext.getInstance().register(stage, Stage.class); - - Flow flow = new Flow(LoginController.class); - FlowHandler flowHandler = flow.createHandler(); - StackPane rootPane = flowHandler.start(new AnimatedFlowContainer(Duration.millis(320), ContainerAnimations.SWIPE_LEFT)); - - ApplicationContext.getInstance().register("mainFlowHandler", flowHandler); - ApplicationContext.getInstance().register(rootPane, StackPane.class); - - LFXDecorator wfxDecorator = new LFXDecorator(stage, rootPane, false, true, true); + LFXDecorator wfxDecorator = new LFXDecorator(stage, container.getView(), false, true, true); wfxDecorator.setCustomMaximize(true); wfxDecorator.setGraphic(new SVGGlyph("")); + + Scene scene = new Scene(wfxDecorator, 1000, 750); stage.setTitle("JavaFX Welcome"); scene.setFill(Color.TRANSPARENT); @@ -87,13 +92,13 @@ public class AppStartup extends Application { stage.show(); - scene.getStylesheets().addAll(JFoenixResources.load("/css/app-fonts.css").toExternalForm(),AppStartup.class.getResource("/css/login.css").toExternalForm(),AppStartup.class.getResource("/css/app-light.css").toExternalForm()); + scene.getStylesheets().addAll(JFoenixResources.load("/css/app-fonts.css").toExternalForm(), AppStartup.class.getResource("/css/login.css").toExternalForm(), AppStartup.class.getResource("/css/app-light.css").toExternalForm()); } @Override public void stop() throws Exception { - + WSClient.getInstance().close(); } } diff --git a/falsework-client/src/main/java/com/epri/fx/client/bean/CountryPath.java b/falsework-client/src/main/java/com/fx/client/bean/CountryPath.java similarity index 98% rename from falsework-client/src/main/java/com/epri/fx/client/bean/CountryPath.java rename to falsework-client/src/main/java/com/fx/client/bean/CountryPath.java index f76c003..ffac112 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/bean/CountryPath.java +++ b/falsework-client/src/main/java/com/fx/client/bean/CountryPath.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.epri.fx.client.bean; +package com.fx.client.bean; import javafx.scene.control.Tooltip; import javafx.scene.shape.SVGPath; diff --git a/falsework-client/src/main/java/com/epri/fx/client/bean/MenuVoCell.java b/falsework-client/src/main/java/com/fx/client/bean/MenuVoCell.java similarity index 88% rename from falsework-client/src/main/java/com/epri/fx/client/bean/MenuVoCell.java rename to falsework-client/src/main/java/com/fx/client/bean/MenuVoCell.java index fe553f9..fc73639 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/bean/MenuVoCell.java +++ b/falsework-client/src/main/java/com/fx/client/bean/MenuVoCell.java @@ -1,8 +1,6 @@ -package com.epri.fx.client.bean; +package com.fx.client.bean; -import com.epri.fx.server.entity.Menu; -import com.epri.fx.server.vo.MenuVO; -import javafx.beans.property.ListProperty; +import com.fx.server.vo.MenuVO; import javafx.beans.property.ObjectProperty; import javafx.beans.property.SimpleListProperty; import javafx.beans.property.SimpleObjectProperty; diff --git a/falsework-client/src/main/java/com/epri/fx/client/exception/AppRunException.java b/falsework-client/src/main/java/com/fx/client/exception/AppRunException.java similarity index 97% rename from falsework-client/src/main/java/com/epri/fx/client/exception/AppRunException.java rename to falsework-client/src/main/java/com/fx/client/exception/AppRunException.java index 6ca762f..c508ea8 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/exception/AppRunException.java +++ b/falsework-client/src/main/java/com/fx/client/exception/AppRunException.java @@ -1,4 +1,4 @@ -package com.epri.fx.client.exception; +package com.fx.client.exception; import javafx.application.Platform; diff --git a/falsework-client/src/main/java/com/epri/fx/client/gui/feature/DisabledByFeature.java b/falsework-client/src/main/java/com/fx/client/gui/feature/DisabledByFeature.java similarity index 87% rename from falsework-client/src/main/java/com/epri/fx/client/gui/feature/DisabledByFeature.java rename to falsework-client/src/main/java/com/fx/client/gui/feature/DisabledByFeature.java index e271497..7b70ae0 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/gui/feature/DisabledByFeature.java +++ b/falsework-client/src/main/java/com/fx/client/gui/feature/DisabledByFeature.java @@ -1,4 +1,4 @@ -package com.epri.fx.client.gui.feature; +package com.fx.client.gui.feature; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/falsework-client/src/main/java/com/epri/fx/client/gui/feature/FeatureHandler.java b/falsework-client/src/main/java/com/fx/client/gui/feature/FeatureHandler.java similarity index 90% rename from falsework-client/src/main/java/com/epri/fx/client/gui/feature/FeatureHandler.java rename to falsework-client/src/main/java/com/fx/client/gui/feature/FeatureHandler.java index 5599322..35525ff 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/gui/feature/FeatureHandler.java +++ b/falsework-client/src/main/java/com/fx/client/gui/feature/FeatureHandler.java @@ -1,6 +1,6 @@ -package com.epri.fx.client.gui.feature; +package com.fx.client.gui.feature; -import com.epri.fx.client.store.ApplicatonStore; +import com.fx.client.store.ApplicatonStore; import javafx.beans.property.SimpleBooleanProperty; import javafx.scene.Node; diff --git a/falsework-client/src/main/java/com/epri/fx/client/gui/feature/FeatureResourceConsumer.java b/falsework-client/src/main/java/com/fx/client/gui/feature/FeatureResourceConsumer.java similarity index 97% rename from falsework-client/src/main/java/com/epri/fx/client/gui/feature/FeatureResourceConsumer.java rename to falsework-client/src/main/java/com/fx/client/gui/feature/FeatureResourceConsumer.java index a08d0c3..a3af79b 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/gui/feature/FeatureResourceConsumer.java +++ b/falsework-client/src/main/java/com/fx/client/gui/feature/FeatureResourceConsumer.java @@ -1,4 +1,4 @@ -package com.epri.fx.client.gui.feature; +package com.fx.client.gui.feature; import io.datafx.controller.ViewNode; import io.datafx.controller.injection.scopes.ApplicationScoped; diff --git a/falsework-client/src/main/java/com/epri/fx/client/gui/feature/HideByFeature.java b/falsework-client/src/main/java/com/fx/client/gui/feature/HideByFeature.java similarity index 87% rename from falsework-client/src/main/java/com/epri/fx/client/gui/feature/HideByFeature.java rename to falsework-client/src/main/java/com/fx/client/gui/feature/HideByFeature.java index 55763b8..e04199d 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/gui/feature/HideByFeature.java +++ b/falsework-client/src/main/java/com/fx/client/gui/feature/HideByFeature.java @@ -1,4 +1,4 @@ -package com.epri.fx.client.gui.feature; +package com.fx.client.gui.feature; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/admin/group/GroupManagementController.java b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/admin/group/GroupManagementController.java similarity index 90% rename from falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/admin/group/GroupManagementController.java rename to falsework-client/src/main/java/com/fx/client/gui/uicomponents/admin/group/GroupManagementController.java index 9b80f22..8cce094 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/admin/group/GroupManagementController.java +++ b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/admin/group/GroupManagementController.java @@ -1,10 +1,10 @@ -package com.epri.fx.client.gui.uicomponents.admin.group; +package com.fx.client.gui.uicomponents.admin.group; -import com.epri.fx.client.gui.uicomponents.admin.group.components.GroupDetailController; -import com.epri.fx.client.model.GroupDataModel; -import com.epri.fx.client.request.Request; -import com.epri.fx.client.request.feign.admin.GroupTypeFeign; -import com.epri.fx.server.vo.GroupTypeVO; +import com.fx.client.gui.uicomponents.admin.group.components.GroupDetailController; +import com.fx.client.model.GroupDataModel; +import com.fx.client.request.Request; +import com.fx.client.request.feign.admin.GroupTypeFeign; +import com.fx.server.vo.GroupTypeVO; import com.jfoenix.controls.JFXSpinner; import com.jfoenix.controls.JFXTabPane; import io.datafx.controller.ViewController; diff --git a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/admin/group/components/GroupDetailController.java b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/admin/group/components/GroupDetailController.java similarity index 97% rename from falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/admin/group/components/GroupDetailController.java rename to falsework-client/src/main/java/com/fx/client/gui/uicomponents/admin/group/components/GroupDetailController.java index a03bbe4..9896690 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/admin/group/components/GroupDetailController.java +++ b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/admin/group/components/GroupDetailController.java @@ -1,18 +1,17 @@ -package com.epri.fx.client.gui.uicomponents.admin.group.components; +package com.fx.client.gui.uicomponents.admin.group.components; -import com.epri.fx.client.gui.uicomponents.control.FilterableCheckBoxTreeItem; -import com.epri.fx.client.gui.uicomponents.control.FilterableTreeItem; -import com.epri.fx.client.gui.uicomponents.control.TreeItemPredicate; -import com.epri.fx.client.model.GroupDataModel; -import com.epri.fx.client.request.Request; -import com.epri.fx.client.request.feign.admin.GroupFeign; -import com.epri.fx.client.request.feign.admin.MenuFeign; -import com.epri.fx.client.store.ApplicatonStore; -import com.epri.fx.client.utils.Pinyin4jUtil; -import com.epri.fx.server.entity.User; -import com.epri.fx.server.vo.ElementVO; -import com.epri.fx.server.vo.GroupVO; -import com.epri.fx.server.vo.MenuVO; +import com.fx.client.gui.uicomponents.control.TreeItemPredicate; +import com.fx.client.gui.uicomponents.control.FilterableCheckBoxTreeItem; +import com.fx.client.gui.uicomponents.control.FilterableTreeItem; +import com.fx.client.model.GroupDataModel; +import com.fx.client.request.Request; +import com.fx.client.request.feign.admin.GroupFeign; +import com.fx.client.store.ApplicatonStore; +import com.fx.client.utils.Pinyin4jUtil; +import com.fx.server.entity.User; +import com.fx.server.vo.ElementVO; +import com.fx.server.vo.GroupVO; +import com.fx.server.vo.MenuVO; import com.jfoenix.controls.*; import com.jfoenix.svg.SVGGlyphLoader; import io.datafx.controller.ViewController; diff --git a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/admin/grouptype/GroupTypeManagementController.java b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/admin/grouptype/GroupTypeManagementController.java similarity index 96% rename from falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/admin/grouptype/GroupTypeManagementController.java rename to falsework-client/src/main/java/com/fx/client/gui/uicomponents/admin/grouptype/GroupTypeManagementController.java index 1e1f718..affea83 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/admin/grouptype/GroupTypeManagementController.java +++ b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/admin/grouptype/GroupTypeManagementController.java @@ -1,12 +1,11 @@ -package com.epri.fx.client.gui.uicomponents.admin.grouptype; +package com.fx.client.gui.uicomponents.admin.grouptype; -import com.epri.fx.client.model.GroupTypeDataModel; -import com.epri.fx.client.request.Request; -import com.epri.fx.client.request.feign.admin.GroupTypeFeign; -import com.epri.fx.client.request.feign.admin.UserFeign; -import com.epri.fx.client.store.ApplicatonStore; -import com.epri.fx.client.utils.Pinyin4jUtil; -import com.epri.fx.server.vo.GroupTypeVO; +import com.fx.client.model.GroupTypeDataModel; +import com.fx.client.request.Request; +import com.fx.client.request.feign.admin.GroupTypeFeign; +import com.fx.client.store.ApplicatonStore; +import com.fx.client.utils.Pinyin4jUtil; +import com.fx.server.vo.GroupTypeVO; import com.jfoenix.controls.*; import com.jfoenix.svg.SVGGlyphLoader; import io.datafx.controller.ViewController; diff --git a/falsework-client/src/main/java/com/fx/client/gui/uicomponents/admin/logManagement/LoginLogController.java b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/admin/logManagement/LoginLogController.java new file mode 100644 index 0000000..d2d2f2e --- /dev/null +++ b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/admin/logManagement/LoginLogController.java @@ -0,0 +1,229 @@ +package com.fx.client.gui.uicomponents.admin.logManagement; + +import com.fx.client.model.LoginLogDataModel; +import com.fx.client.request.Request; +import com.fx.client.request.feign.admin.LoginLogFeign; +import com.fx.client.utils.Pinyin4jUtil; +import com.fx.server.entity.log.SysLoginInfor; +import com.fx.server.util.DateUtils; +import com.jfoenix.controls.JFXDatePicker; +import com.jfoenix.controls.JFXSpinner; +import io.datafx.controller.ViewController; +import io.datafx.controller.flow.action.ActionMethod; +import io.datafx.controller.flow.action.ActionTrigger; +import io.datafx.core.concurrent.ProcessChain; +import javafx.collections.transformation.FilteredList; +import javafx.fxml.FXML; +import javafx.scene.Node; +import javafx.scene.control.*; +import javafx.scene.control.cell.PropertyValueFactory; +import javafx.scene.layout.VBox; +import javafx.util.Callback; + +import javax.annotation.PostConstruct; +import javax.inject.Inject; +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @description: + * @className: LoginLogController + * @author: liwen + * @date: 2021/1/4 14:06 + */ +@ViewController("/fxml/admin/logManagement/login_log.fxml") +public class LoginLogController { + + @FXML + private VBox contentPane; + + @FXML + private TextField loginNameTextfield; + @FXML + private TextField addrTextfield; + @FXML + private ComboBox statusComboBox; + + @FXML + private TableView tableView; + @FXML + private Pagination pagination; + @FXML + private JFXSpinner spinner; + @FXML + @ActionTrigger("rest") + private Button restButton; + @FXML + @ActionTrigger("search") + private Button searchButton; + @FXML + private JFXDatePicker startDatePicker; + @FXML + private JFXDatePicker endDatePicker; + + @FXML + private TableColumn infoIdColumn; + @FXML + private TableColumn loginNameColumn; + @FXML + private TableColumn ipaddrColumn; + @FXML + private TableColumn statusColumn; + @FXML + private TableColumn msgColumn; + @FXML + private TableColumn loginTimeColumn; + + @Inject + private LoginLogDataModel loginLogDataModel; + + @PostConstruct + private void init() { + spinner.setVisible(false); + statusComboBox.getSelectionModel().select(0); + infoIdColumn.setCellValueFactory(new PropertyValueFactory<>("infoId")); + loginNameColumn.setCellValueFactory(new PropertyValueFactory<>("loginName")); + ipaddrColumn.setCellValueFactory(new PropertyValueFactory<>("ipaddr")); + statusColumn.setCellValueFactory(new PropertyValueFactory<>("status")); + statusColumn.setCellFactory(col -> { + TableCell cell = new TableCell() { + private Label label = new Label(""); + + @Override + protected void updateItem(String item, boolean empty) { + super.updateItem(item, empty); + this.setText(null); + this.setGraphic(null); + if (!empty) { + + if (item.equals("0")) { + label.setId("status-success-label"); + label.setText("成功"); + } else { + label.setId("status-error-label"); + label.setText("失败"); + } + setGraphic(label); + } + } + }; + return cell; + }); + msgColumn.setCellValueFactory(new PropertyValueFactory<>("msg")); + loginTimeColumn.setCellValueFactory(new PropertyValueFactory<>("loginTime")); + loginTimeColumn.setCellFactory(col -> { + + TableCell cell = new TableCell() { + @Override + protected void updateItem(Date item, boolean empty) { + super.updateItem(item, empty); + this.setText(null); + this.setGraphic(null); + if (!empty && item != null) { + setText(DateUtils.formatDate(item, DateUtils.DATETIME_FORMAT)); + } + } + }; + return cell; + }); + + FilteredList filteredData = new FilteredList<>(loginLogDataModel.getSysLoginInfors(), p -> true); + tableView.setItems(filteredData); + loginNameTextfield.textProperty().addListener((o, oldVal, newVal) -> { + filteredData.setPredicate(elementProp -> { + if (newVal == null || newVal.isEmpty()) { + return true; + } + String val = Pinyin4jUtil.toPinYinLowercase(newVal); + return Pinyin4jUtil.toPinYinLowercase(elementProp.getLoginName()).contains(val); + }); + }); + + loginLogDataModel.selectedPersonIndexProperty().bind(tableView.getSelectionModel().selectedIndexProperty()); + pagination.pageCountProperty().bind(loginLogDataModel.pageCountProperty()); + pagination.setPageFactory(new Callback() { + @Override + public Node call(Integer param) { + showPage(param + 1); + return tableView; + } + }); + + + } + + + private void showPage(Integer page) { + + + Map queryMap = getQueryMap(); + queryMap.put("page", page); + queryMap.put("limit", 20); + query(queryMap); + + } + + private Map getQueryMap() { + String loginName = loginNameTextfield.getText(); + String ipaddr = addrTextfield.getText(); + String status = statusComboBox.getSelectionModel().selectedIndexProperty().getValue() == 0 ? null : (statusComboBox.getSelectionModel().selectedIndexProperty().getValue() == 1 ? "0" : "1"); + LocalDate beginDate = startDatePicker.getValue(); + LocalDate endDate = endDatePicker.getValue(); + + Map queryMap = new HashMap<>(); + queryMap.put("page", 0); + queryMap.put("limit", 20); + queryMap.put("loginName", loginName); + queryMap.put("ipaddr", ipaddr); + queryMap.put("status", status); + queryMap.put("startTime", beginDate != null ? beginDate.format(DateTimeFormatter.ofPattern("yyyyMMdd")) : null); + queryMap.put("endTime", endDate != null ? endDate.format(DateTimeFormatter.ofPattern("yyyyMMdd")) : null); + return queryMap; + } + + private void query(Map queryMap) { + + ProcessChain.create() + .addRunnableInPlatformThread(() -> { + loginLogDataModel.getSysLoginInfors().clear(); + spinner.setVisible(true); + contentPane.setDisable(true); + }) + .addSupplierInExecutor( + () -> Request.connector(LoginLogFeign.class).getSysLoginInfor(queryMap) + ) + .addConsumerInPlatformThread(result -> { + + List gateLogs = result.getDatas(); + loginLogDataModel.setPageCount((int) result.getTotal()); + loginLogDataModel.getSysLoginInfors().addAll(gateLogs); + + }) + .withFinal(() -> { + spinner.setVisible(false); + contentPane.setDisable(false); + }) + .onException(e -> e.printStackTrace()) + .run(); + } + + @ActionMethod("search") + private void search() { + pagination.currentPageIndexProperty().setValue(0); + query(getQueryMap()); + } + + @ActionMethod("rest") + private void rest() { + loginNameTextfield.setText(""); + addrTextfield.setText(""); + statusComboBox.getSelectionModel().select(0); + startDatePicker.valueProperty().set(null); + endDatePicker.valueProperty().set(null); + searchButton.fire(); + } +} diff --git a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/admin/log/LogManagementController.java b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/admin/logManagement/OperationLogController.java similarity index 86% rename from falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/admin/log/LogManagementController.java rename to falsework-client/src/main/java/com/fx/client/gui/uicomponents/admin/logManagement/OperationLogController.java index c65a23c..beafab4 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/admin/log/LogManagementController.java +++ b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/admin/logManagement/OperationLogController.java @@ -1,43 +1,28 @@ -package com.epri.fx.client.gui.uicomponents.admin.log; +package com.fx.client.gui.uicomponents.admin.logManagement; -import com.epri.fx.client.gui.feature.FeatureResourceConsumer; -import com.epri.fx.client.gui.feature.HideByFeature; -import com.epri.fx.client.gui.uicomponents.admin.user.components.UserAddController; -import com.epri.fx.client.gui.uicomponents.admin.user.components.UserEditController; -import com.epri.fx.client.model.LogDataModel; -import com.epri.fx.client.model.UserDataModel; -import com.epri.fx.client.request.Request; -import com.epri.fx.client.request.feign.admin.LogFeign; -import com.epri.fx.client.request.feign.admin.UserFeign; -import com.epri.fx.client.request.feign.login.LoginFeign; -import com.epri.fx.client.store.ApplicatonStore; -import com.epri.fx.client.utils.Pinyin4jUtil; -import com.epri.fx.server.entity.User; -import com.epri.fx.server.entity.log.GateLog; -import com.epri.fx.server.entity.log.LogInfo; -import com.epri.fx.server.util.DateUtils; -import com.epri.fx.server.vo.UserVO; +import com.fx.client.gui.feature.FeatureResourceConsumer; +import com.fx.client.model.LogDataModel; +import com.fx.client.request.Request; +import com.fx.client.request.feign.admin.LogFeign; +import com.fx.client.request.feign.admin.UserFeign; +import com.fx.client.utils.Pinyin4jUtil; +import com.fx.server.entity.log.GateLog; import com.jfoenix.controls.JFXAlert; import com.jfoenix.controls.JFXButton; import com.jfoenix.controls.JFXDialogLayout; -import com.jfoenix.svg.SVGGlyphLoader; import io.datafx.controller.ViewController; -import io.datafx.controller.flow.FlowException; import io.datafx.controller.flow.action.ActionMethod; import io.datafx.controller.flow.action.ActionTrigger; import io.datafx.controller.flow.context.ActionHandler; import io.datafx.controller.flow.context.FlowActionHandler; -import io.datafx.controller.util.VetoException; import io.datafx.core.concurrent.ProcessChain; import io.datafx.eventsystem.Event; import io.datafx.eventsystem.OnEvent; import javafx.collections.transformation.FilteredList; import javafx.fxml.FXML; -import javafx.geometry.Pos; import javafx.scene.Node; import javafx.scene.control.*; import javafx.scene.control.cell.PropertyValueFactory; -import javafx.scene.layout.HBox; import javafx.scene.layout.StackPane; import javafx.scene.layout.VBox; import javafx.stage.Modality; @@ -57,8 +42,8 @@ import java.util.Map; * @author: liwen * @date: 2020/3/4 21:05 */ -@ViewController(value = "/fxml/admin/log/log_management.fxml", title = "操作日志") -public class LogManagementController { +@ViewController(value = "/fxml/admin/logManagement/operation_log.fxml", title = "操作日志") +public class OperationLogController { public static final String CONTENT_PANE = "ContentPane"; @@ -220,6 +205,7 @@ public class LogManagementController { @ActionMethod("search") private void search() { + pagination.currentPageIndexProperty().setValue(0); Map queryMap = new HashMap<>(); queryMap.put("keyId", searchField.getText()); query(queryMap); diff --git a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/admin/menu/MenuManagementController.java b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/admin/menu/MenuManagementController.java similarity index 97% rename from falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/admin/menu/MenuManagementController.java rename to falsework-client/src/main/java/com/fx/client/gui/uicomponents/admin/menu/MenuManagementController.java index 9585c6f..d57c943 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/admin/menu/MenuManagementController.java +++ b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/admin/menu/MenuManagementController.java @@ -1,18 +1,17 @@ -package com.epri.fx.client.gui.uicomponents.admin.menu; +package com.fx.client.gui.uicomponents.admin.menu; -import com.epri.fx.client.gui.uicomponents.control.FilterableTreeItem; -import com.epri.fx.client.gui.uicomponents.control.TreeItemPredicate; -import com.epri.fx.client.model.MenuDataModel; -import com.epri.fx.client.request.Request; -import com.epri.fx.client.request.feign.admin.ElementFeign; -import com.epri.fx.client.request.feign.admin.MenuFeign; -import com.epri.fx.client.request.feign.admin.UserFeign; -import com.epri.fx.client.store.ApplicatonStore; -import com.epri.fx.client.utils.Pinyin4jUtil; -import com.epri.fx.server.entity.Element; -import com.epri.fx.server.msg.TableResultResponse; -import com.epri.fx.server.vo.ElementVO; -import com.epri.fx.server.vo.MenuVO; +import com.fx.client.gui.uicomponents.control.TreeItemPredicate; +import com.fx.client.gui.uicomponents.control.FilterableTreeItem; +import com.fx.client.model.MenuDataModel; +import com.fx.client.request.Request; +import com.fx.client.request.feign.admin.ElementFeign; +import com.fx.client.request.feign.admin.MenuFeign; +import com.fx.client.store.ApplicatonStore; +import com.fx.client.utils.Pinyin4jUtil; +import com.fx.server.entity.Element; +import com.fx.server.msg.TableResultResponse; +import com.fx.server.vo.ElementVO; +import com.fx.server.vo.MenuVO; import com.jfoenix.controls.*; import com.jfoenix.svg.SVGGlyphLoader; import io.datafx.controller.ViewController; @@ -170,6 +169,7 @@ public class MenuManagementController { @PostConstruct private void init() { + final ToggleGroup group = new ToggleGroup(); addButton.setToggleGroup(group); editButton.setToggleGroup(group); diff --git a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/admin/user/UserManagementController.java b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/admin/user/UserManagementController.java similarity index 93% rename from falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/admin/user/UserManagementController.java rename to falsework-client/src/main/java/com/fx/client/gui/uicomponents/admin/user/UserManagementController.java index 88189a9..e732fb5 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/admin/user/UserManagementController.java +++ b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/admin/user/UserManagementController.java @@ -1,21 +1,20 @@ -package com.epri.fx.client.gui.uicomponents.admin.user; +package com.fx.client.gui.uicomponents.admin.user; -import com.epri.fx.client.gui.feature.FeatureResourceConsumer; -import com.epri.fx.client.gui.feature.HideByFeature; -import com.epri.fx.client.gui.uicomponents.admin.user.components.UserAddController; -import com.epri.fx.client.gui.uicomponents.admin.user.components.UserEditController; -import com.epri.fx.client.model.UserDataModel; -import com.epri.fx.client.request.Request; -import com.epri.fx.client.request.feign.admin.UserFeign; -import com.epri.fx.client.store.ApplicatonStore; -import com.epri.fx.client.utils.Pinyin4jUtil; -import com.epri.fx.server.entity.User; -import com.epri.fx.server.util.DateUtils; -import com.epri.fx.server.vo.UserVO; +import com.fx.client.gui.feature.FeatureResourceConsumer; +import com.fx.client.gui.feature.HideByFeature; +import com.fx.client.gui.uicomponents.admin.user.components.UserAddController; +import com.fx.client.gui.uicomponents.admin.user.components.UserEditController; +import com.fx.client.model.UserDataModel; +import com.fx.client.request.Request; +import com.fx.client.request.feign.admin.UserFeign; +import com.fx.client.store.ApplicatonStore; +import com.fx.client.utils.Pinyin4jUtil; +import com.fx.server.entity.User; +import com.fx.server.util.DateUtils; +import com.fx.server.vo.UserVO; import com.jfoenix.controls.JFXAlert; import com.jfoenix.controls.JFXButton; import com.jfoenix.controls.JFXDialogLayout; -import com.jfoenix.svg.SVGGlyph; import com.jfoenix.svg.SVGGlyphLoader; import io.datafx.controller.ViewController; import io.datafx.controller.flow.FlowException; @@ -336,6 +335,8 @@ public class UserManagementController { @ActionMethod("search") private void search() { + pagination.currentPageIndexProperty().setValue(0); + Map queryMap = new HashMap<>(); queryMap.put("keyId", searchField.getText()); query(queryMap); @@ -357,7 +358,7 @@ public class UserManagementController { dataModel.setPageCount((int) result.getTotal()); for (User user : userList) { - dataModel.getUsers().add(new UserVO(user.getId(), user.getName(), user.getUsername(), DateUtils.format(user.getUpdTime(), DateUtils.DATE_TIME_PATTERN), user.getUpdUser(), user.getSex(), user.getDescription())); + dataModel.getUsers().add(new UserVO(user.getId(), user.getName(), user.getUsername(), DateUtils.formatDate(user.getUpdTime(), DateUtils.DATETIME_FORMAT), user.getUpdUser(), user.getSex(), user.getDescription())); } }) .withFinal(() -> { diff --git a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/admin/user/components/UserAddController.java b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/admin/user/components/UserAddController.java similarity index 88% rename from falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/admin/user/components/UserAddController.java rename to falsework-client/src/main/java/com/fx/client/gui/uicomponents/admin/user/components/UserAddController.java index 1202f15..46f58df 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/admin/user/components/UserAddController.java +++ b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/admin/user/components/UserAddController.java @@ -1,10 +1,10 @@ -package com.epri.fx.client.gui.uicomponents.admin.user.components; +package com.fx.client.gui.uicomponents.admin.user.components; -import com.epri.fx.client.gui.uicomponents.admin.user.UserManagementController; -import com.epri.fx.client.model.UserDataModel; -import com.epri.fx.client.request.Request; -import com.epri.fx.client.request.feign.admin.UserFeign; -import com.epri.fx.server.entity.User; +import com.fx.client.gui.uicomponents.admin.user.UserManagementController; +import com.fx.client.model.UserDataModel; +import com.fx.client.request.Request; +import com.fx.client.request.feign.admin.UserFeign; +import com.fx.server.entity.User; import com.jfoenix.controls.*; import io.datafx.controller.ViewController; import io.datafx.controller.flow.FlowException; diff --git a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/admin/user/components/UserEditController.java b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/admin/user/components/UserEditController.java similarity index 91% rename from falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/admin/user/components/UserEditController.java rename to falsework-client/src/main/java/com/fx/client/gui/uicomponents/admin/user/components/UserEditController.java index db9fa27..d9fa311 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/admin/user/components/UserEditController.java +++ b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/admin/user/components/UserEditController.java @@ -1,11 +1,11 @@ -package com.epri.fx.client.gui.uicomponents.admin.user.components; +package com.fx.client.gui.uicomponents.admin.user.components; -import com.epri.fx.client.gui.uicomponents.admin.user.UserManagementController; -import com.epri.fx.client.model.UserDataModel; -import com.epri.fx.client.request.Request; -import com.epri.fx.client.request.feign.admin.UserFeign; -import com.epri.fx.server.entity.User; -import com.epri.fx.server.vo.UserVO; +import com.fx.client.gui.uicomponents.admin.user.UserManagementController; +import com.fx.client.model.UserDataModel; +import com.fx.client.request.Request; +import com.fx.client.request.feign.admin.UserFeign; +import com.fx.server.entity.User; +import com.fx.server.vo.UserVO; import com.jfoenix.controls.*; import io.datafx.controller.ViewController; import io.datafx.controller.flow.FlowException; diff --git a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/basicInfo/BasicDataSetController.java b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/basicInfo/BasicDataSetController.java similarity index 84% rename from falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/basicInfo/BasicDataSetController.java rename to falsework-client/src/main/java/com/fx/client/gui/uicomponents/basicInfo/BasicDataSetController.java index b43b2be..244dfb0 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/basicInfo/BasicDataSetController.java +++ b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/basicInfo/BasicDataSetController.java @@ -1,4 +1,4 @@ -package com.epri.fx.client.gui.uicomponents.basicInfo; +package com.fx.client.gui.uicomponents.basicInfo; import io.datafx.controller.ViewController; diff --git a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/basicInfo/CoalPriceDiffController.java b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/basicInfo/CoalPriceDiffController.java similarity index 84% rename from falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/basicInfo/CoalPriceDiffController.java rename to falsework-client/src/main/java/com/fx/client/gui/uicomponents/basicInfo/CoalPriceDiffController.java index de621da..8cd05b4 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/basicInfo/CoalPriceDiffController.java +++ b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/basicInfo/CoalPriceDiffController.java @@ -1,4 +1,4 @@ -package com.epri.fx.client.gui.uicomponents.basicInfo; +package com.fx.client.gui.uicomponents.basicInfo; import io.datafx.controller.ViewController; diff --git a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/basicInfo/CurrentFreightController.java b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/basicInfo/CurrentFreightController.java similarity index 84% rename from falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/basicInfo/CurrentFreightController.java rename to falsework-client/src/main/java/com/fx/client/gui/uicomponents/basicInfo/CurrentFreightController.java index 2448246..8624936 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/basicInfo/CurrentFreightController.java +++ b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/basicInfo/CurrentFreightController.java @@ -1,4 +1,4 @@ -package com.epri.fx.client.gui.uicomponents.basicInfo; +package com.fx.client.gui.uicomponents.basicInfo; import io.datafx.controller.ViewController; diff --git a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/basicInfo/MainConclusionController.java b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/basicInfo/MainConclusionController.java similarity index 84% rename from falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/basicInfo/MainConclusionController.java rename to falsework-client/src/main/java/com/fx/client/gui/uicomponents/basicInfo/MainConclusionController.java index a947f27..b1173ce 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/basicInfo/MainConclusionController.java +++ b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/basicInfo/MainConclusionController.java @@ -1,4 +1,4 @@ -package com.epri.fx.client.gui.uicomponents.basicInfo; +package com.fx.client.gui.uicomponents.basicInfo; import io.datafx.controller.ViewController; diff --git a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/basicInfo/RailwayCostController.java b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/basicInfo/RailwayCostController.java similarity index 84% rename from falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/basicInfo/RailwayCostController.java rename to falsework-client/src/main/java/com/fx/client/gui/uicomponents/basicInfo/RailwayCostController.java index 32883d5..407ff88 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/basicInfo/RailwayCostController.java +++ b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/basicInfo/RailwayCostController.java @@ -1,4 +1,4 @@ -package com.epri.fx.client.gui.uicomponents.basicInfo; +package com.fx.client.gui.uicomponents.basicInfo; import io.datafx.controller.ViewController; diff --git a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/container/TabPaneFlowContainer.java b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/container/TabPaneFlowContainer.java similarity index 97% rename from falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/container/TabPaneFlowContainer.java rename to falsework-client/src/main/java/com/fx/client/gui/uicomponents/container/TabPaneFlowContainer.java index ebd8d22..b83c03f 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/container/TabPaneFlowContainer.java +++ b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/container/TabPaneFlowContainer.java @@ -1,4 +1,4 @@ -package com.epri.fx.client.gui.uicomponents.container; +package com.fx.client.gui.uicomponents.container; import com.jfoenix.controls.JFXTabPane; import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon; diff --git a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/control/FilterableCheckBoxTreeItem.java b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/control/FilterableCheckBoxTreeItem.java similarity index 98% rename from falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/control/FilterableCheckBoxTreeItem.java rename to falsework-client/src/main/java/com/fx/client/gui/uicomponents/control/FilterableCheckBoxTreeItem.java index aae2588..9f34e00 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/control/FilterableCheckBoxTreeItem.java +++ b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/control/FilterableCheckBoxTreeItem.java @@ -1,4 +1,4 @@ -package com.epri.fx.client.gui.uicomponents.control; +package com.fx.client.gui.uicomponents.control; import javafx.beans.binding.Bindings; import javafx.beans.property.ObjectProperty; diff --git a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/control/FilterableTreeItem.java b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/control/FilterableTreeItem.java similarity index 98% rename from falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/control/FilterableTreeItem.java rename to falsework-client/src/main/java/com/fx/client/gui/uicomponents/control/FilterableTreeItem.java index e8c3e11..3ef502f 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/control/FilterableTreeItem.java +++ b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/control/FilterableTreeItem.java @@ -1,4 +1,4 @@ -package com.epri.fx.client.gui.uicomponents.control; +package com.fx.client.gui.uicomponents.control; import javafx.beans.binding.Bindings; import javafx.beans.property.ObjectProperty; diff --git a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/control/LFXDecorator.java b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/control/LFXDecorator.java similarity index 99% rename from falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/control/LFXDecorator.java rename to falsework-client/src/main/java/com/fx/client/gui/uicomponents/control/LFXDecorator.java index 2914d1b..9d04923 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/control/LFXDecorator.java +++ b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/control/LFXDecorator.java @@ -1,4 +1,4 @@ -package com.epri.fx.client.gui.uicomponents.control; +package com.fx.client.gui.uicomponents.control; import com.jfoenix.controls.JFXButton; import com.jfoenix.svg.SVGGlyph; @@ -21,8 +21,6 @@ import javafx.geometry.Rectangle2D; import javafx.scene.Cursor; import javafx.scene.Node; import javafx.scene.control.Tooltip; -import javafx.scene.effect.DropShadow; -import javafx.scene.effect.Shadow; import javafx.scene.input.MouseEvent; import javafx.scene.layout.Background; import javafx.scene.layout.BackgroundFill; diff --git a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/control/TreeItemPredicate.java b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/control/TreeItemPredicate.java similarity index 85% rename from falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/control/TreeItemPredicate.java rename to falsework-client/src/main/java/com/fx/client/gui/uicomponents/control/TreeItemPredicate.java index ccf7a5d..d7e7e93 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/control/TreeItemPredicate.java +++ b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/control/TreeItemPredicate.java @@ -1,4 +1,4 @@ -package com.epri.fx.client.gui.uicomponents.control; +package com.fx.client.gui.uicomponents.control; import javafx.scene.control.TreeItem; diff --git a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/home/HomeController.java b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/home/HomeController.java similarity index 97% rename from falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/home/HomeController.java rename to falsework-client/src/main/java/com/fx/client/gui/uicomponents/home/HomeController.java index 3135a4c..7c1f5ff 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/home/HomeController.java +++ b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/home/HomeController.java @@ -1,7 +1,7 @@ -package com.epri.fx.client.gui.uicomponents.home; +package com.fx.client.gui.uicomponents.home; -import com.epri.fx.client.bean.CountryPath; -import com.epri.fx.client.store.ApplicatonStore; +import com.fx.client.bean.CountryPath; +import com.fx.client.store.ApplicatonStore; import eu.hansolo.tilesfx.Tile; import eu.hansolo.tilesfx.TileBuilder; import eu.hansolo.tilesfx.TimeSection; @@ -10,13 +10,9 @@ import eu.hansolo.tilesfx.addons.Indicator; import eu.hansolo.tilesfx.chart.ChartData; import eu.hansolo.tilesfx.chart.RadarChart; import eu.hansolo.tilesfx.chart.TilesFXSeries; -import eu.hansolo.tilesfx.colors.Bright; -import eu.hansolo.tilesfx.colors.Dark; import eu.hansolo.tilesfx.skins.BarChartItem; import eu.hansolo.tilesfx.skins.LeaderBoardItem; import eu.hansolo.tilesfx.tools.Country; -import eu.hansolo.tilesfx.tools.FlowGridPane; -import eu.hansolo.tilesfx.tools.Helper; import eu.hansolo.tilesfx.tools.Location; import eu.hansolo.tilesfx.weather.DarkSky; import io.datafx.controller.ViewController; @@ -27,28 +23,23 @@ import javafx.beans.property.DoubleProperty; import javafx.beans.property.SimpleDoubleProperty; import javafx.collections.ObservableList; import javafx.fxml.FXML; -import javafx.geometry.Insets; -import javafx.geometry.Pos; import javafx.scene.Node; import javafx.scene.Parent; import javafx.scene.chart.XYChart; -import javafx.scene.layout.*; +import javafx.scene.layout.GridPane; import javafx.scene.paint.Color; import javafx.scene.paint.CycleMethod; import javafx.scene.paint.LinearGradient; import javafx.scene.paint.Stop; -import javafx.scene.text.TextAlignment; import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; import java.time.LocalTime; -import java.time.ZonedDateTime; -import java.util.*; +import java.util.List; +import java.util.Map; +import java.util.Random; import java.util.concurrent.ConcurrentHashMap; -import static javafx.scene.layout.Region.USE_COMPUTED_SIZE; -import static javafx.scene.layout.Region.USE_PREF_SIZE; - /** * @description: * @className: HomeController diff --git a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/login/LoadingController.java b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/login/LoadingController.java similarity index 82% rename from falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/login/LoadingController.java rename to falsework-client/src/main/java/com/fx/client/gui/uicomponents/login/LoadingController.java index 41110d4..464ea85 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/login/LoadingController.java +++ b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/login/LoadingController.java @@ -1,4 +1,4 @@ -package com.epri.fx.client.gui.uicomponents.login; +package com.fx.client.gui.uicomponents.login; import io.datafx.controller.ViewController; diff --git a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/login/LoginController.java b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/login/LoginController.java similarity index 91% rename from falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/login/LoginController.java rename to falsework-client/src/main/java/com/fx/client/gui/uicomponents/login/LoginController.java index 12c314c..46c8e1a 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/login/LoginController.java +++ b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/login/LoginController.java @@ -1,18 +1,19 @@ -package com.epri.fx.client.gui.uicomponents.login; +package com.fx.client.gui.uicomponents.login; -import com.epri.fx.client.bean.MenuVoCell; -import com.epri.fx.client.gui.uicomponents.main.MainController; -import com.epri.fx.client.request.Request; -import com.epri.fx.client.request.feign.admin.MenuFeign; -import com.epri.fx.client.request.feign.login.LoginFeign; -import com.epri.fx.client.store.ApplicatonStore; -import com.epri.fx.client.utils.AlertUtil; -import com.epri.fx.client.websocket.Session; -import com.epri.fx.server.util.EncryptUtil; -import com.epri.fx.server.util.user.JwtAuthenticationRequest; -import com.epri.fx.server.vo.FrontUser; -import com.epri.fx.server.vo.MenuVO; -import com.epri.fx.server.vo.PermissionInfo; +import com.fx.client.bean.MenuVoCell; +import com.fx.client.gui.uicomponents.main.MainController; +import com.fx.client.request.Request; +import com.fx.client.request.feign.admin.MenuFeign; +import com.fx.client.request.feign.login.LoginFeign; +import com.fx.client.store.ApplicatonStore; +import com.fx.client.utils.AlertUtil; +import com.fx.client.websocket.WSClient; +import com.fx.server.msg.ObjectRestResponse; +import com.fx.server.util.EncryptUtil; +import com.fx.server.util.user.JwtAuthenticationRequest; +import com.fx.server.vo.FrontUser; +import com.fx.server.vo.MenuVO; +import com.fx.server.vo.PermissionInfo; import com.jfoenix.controls.JFXButton; import com.jfoenix.controls.JFXPasswordField; import com.jfoenix.controls.JFXProgressBar; @@ -21,14 +22,10 @@ import com.jfoenix.svg.SVGGlyph; import com.jfoenix.svg.SVGGlyphLoader; import com.jfoenix.validation.RegexValidator; import io.datafx.controller.ViewController; -import io.datafx.controller.flow.FlowException; import io.datafx.controller.flow.action.ActionMethod; import io.datafx.controller.flow.action.ActionTrigger; import io.datafx.controller.flow.context.ActionHandler; -import io.datafx.controller.flow.context.FXMLViewFlowContext; import io.datafx.controller.flow.context.FlowActionHandler; -import io.datafx.controller.flow.context.ViewFlowContext; -import io.datafx.controller.util.VetoException; import io.datafx.core.concurrent.ProcessChain; import javafx.animation.*; import javafx.beans.binding.Bindings; @@ -49,10 +46,10 @@ import javafx.scene.layout.HBox; import javafx.scene.layout.Pane; import javafx.scene.layout.StackPane; import javafx.util.Duration; +import lombok.SneakyThrows; import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; -import javax.inject.Inject; import java.io.File; import java.util.Arrays; import java.util.Comparator; @@ -69,6 +66,9 @@ import java.util.stream.Collectors; @ViewController("/fxml/login/login.fxml") public class LoginController { + @ActionHandler + private FlowActionHandler actionHandler; + @FXML private StackPane rootPane; @FXML @@ -122,17 +122,14 @@ public class LoginController { private Timeline frontTimeLine = new Timeline(); private Timeline backTimeLine = new Timeline(); - @ActionHandler - private FlowActionHandler actionHandler; - private SequentialTransition sequentialTransition = new SequentialTransition(); private DoubleProperty imageWidth = new SimpleDoubleProperty(); private DoubleProperty imageHeiht = new SimpleDoubleProperty(); - @Inject - private Session session; +// @Inject +// private WebSocketManagement webSocketManagement; @FXML @ActionTrigger("login") @@ -140,8 +137,6 @@ public class LoginController { @FXML private JFXButton registeredBut; - @FXMLViewFlowContext - private ViewFlowContext flowContext; @PostConstruct public void init() { @@ -209,6 +204,9 @@ public class LoginController { translateTransition ); parallelTransition.setCycleCount(1); + parallelTransition.setOnFinished(event -> { + userNameTextField.requestFocus(); + }); parallelTransition.play(); @@ -255,6 +253,7 @@ public class LoginController { pt.setLly(height + Math.cos(t) * back); } + @SneakyThrows private void loadingImage() { ImageView logBack = new ImageView("/images/login.jpg"); @@ -262,7 +261,9 @@ public class LoginController { logBack.fitWidthProperty().bind(imageWidth); imagePane.getChildren().add(new Label("", logBack)); - List files = Arrays.asList(new File(this.getClass().getResource("/images/login/").getPath()).listFiles()); + String imgUrl=this.getClass().getClassLoader().getResource("").toURI().getPath()+"images/login"; + System.err.println(imgUrl); + List files = Arrays.asList(new File(imgUrl).listFiles()); sequentialTransition.setAutoReverse(true); sequentialTransition.setCycleCount(Timeline.INDEFINITE); @@ -403,7 +404,16 @@ public class LoginController { centerPane.setDisable(true); loginBut.setText("正在登录..."); }) - .addSupplierInExecutor(() -> Request.connector(LoginFeign.class).login(jwtAuthenticationRequest)) + .addSupplierInExecutor(() -> { + ObjectRestResponse rel = Request.connector(LoginFeign.class).login(jwtAuthenticationRequest); + if (rel.getStatus() == 200) { + WSClient.getInstance().addHeader("Authorization", rel.getData()); + WSClient.getInstance().addHeader("userName",userNameTextField.getText()); + WSClient.getInstance().connect(); + + } + return rel; + }) .addConsumerInPlatformThread(rel -> { if (rel.getStatus() == 200) { @@ -432,10 +442,12 @@ public class LoginController { public void loadApplicatonStore() { ProcessChain.create() .addRunnableInPlatformThread(() -> { + + try { actionHandler.navigate(LoadingController.class); } catch (Exception e) { - throw new RuntimeException(e); + e.printStackTrace(); } ApplicatonStore.setName(""); ApplicatonStore.getAllMenu().clear(); @@ -473,6 +485,7 @@ public class LoginController { .addConsumerInPlatformThread(rel -> { ApplicatonStore.getPermissionMenus().addAll(rel); + }) .addSupplierInExecutor(() -> { @@ -507,6 +520,7 @@ public class LoginController { try { actionHandler.navigate(MainController.class); + } catch (Exception e) { throw new RuntimeException(e); } @@ -515,9 +529,7 @@ public class LoginController { e.printStackTrace(); try { actionHandler.navigate(LoginController.class); - } catch (VetoException vetoException) { - vetoException.printStackTrace(); - } catch (FlowException flowException) { + } catch (Exception flowException) { flowException.printStackTrace(); } }) diff --git a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/main/MainController.java b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/main/MainController.java similarity index 79% rename from falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/main/MainController.java rename to falsework-client/src/main/java/com/fx/client/gui/uicomponents/main/MainController.java index 34407e9..e3471e2 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/main/MainController.java +++ b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/main/MainController.java @@ -1,19 +1,18 @@ -package com.epri.fx.client.gui.uicomponents.main; +package com.fx.client.gui.uicomponents.main; -import com.epri.fx.client.AppStartup; -import com.epri.fx.client.bean.MenuVoCell; -import com.epri.fx.client.gui.feature.FeatureResourceConsumer; -import com.epri.fx.client.gui.uicomponents.home.HomeController; -import com.epri.fx.client.gui.uicomponents.login.LoginController; -import com.epri.fx.client.gui.uicomponents.main.components.UserInfoController; -import com.epri.fx.client.store.ApplicatonStore; -import com.epri.fx.server.vo.MenuVO; -import com.jfoenix.assets.JFoenixResources; +import com.fx.client.AppStartup; +import com.fx.client.bean.MenuVoCell; +import com.fx.client.gui.feature.FeatureResourceConsumer; +import com.fx.client.gui.uicomponents.home.HomeController; +import com.fx.client.gui.uicomponents.login.LoginController; +import com.fx.client.gui.uicomponents.main.components.UserInfoController; +import com.fx.client.store.ApplicatonStore; +import com.fx.client.websocket.WSClient; +import com.fx.server.vo.MenuVO; import com.jfoenix.controls.*; import com.jfoenix.svg.SVGGlyphLoader; import io.datafx.controller.ViewController; import io.datafx.controller.context.ApplicationContext; -import io.datafx.controller.context.FXMLApplicationContext; import io.datafx.controller.flow.Flow; import io.datafx.controller.flow.FlowException; import io.datafx.controller.flow.FlowHandler; @@ -31,6 +30,8 @@ import io.datafx.eventsystem.EventTrigger; import io.datafx.eventsystem.OnEvent; import javafx.animation.Transition; import javafx.beans.property.ListProperty; +import javafx.beans.property.ObjectProperty; +import javafx.beans.property.SimpleObjectProperty; import javafx.collections.ObservableList; import javafx.fxml.FXML; import javafx.geometry.Insets; @@ -61,13 +62,10 @@ import java.util.HashMap; @ViewController("/fxml/main/main.fxml") public class MainController { - @FXMLApplicationContext - private ApplicationContext context; - + private ObjectProperty selectItemProperty = new SimpleObjectProperty<>(); @ActionHandler private FlowActionHandler actionHandler; - @FXML private StackPane rootPane; @FXML @@ -87,7 +85,7 @@ public class MainController { private JFXButton homeButton; @FXML @ActionTrigger("showSkinPane") - private JFXToggleButton styleBut; + private JFXToggleNode styleNode; //刷新按钮 @FXML @EventTrigger("refresh") @@ -104,7 +102,7 @@ public class MainController { @ActionTrigger("userInfo") private JFXButton userButton; @FXML - private JFXButton rolesBut; + private JFXButton bellButton; @FXML @@ -131,6 +129,8 @@ public class MainController { @PostConstruct public void init() throws FlowException { + + ApplicationContext.getInstance().register(this, MainController.class); rootPane.getChildren().removeAll(navigationList); rootPane.getChildren().removeAll(leftDrawer); rootPane.getChildren().removeAll(tabPane); @@ -140,13 +140,15 @@ public class MainController { try { homeButton.setGraphic(SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".home-outline")); refreshButton.setGraphic(SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".shuaxin1")); - rolesBut.setGraphic(SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".admin")); + bellButton.setGraphic(SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".cc-bell-o")); userButton.setGraphic(SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".ChevronDownCircle")); + styleNode.setGraphic(SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".moon-fill")); + } catch (Exception e) { e.printStackTrace(); } datePicker.setEditable(false); - datePicker.valueProperty().addListener((observable, oldValue, newValue) ->{ + datePicker.valueProperty().addListener((observable, oldValue, newValue) -> { refreshButton.fire(); }); leftDrawer.setSidePane(navigationList); @@ -172,15 +174,35 @@ public class MainController { }); tabPane.setTabClosingPolicy(TabPane.TabClosingPolicy.ALL_TABS); + tabPane.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> { + Object value = newValue.getUserData(); + for (Object item : navigationList.getItems()) { + if (item instanceof MenuVO) { + if (item == value) { + navigationList.getSelectionModel().select(value); + break; + } + + } else if (item instanceof JFXListView) { + JFXListView jfxListView = (JFXListView) item; + for (MenuVO menuVO : jfxListView.getItems()) { + if (menuVO == value) { + navigationList.getSelectionModel().select(2); + jfxListView.getSelectionModel().select(menuVO); + + break; + } + } + } + + } + + }); drawersStack.setContent(tabPane); drawersStack.toggle(leftDrawer); drawersStack.setEffect(null); - try { - addTab("主页", SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".home-outline"), HomeController.class); - } catch (Exception e) { - e.printStackTrace(); - } - styleBut.selectedProperty().bindBidirectional(ApplicatonStore.styleProperty()); + + styleNode.selectedProperty().bindBidirectional(ApplicatonStore.styleProperty()); featureResourceConsumer.consumeResource(this); navigationList.setCellFactory(listView -> new JFXListCell() { @@ -206,13 +228,14 @@ public class MainController { navigationList.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> { if (newValue instanceof MenuVO) { try { - addTab(((MenuVO) newValue).getTitle(), SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + "." + ((MenuVO) newValue).getIcon()), Class.forName(((MenuVO) newValue).getHref())); + addTab(((MenuVO) newValue).getTitle(), SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + "." + ((MenuVO) newValue).getIcon()), Class.forName(((MenuVO) newValue).getHref()), newValue); } catch (Exception e) { e.printStackTrace(); } } }); + navigationList.depthProperty().setValue(0); navigationList.expandedProperty().set(true); initData(); @@ -220,6 +243,7 @@ public class MainController { private JFXPopup getPopOver() { if (popOver == null) { + try { popOver = new JFXPopup(new Flow(UserInfoController.class).start()); } catch (FlowException e) { @@ -235,7 +259,6 @@ public class MainController { } - private void initData() { ListProperty listProperty = ApplicatonStore.getMenuVoCells(); @@ -260,7 +283,7 @@ public class MainController { listView.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> { if (newValue instanceof MenuVO) { try { - addTab(newValue.getTitle(), SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + "." + newValue.getIcon()), Class.forName(newValue.getHref())); + addTab(newValue.getTitle(), SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + "." + newValue.getIcon()), Class.forName(newValue.getHref()), newValue); } catch (Exception e) { e.printStackTrace(); } @@ -298,7 +321,7 @@ public class MainController { } } - + navigationList.getSelectionModel().select(0); } @@ -309,8 +332,8 @@ public class MainController { * @auther: liwen * @date: 2020/6/28 9:57 上午 */ - private void addTab(String title, Node icon, Class controllerClass) { - addTab(title, icon, new Flow(controllerClass)); + public void addTab(String title, Node icon, Class controllerClass, Object userData) { + addTab(title, icon, new Flow(controllerClass), userData); } /** @@ -320,13 +343,14 @@ public class MainController { * @auther: liwen * @date: 2020/6/28 9:57 上午 */ - private void addTab(String title, Node icon, Flow flow) { + public void addTab(String title, Node icon, Flow flow, Object userData) { FlowHandler flowHandler = flow.createHandler(); Tab tab = tabsMap.get(title); if (tab == null) { tab = new Tab(title); + tab.setUserData(userData); tab.setGraphic(icon); try { @@ -363,7 +387,7 @@ public class MainController { @ActionMethod("goHome") private void goHome() { try { - addTab("主页", SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".home-outline"), HomeController.class); + addTab("主页", SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".home-outline"), HomeController.class, null); } catch (Exception e) { e.printStackTrace(); } @@ -372,6 +396,8 @@ public class MainController { @ActionMethod("userInfo") private void userInfo() throws VetoException, FlowException { + + getPopOver().show(userButton, JFXPopup.PopupVPosition.TOP, JFXPopup.PopupHPosition.RIGHT, 0, userButton.getHeight()); } @@ -380,14 +406,24 @@ public class MainController { ProcessChain.create().addRunnableInPlatformThread(() -> { String style1 = AppStartup.class.getResource("/css/app-light.css").toExternalForm(); String style2 = AppStartup.class.getResource("/css/app-dark.css").toExternalForm(); - if (styleBut.isSelected()) { - styleBut.setText("明亮"); - styleBut.getScene().getStylesheets().removeAll(style1); - styleBut.getScene().getStylesheets().addAll(style2); + if (styleNode.isSelected()) { + + try { + styleNode.setGraphic(SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".taiyang")); + } catch (Exception e) { + e.printStackTrace(); + } + styleNode.getScene().getStylesheets().removeAll(style1); + styleNode.getScene().getStylesheets().addAll(style2); } else { - styleBut.setText("黑暗"); - styleBut.getScene().getStylesheets().removeAll(style2); - styleBut.getScene().getStylesheets().addAll(style1); + try { + styleNode.setGraphic(SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".moon-fill")); + } catch (Exception e) { + e.printStackTrace(); + } + + styleNode.getScene().getStylesheets().removeAll(style2); + styleNode.getScene().getStylesheets().addAll(style1); } }).run(); @@ -396,7 +432,6 @@ public class MainController { @PreDestroy public void destroy() { - } /** @@ -417,6 +452,7 @@ public class MainController { } catch (FlowException e) { e.printStackTrace(); } + WSClient.getInstance().close(); } diff --git a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/main/components/SkinInfoController.java b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/main/components/SkinInfoController.java similarity index 84% rename from falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/main/components/SkinInfoController.java rename to falsework-client/src/main/java/com/fx/client/gui/uicomponents/main/components/SkinInfoController.java index 1a9b03d..d82516b 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/main/components/SkinInfoController.java +++ b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/main/components/SkinInfoController.java @@ -1,4 +1,4 @@ -package com.epri.fx.client.gui.uicomponents.main.components; +package com.fx.client.gui.uicomponents.main.components; import io.datafx.controller.ViewController; diff --git a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/main/components/UserInfoController.java b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/main/components/UserInfoController.java similarity index 90% rename from falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/main/components/UserInfoController.java rename to falsework-client/src/main/java/com/fx/client/gui/uicomponents/main/components/UserInfoController.java index 48a9406..c4f8bc0 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/gui/uicomponents/main/components/UserInfoController.java +++ b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/main/components/UserInfoController.java @@ -1,6 +1,6 @@ -package com.epri.fx.client.gui.uicomponents.main.components; +package com.fx.client.gui.uicomponents.main.components; -import com.epri.fx.client.store.ApplicatonStore; +import com.fx.client.store.ApplicatonStore; import com.jfoenix.controls.JFXListView; import io.datafx.controller.ViewController; import io.datafx.eventsystem.EventProducer; diff --git a/falsework-client/src/main/java/com/fx/client/gui/uicomponents/monitor/onlineuser/OnlineUserController.java b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/monitor/onlineuser/OnlineUserController.java new file mode 100644 index 0000000..a718ae4 --- /dev/null +++ b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/monitor/onlineuser/OnlineUserController.java @@ -0,0 +1,284 @@ +package com.fx.client.gui.uicomponents.monitor.onlineuser; + +import com.fx.client.model.OnlineUserDataModel; +import com.fx.client.request.Request; +import com.fx.client.request.feign.admin.UserFeign; +import com.fx.client.store.ApplicatonStore; +import com.fx.client.utils.Pinyin4jUtil; +import com.fx.server.entity.log.SysLoginInfor; +import com.fx.server.util.DateUtils; +import com.jfoenix.controls.JFXButton; +import com.jfoenix.controls.JFXSnackbar; +import com.jfoenix.controls.JFXSnackbarLayout; +import com.jfoenix.controls.JFXSpinner; +import com.jfoenix.svg.SVGGlyphLoader; +import io.datafx.controller.ViewController; +import io.datafx.controller.flow.action.ActionMethod; +import io.datafx.controller.flow.action.ActionTrigger; +import io.datafx.core.concurrent.ProcessChain; +import javafx.collections.transformation.FilteredList; +import javafx.fxml.FXML; +import javafx.scene.control.*; +import javafx.scene.control.cell.PropertyValueFactory; +import javafx.scene.layout.StackPane; +import javafx.scene.layout.VBox; +import javafx.util.Callback; + +import javax.annotation.PostConstruct; +import javax.inject.Inject; +import java.util.Date; + +/** + * @description: + * @className: OnlineUserController + * @author: liwen + * @date: 2021/1/1 13:24 + */ +@ViewController(value = "/fxml/monitor/onlineuser/online_user.fxml", title = "在线用户") +public class OnlineUserController { + @FXML + private StackPane rootPane; + @FXML + private VBox contentPane; + + @FXML + private TextField userNameTextField; + @FXML + private TextField ipTextfiled; + @FXML + private TableView tableView; + + @FXML + private JFXSpinner spinner; + @FXML + @ActionTrigger("rest") + private Button restButton; + @FXML + @ActionTrigger("search") + private Button searchButton; + + @FXML + private TableColumn numberColumn; + @FXML + private TableColumn sessionNumberColumn; + @FXML + private TableColumn loginNameColumn; + @FXML + private TableColumn ipaddrColumn; + @FXML + private TableColumn sessionStatusColumn; + @FXML + private TableColumn loginTimeColumn; + @FXML + private TableColumn optColumn; + + @Inject + private OnlineUserDataModel onlineUserDataModel; + + private JFXSnackbar snackbar; + + @PostConstruct + private void init() { + spinner.setVisible(false); + snackbar = new JFXSnackbar(rootPane); + snackbar.setPrefWidth(500); + numberColumn.setCellFactory((col) -> { + TableCell cell = new TableCell() { + @Override + public void updateItem(String item, boolean empty) { + super.updateItem(item, empty); + this.setText(null); + this.setGraphic(null); + + if (!empty) { + int rowIndex = this.getIndex() + 1; + this.setText(String.valueOf(rowIndex)); + } + } + }; + return cell; + }); + sessionNumberColumn.setCellValueFactory(new PropertyValueFactory<>("infoId")); + loginNameColumn.setCellValueFactory(new PropertyValueFactory<>("loginName")); + ipaddrColumn.setCellValueFactory(new PropertyValueFactory<>("ipaddr")); + sessionStatusColumn.setCellValueFactory(new PropertyValueFactory<>("status")); + sessionStatusColumn.setCellFactory(col -> { + TableCell cell = new TableCell() { + private Label label = new Label(""); + + @Override + protected void updateItem(String item, boolean empty) { + super.updateItem(item, empty); + this.setText(null); + this.setGraphic(null); + if (!empty) { + + if (item.equals("0")) { + label.setId("status-success-label"); + label.setText("在线"); + } else { + label.setId("status-error-label"); + label.setText("离线"); + } + setGraphic(label); + } + } + }; + return cell; + }); + loginTimeColumn.setCellValueFactory(new PropertyValueFactory<>("loginTime")); + loginTimeColumn.setCellFactory(col -> { + + TableCell cell = new TableCell() { + @Override + protected void updateItem(Date item, boolean empty) { + super.updateItem(item, empty); + this.setText(null); + this.setGraphic(null); + if (!empty && item != null) { + setText(DateUtils.formatDate(item, DateUtils.DATETIME_FORMAT)); + } + } + }; + return cell; + }); + + Callback, TableCell> cellFactory = new Callback, TableCell>() { + @Override + public TableCell call(TableColumn param) { + + final TableCell cell = new TableCell() { + + private final JFXButton retreatBut = new JFXButton("强退"); + + { + retreatBut.setStyle("-fx-background-color: #e63c53"); + try { + retreatBut.setGraphic(SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".tuichu")); + } catch (Exception e) { + e.printStackTrace(); + } + + retreatBut.setOnAction(event -> { + + tableView.getSelectionModel().select(getIndex()); + retreat(); + + }); + + } + + @Override + protected void updateItem(String item, boolean empty) { + super.updateItem(item, empty); + if (empty) { + setGraphic(null); + } else { + setGraphic(retreatBut); + } + } + }; + return cell; + } + }; + + optColumn.setCellFactory(cellFactory); + + FilteredList filteredData = new FilteredList<>(onlineUserDataModel.getOnlineUsers(), p -> true); + tableView.setItems(filteredData); + userNameTextField.textProperty().addListener((o, oldVal, newVal) -> { + filteredData.setPredicate(elementProp -> { + if (newVal == null || newVal.isEmpty()) { + return true; + } + String val = Pinyin4jUtil.toPinYinLowercase(newVal); + return Pinyin4jUtil.toPinYinLowercase(elementProp.getLoginName()).contains(val); + }); + }); + ipTextfiled.textProperty().addListener((o, oldVal, newVal) -> { + filteredData.setPredicate(elementProp -> { + if (newVal == null || newVal.isEmpty()) { + return true; + } + String val = Pinyin4jUtil.toPinYinLowercase(newVal); + return Pinyin4jUtil.toPinYinLowercase(elementProp.getIpaddr()).contains(val); + }); + }); + + onlineUserDataModel.selectedIndexProperty().bind(tableView.getSelectionModel().selectedIndexProperty()); + + + query(); + + } + + + private void query() { + + ProcessChain.create() + .addRunnableInPlatformThread(() -> { + onlineUserDataModel.getOnlineUsers().clear(); + spinner.setVisible(true); + contentPane.setDisable(true); + }) + .addSupplierInExecutor( + () -> Request.connector(UserFeign.class).getOnlineUsers() + ) + .addConsumerInPlatformThread(result -> { + + onlineUserDataModel.getOnlineUsers().addAll(result); + + }) + .withFinal(() -> { + spinner.setVisible(false); + contentPane.setDisable(false); + }) + .onException(e -> e.printStackTrace()) + .run(); + } + + @ActionMethod("search") + private void search() { + query(); + } + + @ActionMethod("rest") + private void rest() { + userNameTextField.setText(""); + ipTextfiled.setText(""); + searchButton.fire(); + } + + /** + * @Description:强退 + * @param: [] + * @return: void + * @auther: liwen + * @date: 2021/1/4 4:38 下午 + */ + private void retreat() { + ProcessChain.create() + .addSupplierInExecutor( + () -> Request.connector(UserFeign.class).retreat(onlineUserDataModel.getOnlineUsers().get(onlineUserDataModel.getSelectedIndex()).getLoginName()) + ) + .addConsumerInPlatformThread(result -> { + + if (result.isRel() == true) { + snackbar.fireEvent(new JFXSnackbar.SnackbarEvent(new JFXSnackbarLayout("强退成功! "))); + query(); + } + + }) + .withFinal(() -> { + spinner.setVisible(false); + contentPane.setDisable(false); + }) + .onException(e -> { + e.printStackTrace(); + snackbar.fireEvent(new JFXSnackbar.SnackbarEvent(new JFXSnackbarLayout("强退失败! "))); + + }) + .run(); + } +} + diff --git a/falsework-client/src/main/java/com/fx/client/gui/uicomponents/monitor/quartz/SysJobController.java b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/monitor/quartz/SysJobController.java new file mode 100644 index 0000000..f658834 --- /dev/null +++ b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/monitor/quartz/SysJobController.java @@ -0,0 +1,494 @@ +package com.fx.client.gui.uicomponents.monitor.quartz; + +import com.fx.client.gui.uicomponents.main.MainController; +import com.fx.client.model.SysJobDataModel; +import com.fx.client.request.Request; +import com.fx.client.request.feign.admin.SysJobFeign; +import com.fx.client.store.ApplicatonStore; +import com.fx.client.utils.Pinyin4jUtil; +import com.fx.server.entity.SysJob; +import com.jfoenix.controls.*; +import com.jfoenix.svg.SVGGlyphLoader; +import io.datafx.controller.ViewController; +import io.datafx.controller.context.ApplicationContext; +import io.datafx.controller.flow.action.ActionMethod; +import io.datafx.controller.flow.action.ActionTrigger; +import io.datafx.core.concurrent.ProcessChain; +import javafx.collections.transformation.FilteredList; +import javafx.fxml.FXML; +import javafx.geometry.Pos; +import javafx.scene.control.*; +import javafx.scene.control.cell.PropertyValueFactory; +import javafx.scene.layout.GridPane; +import javafx.scene.layout.HBox; +import javafx.scene.layout.StackPane; +import javafx.stage.Modality; +import javafx.stage.Stage; +import org.apache.commons.lang3.StringUtils; + +import javax.annotation.PostConstruct; +import javax.inject.Inject; +import java.util.*; + +/** + * @description: + * @className: JobController + * @author: liwen + * @date: 2020/12/25 09:28 + */ +@ViewController(value = "/fxml/monitor/quartz/job.fxml", title = "定时任务") +public class SysJobController { + + @FXML + private JFXDialog dialog; + @FXML + private Label dialogTitle; + @FXML + private JFXTextField jobNameTextField; + @FXML + private JFXComboBox jobGroupNameComboBox; + @FXML + private JFXTextField jobClassTextField; + @FXML + private JFXTextField jobTimeTextField; + @FXML + private JFXTextField searchField; + @FXML + private JFXTextField parameterTextField; + @FXML + private JFXTextArea detailedTextArea; + @FXML + private JFXComboBox jobGroupComboBox; + @FXML + private JFXComboBox jobStatusCommboBox; + @FXML + @ActionTrigger("updateJob") + private JFXButton updateButton; + @FXML + @ActionTrigger("showJobLog") + private JFXButton jobLogButton; + @FXML + @ActionTrigger("saveJob") + private JFXButton saveButton; + @FXML + @ActionTrigger("closeDialog") + private JFXButton cancelButton; + + @FXML + private StackPane rootPane; + @FXML + private GridPane jobDetailPane; + @FXML + private HBox operatButPane; + + @FXML + @ActionTrigger("showAddJobDialog") + private JFXButton addJobButton; + + @FXML + @ActionTrigger("restSearch") + private JFXButton resetButton; + @FXML + @ActionTrigger("search") + private JFXButton searchButton; + + @FXML + private TableView tableView; + @FXML + private TableColumn jobIdColumn; + @FXML + private TableColumn jobNameColumn; + @FXML + private TableColumn jobGroupNameColumn; + @FXML + private TableColumn jobClassColumn; + @FXML + private TableColumn jobTimeColumn; + @FXML + private TableColumn jobDataColumn; + @FXML + private TableColumn jobStatusColumn; + @FXML + private TableColumn operatingColumn; + private JFXSnackbar snackbar; + + @Inject + private SysJobDataModel sysJobDataModel; + + private FilteredList filteredData; + + @PostConstruct + private void init() { + + updateButton.visibleProperty().bind(saveButton.visibleProperty().not()); + updateButton.managedProperty().bind(updateButton.visibleProperty()); + saveButton.managedProperty().bind(saveButton.visibleProperty()); + snackbar = new JFXSnackbar(rootPane); + snackbar.setPrefWidth(500); + operatingColumn.setCellFactory(col -> { + TableCell cell = new TableCell() { + + private final ToggleButton editBut = new ToggleButton(); + private final ToggleButton detailsBut = new ToggleButton(); + private final ToggleButton playBut = new ToggleButton(); + private final ToggleButton logBut = new ToggleButton(); + private final ToggleButton delBut = new ToggleButton(); + private HBox hBox = new HBox(editBut, detailsBut, playBut, logBut, delBut); + + { + editBut.setTooltip(new Tooltip("编辑")); + detailsBut.setTooltip(new Tooltip("查看详细")); + playBut.setTooltip(new Tooltip("立即执行一次")); + logBut.setTooltip(new Tooltip("调度日志")); + delBut.setTooltip(new Tooltip("删除")); + + editBut.getStyleClass().add("left-pill"); + detailsBut.getStyleClass().add("center-pill"); + playBut.getStyleClass().add("center-pill"); + logBut.getStyleClass().add("center-pill"); + delBut.getStyleClass().add("right-pill"); + + try { + editBut.setGraphic(SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".create-outline")); + detailsBut.setGraphic(SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".chakan-copy")); + playBut.setGraphic(SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".zhihing")); + logBut.setGraphic(SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".diaodurizhi-copy")); + delBut.setGraphic(SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".trash-outline")); + } catch (Exception e) { + e.printStackTrace(); + } + editBut.setOnAction(event -> { + tableView.getSelectionModel().select(getIndex()); + showEditJobDialog(); + }); + delBut.setOnAction(event -> { + tableView.getSelectionModel().select(getIndex()); + deleteJob(); + }); + detailsBut.setOnAction(event -> { + tableView.getSelectionModel().select(getIndex()); + showJobDialog(); + }); + playBut.setOnAction(event -> { + tableView.getSelectionModel().select(getIndex()); + runJob(); + }); + + } + + @Override + protected void updateItem(String item, boolean empty) { + super.updateItem(item, empty); + if (empty) { + setGraphic(null); + } else { + + hBox.setSpacing(0); + hBox.setAlignment(Pos.CENTER); + setGraphic(hBox); + } + } + }; + return cell; + }); + jobIdColumn.setCellFactory(col -> { + TableCell cell = new TableCell() { + @Override + protected void updateItem(Integer item, boolean empty) { + super.updateItem(item, empty); + this.setText(null); + this.setGraphic(null); + if (!empty) { + setText((getIndex() + 1) + ""); + } + } + }; + return cell; + }); + jobNameColumn.setCellValueFactory(new PropertyValueFactory<>("jobName")); + jobGroupNameColumn.setCellValueFactory(new PropertyValueFactory<>("jobGroupName")); + jobClassColumn.setCellValueFactory(new PropertyValueFactory<>("jobClass")); + jobTimeColumn.setCellValueFactory(new PropertyValueFactory<>("jobTime")); + jobDataColumn.setCellValueFactory(new PropertyValueFactory<>("parames")); + jobStatusColumn.setCellValueFactory(new PropertyValueFactory<>("jobStatus")); + jobStatusColumn.setCellFactory(col -> { + TableCell cell = new TableCell() { + private final JFXToggleButton statusButton = new JFXToggleButton(); + + { + statusButton.setOnAction(event -> { + tableView.getSelectionModel().select(getIndex()); + + if (statusButton.isSelected()) { + resumeJob(); + } else { + pauseJob(); + } + }); + + } + + @Override + protected void updateItem(String item, boolean empty) { + super.updateItem(item, empty); + if (empty) { + setGraphic(null); + } else { + statusButton.setSelected(item.equals("NORMAL") ? true : false); + setGraphic(statusButton); + } + } + }; + return cell; + }); + + sysJobDataModel.selectedPersonIndexProperty().bind(tableView.getSelectionModel().selectedIndexProperty()); + filteredData = new FilteredList<>(sysJobDataModel.getSysJobs(), p -> true); + tableView.setItems(filteredData); + searchField.textProperty().addListener((o, oldVal, newVal) -> { + filteredData(); + }); + jobGroupComboBox.getSelectionModel().select(0); + jobGroupComboBox.getSelectionModel().selectedIndexProperty().addListener((observable, oldValue, newValue) -> { + + filteredData(); + }); + jobStatusCommboBox.getSelectionModel().select(0); + jobStatusCommboBox.getSelectionModel().selectedIndexProperty().addListener((observable, oldValue, newValue) -> { + + filteredData(); + }); + + query(); + } + + private void filteredData() { + String jobName = searchField.getText(); + String jobGroup = jobGroupComboBox.getSelectionModel().selectedIndexProperty().getValue() == 0 ? null : (jobGroupComboBox.getSelectionModel().selectedIndexProperty().getValue() == 1 ? "默认" : "系统"); + String jobStatus = jobStatusCommboBox.getSelectionModel().selectedIndexProperty().getValue() == 0 ? null : (jobStatusCommboBox.getSelectionModel().selectedIndexProperty().getValue() == 1 ? "NORMAL" : "PAUSED"); + filteredData.setPredicate(elementProp -> { + + boolean a = false; + boolean b = false; + boolean c = false; + if (StringUtils.isBlank(jobName)) { + a = true; + } else { + a = Pinyin4jUtil.toPinYinLowercase(elementProp.getJobName()).contains(Pinyin4jUtil.toPinYinLowercase(jobName)); + } + if (StringUtils.isBlank(jobGroup)) { + b = true; + } else { + b = elementProp.getJobGroupName().toLowerCase().equalsIgnoreCase(jobGroup); + } + if (StringUtils.isBlank(jobStatus)) { + c = true; + } else { + c = elementProp.getJobStatus().toLowerCase().equalsIgnoreCase(jobStatus); + } + + + return a && b && c; + }); + } + + @ActionMethod("search") + private void query() { + String jobName = searchField.getText(); + String jobGroup = jobGroupComboBox.getSelectionModel().selectedIndexProperty().getValue() == 0 ? null : (jobGroupComboBox.getSelectionModel().selectedIndexProperty().getValue() == 1 ? "默认" : "系统"); + String jobStatus = jobStatusCommboBox.getSelectionModel().selectedIndexProperty().getValue() == 0 ? null : (jobStatusCommboBox.getSelectionModel().selectedIndexProperty().getValue() == 1 ? "NORMAL" : "PAUSED"); + + + Map map = new HashMap(); + map.put("jobName", jobName); + map.put("jobGroup", jobGroup); + map.put("jobStatus", jobStatus); + ProcessChain.create().addRunnableInPlatformThread(() -> { + sysJobDataModel.getSysJobs().clear(); + }).addSupplierInExecutor( + () -> Request.connector(SysJobFeign.class).getSysJobAll(map) + ).addConsumerInPlatformThread( + rel -> sysJobDataModel.getSysJobs().addAll(rel) + ).run(); + } + + @ActionMethod("showAddJobDialog") + private void showAddJobDialog() { + saveButton.setVisible(true); + dialogTitle.setText("新增定时任务"); + dialog.setTransitionType(JFXDialog.DialogTransition.TOP); + operatButPane.setVisible(true); + + dialog.show(rootPane); + + } + + private void showEditJobDialog() { + SysJob sysJob = sysJobDataModel.selectSysJob(); + jobNameTextField.setText(sysJob.getJobName()); + jobGroupNameComboBox.getSelectionModel().select(sysJob.getJobGroupName()); + jobTimeTextField.setText(sysJob.getJobTime()); + jobClassTextField.setText(sysJob.getJobClass()); + detailedTextArea.setText(sysJob.getDescription()); + parameterTextField.setText(sysJob.getParames()); + operatButPane.setVisible(true); + saveButton.setVisible(false); + dialogTitle.setText("编辑定时任务"); + dialog.setTransitionType(JFXDialog.DialogTransition.TOP); + dialog.show(rootPane); + + } + + private void showJobDialog() { + SysJob sysJob = sysJobDataModel.selectSysJob(); + jobNameTextField.setText(sysJob.getJobName()); + jobGroupNameComboBox.getSelectionModel().select(sysJob.getJobGroupName()); + jobTimeTextField.setText(sysJob.getJobTime()); + jobClassTextField.setText(sysJob.getJobClass()); + detailedTextArea.setText(sysJob.getDescription()); + parameterTextField.setText(sysJob.getParames()); + operatButPane.setVisible(false); + dialogTitle.setText("任务详情"); + dialog.setTransitionType(JFXDialog.DialogTransition.TOP); + dialog.show(rootPane); + + } + + + @ActionMethod("closeDialog") + private void closeDialog() { + dialog.close(); + } + + @ActionMethod("saveJob") + private void saveJob() { + SysJob sysJob = new SysJob(); + sysJob.setJobName(jobNameTextField.getText()); + sysJob.setJobGroupName(jobGroupNameComboBox.getSelectionModel().getSelectedIndex() == 0 ? "默认" : "系统"); + sysJob.setJobTime(jobTimeTextField.getText()); + sysJob.setJobClass(jobClassTextField.getText()); + String parames = parameterTextField.getText(); + sysJob.setParames(parames); + + ProcessChain.create().addSupplierInExecutor( + () -> Request.connector(SysJobFeign.class).addJob(sysJob) + ).addConsumerInPlatformThread(rel -> { + if (rel == 0) { + snackbar.fireEvent(new JFXSnackbar.SnackbarEvent(new JFXSnackbarLayout("添加成功! "))); + } + query(); + }).withFinal(() -> dialog.close()).run(); + + } + + @ActionMethod("updateJob") + private void updateJob() { + SysJob sysJob = new SysJob(); + sysJob.setJobName(jobNameTextField.getText()); + sysJob.setJobGroupName(jobGroupNameComboBox.getSelectionModel().getSelectedIndex() == 0 ? "默认" : "系统"); + sysJob.setJobTime(jobTimeTextField.getText()); + sysJob.setJobClass(jobClassTextField.getText()); + sysJob.setDescription(detailedTextArea.getText()); + sysJob.setParames(parameterTextField.getText()); + + ProcessChain.create().addSupplierInExecutor( + () -> Request.connector(SysJobFeign.class).updateJob(sysJob) + ).addConsumerInPlatformThread(rel -> { + if (rel == 0) { + snackbar.fireEvent(new JFXSnackbar.SnackbarEvent(new JFXSnackbarLayout("更新成功! "))); + } + }).withFinal(() -> dialog.close()).run(); + + } + + @ActionMethod("showJobLog") + private void showJobLog() { + MainController mainController = ApplicationContext.getInstance().getRegisteredObject(MainController.class); + try { + mainController.addTab("调度日志", SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".diaodurizhi-copy"), SysJobLogController.class,null); + } catch (Exception e) { + e.printStackTrace(); + } + } + + @ActionMethod("restSearch") + private void restSearch() { + searchField.setText(""); + jobStatusCommboBox.getSelectionModel().select(0); + jobGroupComboBox.getSelectionModel().select(0); + query(); + } + + + private void runJob() { + ProcessChain.create() + .addSupplierInExecutor(() -> Request.connector(SysJobFeign.class).runJob(sysJobDataModel.selectSysJob().getJobName(), sysJobDataModel.selectSysJob().getJobGroupName())) + .addConsumerInPlatformThread(rel -> { + if (rel == 0) { + snackbar.fireEvent(new JFXSnackbar.SnackbarEvent(new JFXSnackbarLayout("执行成功! "))); + } + }).withFinal(() -> { + + }).onException(e -> e.printStackTrace()) + .run(); + + } + + private void pauseJob() { + ProcessChain.create() + .addSupplierInExecutor(() -> Request.connector(SysJobFeign.class).pauseJob(sysJobDataModel.selectSysJob().getJobName(), sysJobDataModel.selectSysJob().getJobGroupName())) + .addConsumerInPlatformThread(rel -> { + if (rel == 0) { + snackbar.fireEvent(new JFXSnackbar.SnackbarEvent(new JFXSnackbarLayout("执行成功! "))); + } + }).withFinal(() -> { + + }).onException(e -> e.printStackTrace()) + .run(); + + } + + private void resumeJob() { + ProcessChain.create() + .addSupplierInExecutor(() -> Request.connector(SysJobFeign.class).resumeJob(sysJobDataModel.selectSysJob().getJobName(), sysJobDataModel.selectSysJob().getJobGroupName())) + .addConsumerInPlatformThread(rel -> { + if (rel == 0) { + snackbar.fireEvent(new JFXSnackbar.SnackbarEvent(new JFXSnackbarLayout("执行成功! "))); + } + }).withFinal(() -> { + + }).onException(e -> e.printStackTrace()) + .run(); + + } + + private void deleteJob() { + + JFXAlert alert = new JFXAlert((Stage) rootPane.getScene().getWindow()); + alert.initModality(Modality.APPLICATION_MODAL); + alert.setOverlayClose(false); + JFXDialogLayout layout = new JFXDialogLayout(); + layout.setHeading(new Label("消息提示")); + layout.setBody(new Label("确实删除【" + sysJobDataModel.selectSysJob().getJobName() + "】吗?")); + JFXButton closeButton = new JFXButton("取消"); + closeButton.setOnAction(event -> alert.hideWithAnimation()); + JFXButton determineButton = new JFXButton("确定"); + determineButton.setOnAction(event -> { + alert.hideWithAnimation(); + ProcessChain.create() + .addSupplierInExecutor(() -> Request.connector(SysJobFeign.class).deleteJob(sysJobDataModel.selectSysJob().getJobName(), sysJobDataModel.selectSysJob().getJobGroupName())) + .addConsumerInPlatformThread(rel -> { + if (rel == 0) { + query(); + } + }).withFinal(() -> { + + }).onException(e -> e.printStackTrace()) + .run(); + }); + layout.setActions(closeButton, determineButton); + alert.setContent(layout); + alert.show(); + + } +} diff --git a/falsework-client/src/main/java/com/fx/client/gui/uicomponents/monitor/quartz/SysJobLogController.java b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/monitor/quartz/SysJobLogController.java new file mode 100644 index 0000000..bc6bee1 --- /dev/null +++ b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/monitor/quartz/SysJobLogController.java @@ -0,0 +1,289 @@ +package com.fx.client.gui.uicomponents.monitor.quartz; + +import com.fx.client.model.SysJobLogModel; +import com.fx.client.request.Request; +import com.fx.client.request.feign.admin.SysJobFeign; +import com.fx.client.utils.Pinyin4jUtil; +import com.fx.server.entity.log.SysJobLog; +import com.fx.server.util.DateUtils; +import com.jfoenix.controls.JFXButton; +import com.jfoenix.controls.JFXComboBox; +import com.jfoenix.controls.JFXDatePicker; +import com.jfoenix.controls.JFXSpinner; +import io.datafx.controller.ViewController; +import io.datafx.controller.flow.action.ActionMethod; +import io.datafx.controller.flow.action.ActionTrigger; +import io.datafx.core.concurrent.ProcessChain; +import io.datafx.eventsystem.Event; +import io.datafx.eventsystem.OnEvent; +import javafx.collections.transformation.FilteredList; +import javafx.fxml.FXML; +import javafx.scene.Node; +import javafx.scene.control.*; +import javafx.scene.control.cell.PropertyValueFactory; +import javafx.scene.layout.StackPane; +import javafx.scene.layout.VBox; +import javafx.util.Callback; +import javafx.util.StringConverter; + +import javax.annotation.PostConstruct; +import javax.annotation.PreDestroy; +import javax.inject.Inject; +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @description: + * @className: JobController + * @author: liwen + * @date: 2020/12/25 09:28 + */ +@ViewController(value = "/fxml/monitor/quartz/job_log.fxml", title = "调度日志") +public class SysJobLogController { + + @FXML + private StackPane root; + @FXML + private VBox centPane; + @FXML + private JFXSpinner spinner; + @FXML + private TextField jobNameField; + @FXML + private JFXComboBox jobGroupComboBox; + @FXML + private JFXComboBox jobStatusComboBox; + @FXML + private JFXDatePicker beginDatePicker; + @FXML + private JFXDatePicker endDatePicker; + + @FXML + @ActionTrigger("search") + private Button searchButton; + @FXML + @ActionTrigger("reset") + private Button resetButton; + + @FXML + private Pagination pagination; + + @FXML + private TableView tableView; + @FXML + private TableColumn sysJobNumberColumn; + @FXML + private TableColumn jobNameColumn; + @FXML + private TableColumn jobGroupColumn; + @FXML + private TableColumn jobClassColumn; + @FXML + private TableColumn jobInfoColumn; + @FXML + private TableColumn jobStatusColumn; + @FXML + private TableColumn createTimeColumn; + @FXML + private TableColumn optIpColumn; + + @Inject + private SysJobLogModel logModel; + + private StringConverter dateConverter = new StringConverter() { + @Override + public String toString(Date date) { + if (date == null) { + return ""; + } + return DateUtils.formatDate(date, DateUtils.DATETIME_FORMAT); + } + + @Override + public Date fromString(String string) { + return DateUtils.parseDate(string); + } + }; + + @PostConstruct + public void init() { + spinner.setVisible(false); + jobGroupComboBox.getSelectionModel().select(0); + jobStatusComboBox.getSelectionModel().select(0); + + sysJobNumberColumn.setCellValueFactory(new PropertyValueFactory<>("jobLogId")); + jobNameColumn.setCellValueFactory(new PropertyValueFactory<>("jobName")); + jobGroupColumn.setCellValueFactory(new PropertyValueFactory<>("jobGroup")); + jobClassColumn.setCellValueFactory(new PropertyValueFactory<>("invokeTarget")); + jobInfoColumn.setCellValueFactory(new PropertyValueFactory<>("jobMessage")); + jobStatusColumn.setCellValueFactory(new PropertyValueFactory<>("status")); + jobStatusColumn.setCellFactory(col -> { + TableCell cell = new TableCell() { + private Label label = new Label(""); + + @Override + protected void updateItem(String item, boolean empty) { + super.updateItem(item, empty); + this.setText(null); + this.setGraphic(null); + if (!empty) { + + if (item.equals("0")) { + label.setId("status-success-label"); + label.setText("成功"); + } else { + label.setId("status-error-label"); + label.setText("失败"); + } + setGraphic(label); + } + } + }; + return cell; + }); + createTimeColumn.setCellValueFactory(new PropertyValueFactory<>("createTime")); + createTimeColumn.setCellFactory(col -> { + + TableCell cell = new TableCell() { + @Override + protected void updateItem(Date item, boolean empty) { + super.updateItem(item, empty); + this.setText(null); + this.setGraphic(null); + if (!empty && item != null) { + setText(dateConverter.toString(item)); + } + } + }; + return cell; + }); + optIpColumn.setCellFactory(col -> { + TableCell cell = new TableCell() { + private JFXButton button = new JFXButton("详细"); + + @Override + protected void updateItem(String item, boolean empty) { + super.updateItem(item, empty); + this.setText(null); + this.setGraphic(null); + if (!empty) { + setGraphic(button); + } + } + }; + return cell; + }); + + FilteredList filteredData = new FilteredList<>(logModel.getSysJobLogs(), p -> true); + tableView.setItems(filteredData); + jobNameField.textProperty().addListener((o, oldVal, newVal) -> { + filteredData.setPredicate(elementProp -> { + if (newVal == null || newVal.isEmpty()) { + return true; + } + String val = Pinyin4jUtil.toPinYinLowercase(newVal); + return Pinyin4jUtil.toPinYinLowercase(elementProp.getJobName()).contains(val); + + }); + }); + + logModel.selectedPersonIndexProperty().bind(tableView.getSelectionModel().selectedIndexProperty()); + pagination.pageCountProperty().bindBidirectional(logModel.pageCountProperty()); + pagination.setPageFactory(new Callback() { + @Override + public Node call(Integer param) { + showPage(param + 1); + return tableView; + } + }); + + } + + private void showPage(Integer page) { + + + Map queryMap = getQueryMap(); + queryMap.put("page", page); + queryMap.put("limit", 20); + query(queryMap); + + } + + private Map getQueryMap() { + String jobName = jobNameField.getText(); + String jobGroup = jobGroupComboBox.getSelectionModel().selectedIndexProperty().getValue() == 0 ? null : (jobGroupComboBox.getSelectionModel().selectedIndexProperty().getValue() == 1 ? "默认" : "系统"); + String jobStatus = jobStatusComboBox.getSelectionModel().selectedIndexProperty().getValue() == 0 ? null : (jobStatusComboBox.getSelectionModel().selectedIndexProperty().getValue() == 1 ? "0" : "1"); + LocalDate beginDate = beginDatePicker.getValue(); + LocalDate endDate = endDatePicker.getValue(); + + Map queryMap = new HashMap<>(); + queryMap.put("page", 0); + queryMap.put("limit", 20); + queryMap.put("jobName", jobName); + queryMap.put("jobName", jobName); + queryMap.put("jobGroup", jobGroup); + queryMap.put("status", jobStatus); + queryMap.put("startTime", beginDate != null ? beginDate.format(DateTimeFormatter.ofPattern("yyyyMMdd")) : null); + queryMap.put("endTime", endDate != null ? endDate.format(DateTimeFormatter.ofPattern("yyyyMMdd")) : null); + return queryMap; + } + + @ActionMethod("search") + private void search() { + query(getQueryMap()); + } + + @ActionMethod("reset") + private void reset() { + jobNameField.setText(""); + jobGroupComboBox.getSelectionModel().select(0); + jobStatusComboBox.getSelectionModel().select(0); + beginDatePicker.setValue(null); + endDatePicker.setValue(null); + searchButton.fire(); + } + + private void query(Map queryMap) { + + ProcessChain.create() + .addRunnableInPlatformThread(() -> { + spinner.setVisible(true); + centPane.setDisable(true); + }) + .addSupplierInExecutor(() -> Request.connector(SysJobFeign.class).getSysJobLogList(queryMap) + ) + .addConsumerInPlatformThread(result -> { + logModel.getSysJobLogs().clear(); + List gateLogs = result.getDatas(); + logModel.setPageCount((int) result.getTotal()); + logModel.getSysJobLogs().addAll(gateLogs); + + }) + .withFinal(() -> { + spinner.setVisible(false); + centPane.setDisable(false); + }) + .onException(e -> e.printStackTrace()) + .run(); + } + + + @PreDestroy + private void destroy() { + System.err.println("destroy " + this); + } + + + @OnEvent("refresh") + private void onRefresh(Event e) { + System.err.println(this.getClass() + "\t" + e.getContent()); + + search(); + + } + +} diff --git a/falsework-client/src/main/java/com/epri/fx/client/model/GroupDataModel.java b/falsework-client/src/main/java/com/fx/client/model/GroupDataModel.java similarity index 92% rename from falsework-client/src/main/java/com/epri/fx/client/model/GroupDataModel.java rename to falsework-client/src/main/java/com/fx/client/model/GroupDataModel.java index 4b039ea..6eea620 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/model/GroupDataModel.java +++ b/falsework-client/src/main/java/com/fx/client/model/GroupDataModel.java @@ -1,8 +1,8 @@ -package com.epri.fx.client.model; +package com.fx.client.model; -import com.epri.fx.server.vo.ElementVO; -import com.epri.fx.server.vo.GroupVO; -import com.epri.fx.server.vo.MenuVO; +import com.fx.server.vo.ElementVO; +import com.fx.server.vo.GroupVO; +import com.fx.server.vo.MenuVO; import io.datafx.controller.FxmlLoadException; import io.datafx.controller.injection.scopes.ViewScoped; import javafx.beans.property.ListProperty; diff --git a/falsework-client/src/main/java/com/epri/fx/client/model/GroupTypeDataModel.java b/falsework-client/src/main/java/com/fx/client/model/GroupTypeDataModel.java similarity index 89% rename from falsework-client/src/main/java/com/epri/fx/client/model/GroupTypeDataModel.java rename to falsework-client/src/main/java/com/fx/client/model/GroupTypeDataModel.java index a1418ca..e1e1cfc 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/model/GroupTypeDataModel.java +++ b/falsework-client/src/main/java/com/fx/client/model/GroupTypeDataModel.java @@ -1,7 +1,8 @@ -package com.epri.fx.client.model; +package com.fx.client.model; -import com.epri.fx.server.vo.GroupTypeVO; +import com.fx.server.vo.GroupTypeVO; import io.datafx.controller.injection.scopes.FlowScoped; +import io.datafx.controller.injection.scopes.ViewScoped; import javafx.beans.property.IntegerProperty; import javafx.beans.property.ListProperty; import javafx.beans.property.SimpleIntegerProperty; @@ -9,7 +10,7 @@ import javafx.beans.property.SimpleListProperty; import javafx.collections.FXCollections; import javafx.collections.ObservableList; -@FlowScoped +@ViewScoped public class GroupTypeDataModel { private int counter = 0; private ListProperty groupTypes; diff --git a/falsework-client/src/main/java/com/epri/fx/client/model/LogDataModel.java b/falsework-client/src/main/java/com/fx/client/model/LogDataModel.java similarity index 91% rename from falsework-client/src/main/java/com/epri/fx/client/model/LogDataModel.java rename to falsework-client/src/main/java/com/fx/client/model/LogDataModel.java index 885b19b..0f97794 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/model/LogDataModel.java +++ b/falsework-client/src/main/java/com/fx/client/model/LogDataModel.java @@ -1,7 +1,8 @@ -package com.epri.fx.client.model; +package com.fx.client.model; -import com.epri.fx.server.entity.log.GateLog; +import com.fx.server.entity.log.GateLog; import io.datafx.controller.injection.scopes.FlowScoped; +import io.datafx.controller.injection.scopes.ViewScoped; import javafx.beans.property.IntegerProperty; import javafx.beans.property.ListProperty; import javafx.beans.property.SimpleIntegerProperty; @@ -9,7 +10,7 @@ import javafx.beans.property.SimpleListProperty; import javafx.collections.FXCollections; import javafx.collections.ObservableList; -@FlowScoped +@ViewScoped public class LogDataModel { private int counter = 0; private ListProperty gateLogs; diff --git a/falsework-client/src/main/java/com/fx/client/model/LoginLogDataModel.java b/falsework-client/src/main/java/com/fx/client/model/LoginLogDataModel.java new file mode 100644 index 0000000..25e03f1 --- /dev/null +++ b/falsework-client/src/main/java/com/fx/client/model/LoginLogDataModel.java @@ -0,0 +1,58 @@ +package com.fx.client.model; + +import com.fx.server.entity.log.SysLoginInfor; +import io.datafx.controller.injection.scopes.ViewScoped; +import javafx.beans.property.IntegerProperty; +import javafx.beans.property.ListProperty; +import javafx.beans.property.SimpleIntegerProperty; +import javafx.beans.property.SimpleListProperty; +import javafx.collections.FXCollections; +import javafx.collections.ObservableList; + +@ViewScoped +public class LoginLogDataModel { + private int counter = 0; + private ListProperty sysLoginInfors; + + private IntegerProperty pageCount; + private IntegerProperty selectedPersonIndex; + + + public ListProperty getSysLoginInfors() { + if (sysLoginInfors == null) { + ObservableList innerList = FXCollections.observableArrayList(); + sysLoginInfors = new SimpleListProperty<>(innerList); + } + return sysLoginInfors; + } + + public int getSelectedPersonIndex() { + return selectedPersonIndexProperty().get(); + } + + public void setSelectedPersonIndex(int selectedPersonIndex) { + this.selectedPersonIndex.set(selectedPersonIndex); + } + + public IntegerProperty selectedPersonIndexProperty() { + if (selectedPersonIndex == null) { + selectedPersonIndex = new SimpleIntegerProperty(); + } + return selectedPersonIndex; + } + + public int getPageCount() { + return pageCount.get(); + } + + public IntegerProperty pageCountProperty() { + if (pageCount == null) { + pageCount = new SimpleIntegerProperty(); + } + return pageCount; + } + + public void setPageCount(int pageCount) { + this.pageCount.set(pageCount); + } +} \ No newline at end of file diff --git a/falsework-client/src/main/java/com/epri/fx/client/model/MenuDataModel.java b/falsework-client/src/main/java/com/fx/client/model/MenuDataModel.java similarity index 92% rename from falsework-client/src/main/java/com/epri/fx/client/model/MenuDataModel.java rename to falsework-client/src/main/java/com/fx/client/model/MenuDataModel.java index b37b120..437656c 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/model/MenuDataModel.java +++ b/falsework-client/src/main/java/com/fx/client/model/MenuDataModel.java @@ -1,7 +1,7 @@ -package com.epri.fx.client.model; +package com.fx.client.model; -import com.epri.fx.server.vo.ElementVO; -import com.epri.fx.server.vo.MenuVO; +import com.fx.server.vo.ElementVO; +import com.fx.server.vo.MenuVO; import io.datafx.controller.injection.scopes.ViewScoped; import javafx.beans.property.*; import javafx.collections.FXCollections; diff --git a/falsework-client/src/main/java/com/fx/client/model/OnlineUserDataModel.java b/falsework-client/src/main/java/com/fx/client/model/OnlineUserDataModel.java new file mode 100644 index 0000000..7de6012 --- /dev/null +++ b/falsework-client/src/main/java/com/fx/client/model/OnlineUserDataModel.java @@ -0,0 +1,41 @@ +package com.fx.client.model; + +import com.fx.server.entity.log.SysLoginInfor; +import io.datafx.controller.injection.scopes.ViewScoped; +import javafx.beans.property.IntegerProperty; +import javafx.beans.property.ListProperty; +import javafx.beans.property.SimpleIntegerProperty; +import javafx.beans.property.SimpleListProperty; +import javafx.collections.FXCollections; +import javafx.collections.ObservableList; + +@ViewScoped +public class OnlineUserDataModel { + private ListProperty onlineUsers; + private IntegerProperty selectedIndex; + + + public ListProperty getOnlineUsers() { + if (onlineUsers == null) { + ObservableList innerList = FXCollections.observableArrayList(); + onlineUsers = new SimpleListProperty<>(innerList); + } + return onlineUsers; + } + + + public int getSelectedIndex() { + return selectedIndexProperty().get(); + } + + public IntegerProperty selectedIndexProperty() { + if (selectedIndex == null) { + selectedIndex = new SimpleIntegerProperty(); + } + return selectedIndex; + } + + public void setSelectedIndex(int selectedIndex) { + selectedIndexProperty().set(selectedIndex); + } +} \ No newline at end of file diff --git a/falsework-client/src/main/java/com/fx/client/model/SysJobDataModel.java b/falsework-client/src/main/java/com/fx/client/model/SysJobDataModel.java new file mode 100644 index 0000000..be59091 --- /dev/null +++ b/falsework-client/src/main/java/com/fx/client/model/SysJobDataModel.java @@ -0,0 +1,46 @@ +package com.fx.client.model; + +import com.fx.server.entity.SysJob; +import com.fx.server.vo.UserVO; +import io.datafx.controller.ViewController; +import io.datafx.controller.injection.scopes.FlowScoped; +import io.datafx.controller.injection.scopes.ViewScoped; +import javafx.beans.property.IntegerProperty; +import javafx.beans.property.ListProperty; +import javafx.beans.property.SimpleIntegerProperty; +import javafx.beans.property.SimpleListProperty; +import javafx.collections.FXCollections; +import javafx.collections.ObservableList; + +@ViewScoped +public class SysJobDataModel { + private int counter = 0; + private ListProperty sysJobs; + + private IntegerProperty selectedPersonIndex = new SimpleIntegerProperty(-1); + + public ListProperty getSysJobs() { + if (sysJobs == null) { + ObservableList innerList = FXCollections.observableArrayList(); + sysJobs = new SimpleListProperty<>(innerList); + } + return sysJobs; + } + + public int getSelectedPersonIndex() { + return selectedPersonIndex.get(); + } + + public IntegerProperty selectedPersonIndexProperty() { + return selectedPersonIndex; + } + + public void setSelectedPersonIndex(int selectedPersonIndex) { + this.selectedPersonIndex.set(selectedPersonIndex); + } + + public SysJob selectSysJob() { + return getSysJobs().get(selectedPersonIndex.getValue()); + + } +} \ No newline at end of file diff --git a/falsework-client/src/main/java/com/fx/client/model/SysJobLogModel.java b/falsework-client/src/main/java/com/fx/client/model/SysJobLogModel.java new file mode 100644 index 0000000..351c3d2 --- /dev/null +++ b/falsework-client/src/main/java/com/fx/client/model/SysJobLogModel.java @@ -0,0 +1,58 @@ +package com.fx.client.model; + +import com.fx.server.entity.log.SysJobLog; +import io.datafx.controller.injection.scopes.ViewScoped; +import javafx.beans.property.IntegerProperty; +import javafx.beans.property.ListProperty; +import javafx.beans.property.SimpleIntegerProperty; +import javafx.beans.property.SimpleListProperty; +import javafx.collections.FXCollections; +import javafx.collections.ObservableList; + +@ViewScoped +public class SysJobLogModel { + private int counter = 0; + private ListProperty sysJobLogs; + + private IntegerProperty pageCount; + private IntegerProperty selectedPersonIndex; + + + public ListProperty getSysJobLogs() { + if (sysJobLogs == null) { + ObservableList innerList = FXCollections.observableArrayList(); + sysJobLogs = new SimpleListProperty<>(innerList); + } + return sysJobLogs; + } + + public int getSelectedPersonIndex() { + return selectedPersonIndexProperty().get(); + } + + public void setSelectedPersonIndex(int selectedPersonIndex) { + this.selectedPersonIndex.set(selectedPersonIndex); + } + + public IntegerProperty selectedPersonIndexProperty() { + if (selectedPersonIndex == null) { + selectedPersonIndex = new SimpleIntegerProperty(); + } + return selectedPersonIndex; + } + + public int getPageCount() { + return pageCount.get(); + } + + public IntegerProperty pageCountProperty() { + if (pageCount == null) { + pageCount = new SimpleIntegerProperty(); + } + return pageCount; + } + + public void setPageCount(int pageCount) { + this.pageCount.set(pageCount); + } +} \ No newline at end of file diff --git a/falsework-client/src/main/java/com/epri/fx/client/model/UserDataModel.java b/falsework-client/src/main/java/com/fx/client/model/UserDataModel.java similarity index 92% rename from falsework-client/src/main/java/com/epri/fx/client/model/UserDataModel.java rename to falsework-client/src/main/java/com/fx/client/model/UserDataModel.java index 73a2238..2a13fab 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/model/UserDataModel.java +++ b/falsework-client/src/main/java/com/fx/client/model/UserDataModel.java @@ -1,7 +1,8 @@ -package com.epri.fx.client.model; +package com.fx.client.model; -import com.epri.fx.server.vo.UserVO; +import com.fx.server.vo.UserVO; import io.datafx.controller.injection.scopes.FlowScoped; +import io.datafx.controller.injection.scopes.ViewScoped; import javafx.beans.property.IntegerProperty; import javafx.beans.property.ListProperty; import javafx.beans.property.SimpleIntegerProperty; @@ -9,7 +10,7 @@ import javafx.beans.property.SimpleListProperty; import javafx.collections.FXCollections; import javafx.collections.ObservableList; -@FlowScoped +@ViewScoped public class UserDataModel { private int counter = 0; private ListProperty users; diff --git a/falsework-client/src/main/java/com/epri/fx/client/request/Request.java b/falsework-client/src/main/java/com/fx/client/request/Request.java similarity index 94% rename from falsework-client/src/main/java/com/epri/fx/client/request/Request.java rename to falsework-client/src/main/java/com/fx/client/request/Request.java index 6253995..dfa5097 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/request/Request.java +++ b/falsework-client/src/main/java/com/fx/client/request/Request.java @@ -1,8 +1,8 @@ -package com.epri.fx.client.request; +package com.fx.client.request; -import com.epri.fx.client.request.feign.AppRequestErrorDecoder; -import com.epri.fx.client.request.feign.AppRequestInterceptor; -import com.epri.fx.client.request.feign.FeignAPI; +import com.fx.client.request.feign.AppRequestErrorDecoder; +import com.fx.client.request.feign.AppRequestInterceptor; +import com.fx.client.request.feign.FeignAPI; import com.netflix.client.ClientFactory; import com.netflix.client.config.IClientConfig; import com.netflix.loadbalancer.BestAvailableRule; @@ -16,7 +16,6 @@ import feign.jackson.JacksonEncoder; import feign.okhttp.OkHttpClient; import feign.ribbon.LBClient; import feign.ribbon.LBClientFactory; -import feign.ribbon.LoadBalancingTarget; import feign.ribbon.RibbonClient; import feign.slf4j.Slf4jLogger; import okhttp3.ConnectionPool; diff --git a/falsework-client/src/main/java/com/epri/fx/client/request/feign/AppRequestErrorDecoder.java b/falsework-client/src/main/java/com/fx/client/request/feign/AppRequestErrorDecoder.java similarity index 57% rename from falsework-client/src/main/java/com/epri/fx/client/request/feign/AppRequestErrorDecoder.java rename to falsework-client/src/main/java/com/fx/client/request/feign/AppRequestErrorDecoder.java index e41300f..f9b2320 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/request/feign/AppRequestErrorDecoder.java +++ b/falsework-client/src/main/java/com/fx/client/request/feign/AppRequestErrorDecoder.java @@ -1,9 +1,9 @@ -package com.epri.fx.client.request.feign; +package com.fx.client.request.feign; -import com.epri.fx.client.store.ApplicatonStore; -import com.epri.fx.client.utils.AlertUtil; +import com.fx.client.utils.AlertUtil; import feign.Response; import feign.codec.ErrorDecoder; +import io.datafx.core.concurrent.ProcessChain; /** * @description: @@ -14,7 +14,10 @@ import feign.codec.ErrorDecoder; public class AppRequestErrorDecoder implements ErrorDecoder { @Override public Exception decode(String methodKey, Response response) { - AlertUtil.show(response); + ProcessChain.create().addRunnableInPlatformThread(() -> { + AlertUtil.show(response); + }).run(); + return null; } } diff --git a/falsework-client/src/main/java/com/epri/fx/client/request/feign/AppRequestInterceptor.java b/falsework-client/src/main/java/com/fx/client/request/feign/AppRequestInterceptor.java similarity index 74% rename from falsework-client/src/main/java/com/epri/fx/client/request/feign/AppRequestInterceptor.java rename to falsework-client/src/main/java/com/fx/client/request/feign/AppRequestInterceptor.java index 16a0ea9..10d259c 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/request/feign/AppRequestInterceptor.java +++ b/falsework-client/src/main/java/com/fx/client/request/feign/AppRequestInterceptor.java @@ -1,6 +1,6 @@ -package com.epri.fx.client.request.feign; +package com.fx.client.request.feign; -import com.epri.fx.client.store.ApplicatonStore; +import com.fx.client.store.ApplicatonStore; import feign.RequestInterceptor; import feign.RequestTemplate; diff --git a/falsework-client/src/main/java/com/epri/fx/client/request/feign/FeignAPI.java b/falsework-client/src/main/java/com/fx/client/request/feign/FeignAPI.java similarity index 70% rename from falsework-client/src/main/java/com/epri/fx/client/request/feign/FeignAPI.java rename to falsework-client/src/main/java/com/fx/client/request/feign/FeignAPI.java index b642dda..8baa1cc 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/request/feign/FeignAPI.java +++ b/falsework-client/src/main/java/com/fx/client/request/feign/FeignAPI.java @@ -1,4 +1,4 @@ -package com.epri.fx.client.request.feign; +package com.fx.client.request.feign; import feign.Headers; diff --git a/falsework-client/src/main/java/com/epri/fx/client/request/feign/admin/ElementFeign.java b/falsework-client/src/main/java/com/fx/client/request/feign/admin/ElementFeign.java similarity index 75% rename from falsework-client/src/main/java/com/epri/fx/client/request/feign/admin/ElementFeign.java rename to falsework-client/src/main/java/com/fx/client/request/feign/admin/ElementFeign.java index 887eb98..cb58330 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/request/feign/admin/ElementFeign.java +++ b/falsework-client/src/main/java/com/fx/client/request/feign/admin/ElementFeign.java @@ -1,8 +1,8 @@ -package com.epri.fx.client.request.feign.admin; +package com.fx.client.request.feign.admin; -import com.epri.fx.client.request.feign.FeignAPI; -import com.epri.fx.server.entity.Element; -import com.epri.fx.server.msg.TableResultResponse; +import com.fx.client.request.feign.FeignAPI; +import com.fx.server.entity.Element; +import com.fx.server.msg.TableResultResponse; import feign.Param; import feign.RequestLine; diff --git a/falsework-client/src/main/java/com/epri/fx/client/request/feign/admin/GroupFeign.java b/falsework-client/src/main/java/com/fx/client/request/feign/admin/GroupFeign.java similarity index 82% rename from falsework-client/src/main/java/com/epri/fx/client/request/feign/admin/GroupFeign.java rename to falsework-client/src/main/java/com/fx/client/request/feign/admin/GroupFeign.java index c408c5e..3980f60 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/request/feign/admin/GroupFeign.java +++ b/falsework-client/src/main/java/com/fx/client/request/feign/admin/GroupFeign.java @@ -1,9 +1,9 @@ -package com.epri.fx.client.request.feign.admin; +package com.fx.client.request.feign.admin; -import com.epri.fx.client.request.feign.FeignAPI; -import com.epri.fx.server.vo.GroupUsers; -import com.epri.fx.server.vo.GroupVO; -import com.epri.fx.server.vo.MenuVO; +import com.fx.client.request.feign.FeignAPI; +import com.fx.server.vo.GroupUsers; +import com.fx.server.vo.GroupVO; +import com.fx.server.vo.MenuVO; import feign.Param; import feign.QueryMap; import feign.RequestLine; @@ -41,6 +41,6 @@ public interface GroupFeign extends FeignAPI { public GroupUsers getUsers(@Param("id") int id); @RequestLine(value = "PUT /group/{id}/user") - public Integer modifiyUsers(@Param("id") int id, @QueryMap Map map); + public Integer modifiyUsers(@Param("id") int id, @QueryMap Map map); } diff --git a/falsework-client/src/main/java/com/epri/fx/client/request/feign/admin/GroupTypeFeign.java b/falsework-client/src/main/java/com/fx/client/request/feign/admin/GroupTypeFeign.java similarity index 81% rename from falsework-client/src/main/java/com/epri/fx/client/request/feign/admin/GroupTypeFeign.java rename to falsework-client/src/main/java/com/fx/client/request/feign/admin/GroupTypeFeign.java index bd7602d..8f3adfc 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/request/feign/admin/GroupTypeFeign.java +++ b/falsework-client/src/main/java/com/fx/client/request/feign/admin/GroupTypeFeign.java @@ -1,7 +1,7 @@ -package com.epri.fx.client.request.feign.admin; +package com.fx.client.request.feign.admin; -import com.epri.fx.client.request.feign.FeignAPI; -import com.epri.fx.server.vo.GroupTypeVO; +import com.fx.client.request.feign.FeignAPI; +import com.fx.server.vo.GroupTypeVO; import feign.Param; import feign.RequestLine; diff --git a/falsework-client/src/main/java/com/epri/fx/client/request/feign/admin/LogFeign.java b/falsework-client/src/main/java/com/fx/client/request/feign/admin/LogFeign.java similarity index 57% rename from falsework-client/src/main/java/com/epri/fx/client/request/feign/admin/LogFeign.java rename to falsework-client/src/main/java/com/fx/client/request/feign/admin/LogFeign.java index cb1630f..affa358 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/request/feign/admin/LogFeign.java +++ b/falsework-client/src/main/java/com/fx/client/request/feign/admin/LogFeign.java @@ -1,11 +1,10 @@ -package com.epri.fx.client.request.feign.admin; +package com.fx.client.request.feign.admin; -import com.epri.fx.client.request.feign.FeignAPI; -import com.epri.fx.server.entity.User; -import com.epri.fx.server.entity.log.GateLog; -import com.epri.fx.server.entity.log.LogInfo; -import com.epri.fx.server.msg.ObjectRestResponse; -import com.epri.fx.server.msg.TableResultResponse; +import com.fx.client.request.feign.FeignAPI; +import com.fx.server.entity.log.GateLog; +import com.fx.server.msg.ObjectRestResponse; +import com.fx.server.msg.TableResultResponse; +import feign.Headers; import feign.Param; import feign.QueryMap; import feign.RequestLine; @@ -18,6 +17,7 @@ import java.util.Map; * @author: liwen * @date: 2020/4/1 17:31 */ +@Headers("Content-Type: application/json") public interface LogFeign extends FeignAPI { @RequestLine("GET /log/page") TableResultResponse getPageList(@QueryMap Map map); diff --git a/falsework-client/src/main/java/com/fx/client/request/feign/admin/LoginLogFeign.java b/falsework-client/src/main/java/com/fx/client/request/feign/admin/LoginLogFeign.java new file mode 100644 index 0000000..9313b6a --- /dev/null +++ b/falsework-client/src/main/java/com/fx/client/request/feign/admin/LoginLogFeign.java @@ -0,0 +1,24 @@ +package com.fx.client.request.feign.admin; + +import com.fx.client.request.feign.FeignAPI; +import com.fx.server.entity.log.SysLoginInfor; +import com.fx.server.msg.TableResultResponse; +import feign.Headers; +import feign.QueryMap; +import feign.RequestLine; + +import java.util.Map; + +/** + * @description: + * @className: SysJobController + * @author: liwen + * @date: 2020/12/25 09:23 + */ +@Headers("Content-Type: application/json") +public interface LoginLogFeign extends FeignAPI { + + @RequestLine("GET /log/login/list") + TableResultResponse getSysLoginInfor(@QueryMap Map map); + +} diff --git a/falsework-client/src/main/java/com/epri/fx/client/request/feign/admin/MenuFeign.java b/falsework-client/src/main/java/com/fx/client/request/feign/admin/MenuFeign.java similarity index 82% rename from falsework-client/src/main/java/com/epri/fx/client/request/feign/admin/MenuFeign.java rename to falsework-client/src/main/java/com/fx/client/request/feign/admin/MenuFeign.java index 2ec5694..6de445f 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/request/feign/admin/MenuFeign.java +++ b/falsework-client/src/main/java/com/fx/client/request/feign/admin/MenuFeign.java @@ -1,7 +1,7 @@ -package com.epri.fx.client.request.feign.admin; +package com.fx.client.request.feign.admin; -import com.epri.fx.client.request.feign.FeignAPI; -import com.epri.fx.server.vo.MenuVO; +import com.fx.client.request.feign.FeignAPI; +import com.fx.server.vo.MenuVO; import feign.Headers; import feign.RequestLine; diff --git a/falsework-client/src/main/java/com/fx/client/request/feign/admin/SysJobFeign.java b/falsework-client/src/main/java/com/fx/client/request/feign/admin/SysJobFeign.java new file mode 100644 index 0000000..e88cc1f --- /dev/null +++ b/falsework-client/src/main/java/com/fx/client/request/feign/admin/SysJobFeign.java @@ -0,0 +1,44 @@ +package com.fx.client.request.feign.admin; + +import com.fx.client.request.feign.FeignAPI; +import com.fx.server.entity.SysJob; +import com.fx.server.entity.log.SysJobLog; +import com.fx.server.msg.TableResultResponse; +import feign.Param; +import feign.QueryMap; +import feign.RequestLine; + +import java.util.List; +import java.util.Map; + +/** + * @description: + * @className: SysJobController + * @author: liwen + * @date: 2020/12/25 09:23 + */ +public interface SysJobFeign extends FeignAPI { + + @RequestLine("GET /job/list") + List getSysJobAll(@QueryMap Map map); + @RequestLine("GET /job/log/list") + TableResultResponse getSysJobLogList(@QueryMap Map map); + + @RequestLine("POST /job") + Integer addJob(SysJob sysJob); + + @RequestLine("PUT /job") + Integer updateJob(SysJob sysJob); + + @RequestLine("DELETE /job/{jobName}/{jobGroupName}") + Integer deleteJob(@Param("jobName") String jobName,@Param("jobGroupName") String jobGroupName); + + @RequestLine("PUT /job/pause/{jobName}/{jobGroupName}") + Integer pauseJob(@Param("jobName") String jobName,@Param("jobGroupName") String jobGroupName); + + @RequestLine("PUT /job/resume/{jobName}/{jobGroupName}") + Integer resumeJob(@Param("jobName") String jobName,@Param("jobGroupName") String jobGroupName); + + @RequestLine("PUT /job/run/{jobName}/{jobGroupName}") + Integer runJob(@Param("jobName") String jobName,@Param("jobGroupName") String jobGroupName); +} diff --git a/falsework-client/src/main/java/com/epri/fx/client/request/feign/admin/UserFeign.java b/falsework-client/src/main/java/com/fx/client/request/feign/admin/UserFeign.java similarity index 55% rename from falsework-client/src/main/java/com/epri/fx/client/request/feign/admin/UserFeign.java rename to falsework-client/src/main/java/com/fx/client/request/feign/admin/UserFeign.java index 06c56d1..b6da364 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/request/feign/admin/UserFeign.java +++ b/falsework-client/src/main/java/com/fx/client/request/feign/admin/UserFeign.java @@ -1,14 +1,15 @@ -package com.epri.fx.client.request.feign.admin; +package com.fx.client.request.feign.admin; -import com.epri.fx.client.request.feign.FeignAPI; -import com.epri.fx.server.entity.User; -import com.epri.fx.server.msg.ObjectRestResponse; -import com.epri.fx.server.msg.TableResultResponse; -import com.epri.fx.server.vo.UserVO; +import com.fx.client.request.feign.FeignAPI; +import com.fx.server.entity.User; +import com.fx.server.entity.log.SysLoginInfor; +import com.fx.server.msg.ObjectRestResponse; +import com.fx.server.msg.TableResultResponse; import feign.Param; import feign.QueryMap; import feign.RequestLine; +import java.util.List; import java.util.Map; /** @@ -21,6 +22,12 @@ public interface UserFeign extends FeignAPI { @RequestLine("GET /user/page") TableResultResponse getPageList(@QueryMap Map map); + @RequestLine("GET /user/online/list") + List getOnlineUsers(); + + @RequestLine("POST /user/retreat/{userId}") + ObjectRestResponse retreat(@Param("userId") String userId); + @RequestLine("PUT /user/{id}") ObjectRestResponse update(@Param("id") Integer id, User user); @@ -28,7 +35,7 @@ public interface UserFeign extends FeignAPI { ObjectRestResponse delete(@Param("id") Integer id); @RequestLine("PUT /user/password/{id}") - ObjectRestResponse restPassword(@Param("id")Integer id); + ObjectRestResponse restPassword(@Param("id") Integer id); @RequestLine("POST /user") ObjectRestResponse add(User user); diff --git a/falsework-client/src/main/java/com/epri/fx/client/request/feign/login/LoginFeign.java b/falsework-client/src/main/java/com/fx/client/request/feign/login/LoginFeign.java similarity index 73% rename from falsework-client/src/main/java/com/epri/fx/client/request/feign/login/LoginFeign.java rename to falsework-client/src/main/java/com/fx/client/request/feign/login/LoginFeign.java index 69284ac..f93dc5c 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/request/feign/login/LoginFeign.java +++ b/falsework-client/src/main/java/com/fx/client/request/feign/login/LoginFeign.java @@ -1,10 +1,10 @@ -package com.epri.fx.client.request.feign.login; +package com.fx.client.request.feign.login; -import com.epri.fx.client.request.feign.FeignAPI; -import com.epri.fx.server.msg.ObjectRestResponse; -import com.epri.fx.server.util.user.JwtAuthenticationRequest; -import com.epri.fx.server.vo.FrontUser; -import com.epri.fx.server.vo.MenuVO; +import com.fx.client.request.feign.FeignAPI; +import com.fx.server.msg.ObjectRestResponse; +import com.fx.server.util.user.JwtAuthenticationRequest; +import com.fx.server.vo.FrontUser; +import com.fx.server.vo.MenuVO; import feign.Param; import feign.RequestLine; diff --git a/falsework-client/src/main/java/com/epri/fx/client/store/ApplicatonStore.java b/falsework-client/src/main/java/com/fx/client/store/ApplicatonStore.java similarity index 96% rename from falsework-client/src/main/java/com/epri/fx/client/store/ApplicatonStore.java rename to falsework-client/src/main/java/com/fx/client/store/ApplicatonStore.java index 273a78e..088b69c 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/store/ApplicatonStore.java +++ b/falsework-client/src/main/java/com/fx/client/store/ApplicatonStore.java @@ -1,16 +1,15 @@ -package com.epri.fx.client.store; +package com.fx.client.store; -import com.epri.fx.client.bean.MenuVoCell; -import com.epri.fx.server.vo.GroupVO; -import com.epri.fx.server.vo.MenuVO; -import com.epri.fx.server.vo.PermissionInfo; +import com.fx.client.bean.MenuVoCell; +import com.fx.server.vo.GroupVO; +import com.fx.server.vo.MenuVO; +import com.fx.server.vo.PermissionInfo; import javafx.beans.property.*; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.collections.ObservableMap; import java.util.HashMap; -import java.util.Map; /** * @description: diff --git a/falsework-client/src/main/java/com/epri/fx/client/utils/AlertUtil.java b/falsework-client/src/main/java/com/fx/client/utils/AlertUtil.java similarity index 95% rename from falsework-client/src/main/java/com/epri/fx/client/utils/AlertUtil.java rename to falsework-client/src/main/java/com/fx/client/utils/AlertUtil.java index bbaec03..b1e33e7 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/utils/AlertUtil.java +++ b/falsework-client/src/main/java/com/fx/client/utils/AlertUtil.java @@ -1,6 +1,6 @@ -package com.epri.fx.client.utils; +package com.fx.client.utils; -import com.epri.fx.server.msg.BaseResponse; +import com.fx.server.msg.BaseResponse; import com.jfoenix.controls.JFXAlert; import com.jfoenix.controls.JFXButton; import com.jfoenix.controls.JFXDialogLayout; diff --git a/falsework-client/src/main/java/com/epri/fx/client/utils/Helper.java b/falsework-client/src/main/java/com/fx/client/utils/Helper.java similarity index 85% rename from falsework-client/src/main/java/com/epri/fx/client/utils/Helper.java rename to falsework-client/src/main/java/com/fx/client/utils/Helper.java index ba35a49..da33488 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/utils/Helper.java +++ b/falsework-client/src/main/java/com/fx/client/utils/Helper.java @@ -1,4 +1,4 @@ -package com.epri.fx.client.utils; +package com.fx.client.utils; /** * @description: diff --git a/falsework-client/src/main/java/com/epri/fx/client/utils/Pinyin4jUtil.java b/falsework-client/src/main/java/com/fx/client/utils/Pinyin4jUtil.java similarity index 99% rename from falsework-client/src/main/java/com/epri/fx/client/utils/Pinyin4jUtil.java rename to falsework-client/src/main/java/com/fx/client/utils/Pinyin4jUtil.java index f4e6ae2..76cc2be 100644 --- a/falsework-client/src/main/java/com/epri/fx/client/utils/Pinyin4jUtil.java +++ b/falsework-client/src/main/java/com/fx/client/utils/Pinyin4jUtil.java @@ -1,4 +1,4 @@ -package com.epri.fx.client.utils; +package com.fx.client.utils; import net.sourceforge.pinyin4j.PinyinHelper; import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType; diff --git a/falsework-client/src/main/java/com/fx/client/websocket/WSClient.java b/falsework-client/src/main/java/com/fx/client/websocket/WSClient.java new file mode 100644 index 0000000..fff7b9a --- /dev/null +++ b/falsework-client/src/main/java/com/fx/client/websocket/WSClient.java @@ -0,0 +1,91 @@ +package com.fx.client.websocket; + +import com.fx.client.gui.uicomponents.login.LoginController; +import com.fx.client.store.ApplicatonStore; +import io.datafx.controller.context.ApplicationContext; +import io.datafx.controller.flow.FlowException; +import io.datafx.controller.flow.FlowHandler; +import io.datafx.controller.injection.scopes.ApplicationScoped; +import io.datafx.controller.util.VetoException; +import io.datafx.core.concurrent.ProcessChain; +import lombok.extern.slf4j.Slf4j; +import org.java_websocket.client.WebSocketClient; +import org.java_websocket.handshake.ServerHandshake; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.HashMap; +import java.util.Map; + +/** + * @description: + * @className: Session + * @author: liwen + * @date: 2020/6/24 16:17 + */ +@ApplicationScoped +@Slf4j +public class WSClient extends WebSocketClient { + + private static WSClient instance; + + + public static synchronized WSClient getInstance() { + if (instance == null) { + Map httpHeaders = new HashMap<>(); + try { + instance = new WSClient(new URI("ws://localhost:8080/websocket/test")); + } catch (URISyntaxException e) { + e.printStackTrace(); + } + } + + return instance; + } + + + public WSClient(URI serverUri) { + super(serverUri); + } + + + @Override + public void onOpen(ServerHandshake handshakedata) { + log.info("[websocket] 连接成功"); + System.err.println(instance.isOpen()); + } + + @Override + public void onMessage(String message) { + log.info("[websocket] 收到消息={}", message); + + } + + @Override + public void onClose(int code, String reason, boolean remote) { + log.info("[websocket] 退出连接"); + instance = null; + + ProcessChain.create().addRunnableInPlatformThread(() -> { + ApplicatonStore.clearPermissionInfo(); + FlowHandler flowHandler= (FlowHandler) ApplicationContext.getInstance().getRegisteredObject("ContentFlowHandler"); + try { + flowHandler.navigateTo(LoginController.class); + } catch (VetoException e) { + e.printStackTrace(); + } catch (FlowException e) { + e.printStackTrace(); + } + }).run(); + + + } + + @Override + public void onError(Exception ex) { + log.info("[websocket] 连接错误={}", ex.getMessage()); + instance = null; + } + + +} diff --git a/falsework-client/src/main/resources/META-INF/datafx.xml b/falsework-client/src/main/resources/META-INF/datafx.xml deleted file mode 100644 index 1c0aa57..0000000 --- a/falsework-client/src/main/resources/META-INF/datafx.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - com.epri.fx.client.gui.uicomponents.feature.UserGroupFeatures - - - \ No newline at end of file diff --git a/falsework-client/src/main/resources/css/app-dark.css b/falsework-client/src/main/resources/css/app-dark.css index c4fe154..816453c 100644 --- a/falsework-client/src/main/resources/css/app-dark.css +++ b/falsework-client/src/main/resources/css/app-dark.css @@ -26,7 +26,12 @@ -fx-icon-svg-color: rgb(3,115,248) } - +#waring{ + -fx-background-color: #06488a; +} +.waringbut{ + -fx-background-color: #6e57e5; +} .backgroundPane { -fx-background-color: -fx-card-base; } @@ -320,6 +325,8 @@ -fx-background-color: TRANSPARENT } + + .tool-bar-button > .jfx-svg-glyph { -fx-fill: -fx-text-color; -fx-text-fill: -fx-text-color; @@ -334,6 +341,22 @@ .tool-bar-button:focused { -fx-background-color: TRANSPARENT } +.tool-bar-toggle { + -fx-fill: -fx-text-color; + -fx-text-fill: -fx-text-color; + -fx-pref-height: 32; + -fx-pref-width: 32; + -fx-background-radius: 16; + -fx-background-color: derive(-fx-main-base, 10%) +} + + +.tool-bar-toggle > .jfx-svg-glyph { + -fx-fill: -fx-text-color; + -fx-text-fill: -fx-text-color; + -fx-prompt-text-fill: -fx-text-color; + -jfx-size: 20px; +} /******************************************************************************* * * @@ -387,7 +410,7 @@ } .jfx-tab-pane .headers-region .tab .tab-container .tab-close-button:hover { - -fx-background-color: derive(-fx-text-color, -20%) + -fx-background-color: derive(-fx-text-color, -50%) } @@ -977,6 +1000,30 @@ } +#status-success-label { + -fx-text-fill: #ffffff; + -fx-background-color: #1ea681; + -fx-background-radius: 10; + -fx-padding: 5 10 5 10; +} +#status-error-label { + -fx-background-color: #e63c53; + -fx-background-radius: 10; + -fx-text-fill: #ffffff; + -fx-padding: 5 10 5 10; +} +.icons-badge .badge-pane { + -fx-background-color: #ff4081; + -fx-background-radius: 20; + -fx-pref-width: 20; + -fx-pref-height: 20; + -fx-alignment: center; +} + +.icons-badge Label { + -fx-font-size: 14.0px; + -fx-text-fill: WHITE; +} diff --git a/falsework-client/src/main/resources/css/app-light.css b/falsework-client/src/main/resources/css/app-light.css index 487d3de..2285798 100644 --- a/falsework-client/src/main/resources/css/app-light.css +++ b/falsework-client/src/main/resources/css/app-light.css @@ -33,7 +33,7 @@ -fx-background-color: -fx-card-base; } -.tool-pane{ +.tool-pane { -fx-border-color: -fx-border-base; -fx-border-width: 0 0 0.45 0; } @@ -57,12 +57,12 @@ } -. - /******************************************************************************* - * * - * text和label * - * * - *******************************************************************************/ + +/******************************************************************************* +* * +* text和label * +* * +*******************************************************************************/ .label { -fx-text-fill: -fx-text-color; -fx-font-family: "Microsoft YaHei"; @@ -111,9 +111,8 @@ .jfx-button { -fx-padding: 0.47em 0.47em; -fx-background-color: -fx-accent-color; - -fx-text-fill: -fx-text-color; + -fx-text-fill: #ffffff; -jfx-button-type: RAISED; - } .jfx-button > MaterialDesignIconView, .toggle-button > MaterialDesignIconView { @@ -338,6 +337,22 @@ -fx-background-color: TRANSPARENT } +.tool-bar-toggle { + -fx-fill: -fx-text-color; + -fx-text-fill: -fx-text-color; + -fx-pref-height: 32; + -fx-pref-width: 32; + -fx-background-radius: 16; + -fx-background-color: ladder(-fx-main-base, rgba(255, 255, 255, .2) 29%, rgba(0, 0, 0, .2) 30%); +} + +.tool-bar-toggle > .jfx-svg-glyph { + -fx-fill: -fx-text-color; + -fx-text-fill: -fx-text-color; + -fx-prompt-text-fill: -fx-text-color; + -jfx-size: 20px; +} + /******************************************************************************* * * * JFX TabPane * @@ -390,7 +405,7 @@ } .jfx-tab-pane .headers-region .tab .tab-container .tab-close-button:hover { - -fx-background-color: derive(-fx-text-color, 20%) + -fx-background-color: derive(-fx-text-color, 90%) } @@ -439,7 +454,7 @@ .jfx-list-cell:filled:hover, .jfx-list-cell:selected .label { - -fx-text-fill: -fx-text-color; + -fx-text-fill: #ffffff; } .jfx-list-cell .jfx-rippler { @@ -634,9 +649,9 @@ -fx-background-color: transparent; } -.table-row-cell .text { - -fx-fill: -fx-text-color; -} +/*.table-row-cell .text {*/ +/* -fx-fill: -fx-text-color;*/ +/*}*/ /*TableView的单元之间去掉没有数据的竖线 */ .table-view .table-row-cell:empty, .table-view .table-row-cell:empty .table-cell { @@ -980,10 +995,33 @@ -fx-tick-label-fill: #454545; } - - - - +#status-success-label { + -fx-text-fill: #ffffff; + -fx-background-color: #1ea681; + -fx-background-radius: 10; + -fx-padding: 5 10 5 10; +} + +#status-error-label { + -fx-background-color: #e63c53; + -fx-background-radius: 10; + -fx-text-fill: #ffffff; + -fx-padding: 5 10 5 10; +} + + +.icons-badge .badge-pane { + -fx-background-color: #ff4081; + -fx-background-radius: 20; + -fx-pref-width: 20; + -fx-pref-height: 20; + -fx-alignment: center; +} + +.icons-badge Label { + -fx-font-size: 14.0px; + -fx-text-fill: WHITE; +} diff --git a/falsework-client/src/main/resources/fonts/icon_font/iconfont.svg b/falsework-client/src/main/resources/fonts/icon_font/iconfont.svg index f75a2dc..a8ff077 100644 --- a/falsework-client/src/main/resources/fonts/icon_font/iconfont.svg +++ b/falsework-client/src/main/resources/fonts/icon_font/iconfont.svg @@ -20,6 +20,39 @@ Created by iconfont /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/falsework-client/src/main/resources/fxml/admin/logManagement/login_log.fxml b/falsework-client/src/main/resources/fxml/admin/logManagement/login_log.fxml new file mode 100644 index 0000000..a9aff0d --- /dev/null +++ b/falsework-client/src/main/resources/fxml/admin/logManagement/login_log.fxml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/falsework-client/src/main/resources/fxml/admin/log/log_management.fxml b/falsework-client/src/main/resources/fxml/admin/logManagement/operation_log.fxml similarity index 100% rename from falsework-client/src/main/resources/fxml/admin/log/log_management.fxml rename to falsework-client/src/main/resources/fxml/admin/logManagement/operation_log.fxml diff --git a/falsework-client/src/main/resources/fxml/admin/quartz/job.fxml b/falsework-client/src/main/resources/fxml/admin/quartz/job.fxml deleted file mode 100644 index e65ac94..0000000 --- a/falsework-client/src/main/resources/fxml/admin/quartz/job.fxml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/falsework-client/src/main/resources/fxml/admin/quartz/job_log.fxml b/falsework-client/src/main/resources/fxml/admin/quartz/job_log.fxml deleted file mode 100644 index 9ed3796..0000000 --- a/falsework-client/src/main/resources/fxml/admin/quartz/job_log.fxml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/falsework-client/src/main/resources/fxml/main/main.fxml b/falsework-client/src/main/resources/fxml/main/main.fxml index c50aaf2..7b5bd64 100644 --- a/falsework-client/src/main/resources/fxml/main/main.fxml +++ b/falsework-client/src/main/resources/fxml/main/main.fxml @@ -1,5 +1,6 @@ + @@ -7,7 +8,7 @@ - + @@ -54,12 +55,25 @@ - - - + + + + + + + + + + + + + diff --git a/falsework-client/src/main/resources/fxml/monitor/onlineuser/online_user.fxml b/falsework-client/src/main/resources/fxml/monitor/onlineuser/online_user.fxml new file mode 100644 index 0000000..83f5bb4 --- /dev/null +++ b/falsework-client/src/main/resources/fxml/monitor/onlineuser/online_user.fxml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/falsework-client/src/main/resources/fxml/monitor/quartz/job.fxml b/falsework-client/src/main/resources/fxml/monitor/quartz/job.fxml new file mode 100644 index 0000000..485c82f --- /dev/null +++ b/falsework-client/src/main/resources/fxml/monitor/quartz/job.fxml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/falsework-client/src/main/resources/fxml/monitor/quartz/job_detail.fxml b/falsework-client/src/main/resources/fxml/monitor/quartz/job_detail.fxml new file mode 100644 index 0000000..99c5af8 --- /dev/null +++ b/falsework-client/src/main/resources/fxml/monitor/quartz/job_detail.fxml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/falsework-client/src/main/resources/fxml/monitor/quartz/job_log.fxml b/falsework-client/src/main/resources/fxml/monitor/quartz/job_log.fxml new file mode 100644 index 0000000..a8c6fde --- /dev/null +++ b/falsework-client/src/main/resources/fxml/monitor/quartz/job_log.fxml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/falsework-client/src/main/resources/fxml/test/test.fxml b/falsework-client/src/main/resources/fxml/test/test.fxml new file mode 100644 index 0000000..b1c9fd7 --- /dev/null +++ b/falsework-client/src/main/resources/fxml/test/test.fxml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/falsework-client/src/main/resources/sample-client.properties b/falsework-client/src/main/resources/sample-client.properties index 3dbb7cd..113b332 100644 --- a/falsework-client/src/main/resources/sample-client.properties +++ b/falsework-client/src/main/resources/sample-client.properties @@ -17,7 +17,7 @@ sample-client.ribbon.ConnectTimeout = 60000 sample-client.ribbon.ReadTimeout = 60000 #初始服务器列表,可以在运行时通过Archaius动态属性进行更改 -sample-client.ribbon.listOfServers =localhost:8080,localhost:9080 +sample-client.ribbon.listOfServers =localhost:8080 #启用主要连接 diff --git a/falsework-client/src/test/java/MyStackedAreaChart.java b/falsework-client/src/test/java/MyStackedAreaChart.java index b302e15..2e213fd 100644 --- a/falsework-client/src/test/java/MyStackedAreaChart.java +++ b/falsework-client/src/test/java/MyStackedAreaChart.java @@ -104,6 +104,7 @@ public class MyStackedAreaChart extends LineChart { VBox vBox = new VBox(); vBox.setSpacing(5); + vBox.getChildren().add(new Label(xValue.toString())); for (int i = 0; i < getData().size(); i++) { Series series = getData().get(i); series.getNode().getStyle(); diff --git a/falsework-client/src/test/java/StackedAreaChartApp.java b/falsework-client/src/test/java/StackedAreaChartApp.java index 3c16880..3392804 100644 --- a/falsework-client/src/test/java/StackedAreaChartApp.java +++ b/falsework-client/src/test/java/StackedAreaChartApp.java @@ -29,10 +29,7 @@ public class StackedAreaChartApp extends Application { private StackPane pane; private CategoryAxis xAxis; private NumberAxis yAxis; - private Circle selector; private Line selectorLine; - private List strokePaths; - private Tooltip selectorTooltip; public MyStackedAreaChart createContent() { @@ -70,18 +67,11 @@ public class StackedAreaChartApp extends Application { )) ); chart = new MyStackedAreaChart(xAxis, yAxis, areaChartData); - chart.setCreateSymbols(true); + chart.setCreateSymbols(false); return chart; } - private StackPane createPane(){ - selectorLine = new Line(); - selectorLine.setFill(Color.WHEAT); - selectorLine.setStrokeWidth(5f); - pane = new StackPane(); - pane.getChildren().addAll(createContent(),selectorLine); - return pane; - } + diff --git a/falsework-client/src/test/java/TableViewSample.java b/falsework-client/src/test/java/TableViewSample.java index e2a1a6d..60deb76 100644 --- a/falsework-client/src/test/java/TableViewSample.java +++ b/falsework-client/src/test/java/TableViewSample.java @@ -1,4 +1,4 @@ -import com.epri.fx.server.vo.UserVO; +import com.fx.server.vo.UserVO; import javafx.application.Application; import javafx.beans.property.IntegerProperty; import javafx.beans.property.ListProperty; diff --git a/falsework-sever/pom.xml b/falsework-sever/pom.xml index 73fc7e8..c593c60 100644 --- a/falsework-sever/pom.xml +++ b/falsework-sever/pom.xml @@ -8,7 +8,7 @@ 2.4.1 - com.epri + com.fx falsework-sever 0.0.1-SNAPSHOT falsework-sever @@ -106,11 +106,7 @@ system ${basedir}/libs/DmJdbcDriver-1.0.0.jar - - commons-codec - commons-codec - 1.14 - + pinyin4j pinyin4j diff --git a/falsework-sever/sql/mysql/fx_falsework_db.sql b/falsework-sever/sql/mysql/fx_falsework_db.sql new file mode 100644 index 0000000..82cbe0c --- /dev/null +++ b/falsework-sever/sql/mysql/fx_falsework_db.sql @@ -0,0 +1,803 @@ +/* + Navicat MySQL Data Transfer + + Source Server : localhost_3306 + Source Server Type : MySQL + Source Server Version : 80022 + Source Host : localhost:3306 + Source Schema : fx_falsework_db + + Target Server Type : MySQL + Target Server Version : 80022 + File Encoding : 65001 + + Date: 14/01/2021 16:38:46 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for auth_client_service +-- ---------------------------- +DROP TABLE IF EXISTS `auth_client_service`; +CREATE TABLE `auth_client_service` ( + `id` int NOT NULL AUTO_INCREMENT, + `service_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `client_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `crt_time` timestamp NULL DEFAULT NULL, + `crt_user` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `crt_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `crt_host` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr1` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr2` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr3` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr4` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr5` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr6` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr7` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr8` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `id_13178295930045`(`id`) USING BTREE +) ENGINE = MyISAM AUTO_INCREMENT = 20 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of auth_client_service +-- ---------------------------- +INSERT INTO `auth_client_service` VALUES (1, '3', '1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `auth_client_service` VALUES (2, '2', '1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `auth_client_service` VALUES (3, '2', '3', NULL, '2017-12-31 08:58:03', 'null', 'null', 'null', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `auth_client_service` VALUES (16, '1', '7', NULL, '2018-11-15 19:50:50', '9', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `auth_client_service` VALUES (17, '2', '7', NULL, '2018-11-15 19:50:50', '9', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `auth_client_service` VALUES (18, '3', '7', NULL, '2018-11-15 19:50:50', '9', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `auth_client_service` VALUES (19, '7', '7', NULL, '2018-11-15 19:50:50', '9', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + +-- ---------------------------- +-- Table structure for base_element +-- ---------------------------- +DROP TABLE IF EXISTS `base_element`; +CREATE TABLE `base_element` ( + `id` int NOT NULL AUTO_INCREMENT, + `code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `uri` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `menu_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `parent_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `path` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `method` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `crt_time` timestamp NULL DEFAULT NULL, + `crt_user` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `crt_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `crt_host` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr1` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr2` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr3` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr4` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr5` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr6` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr7` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr8` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `id_13178345917581`(`id`) USING BTREE +) ENGINE = MyISAM AUTO_INCREMENT = 43 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of base_element +-- ---------------------------- +INSERT INTO `base_element` VALUES (4, 'menuManager:element', 'uri', '按钮页面', '/admin/element', '6', NULL, NULL, 'GET', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_element` VALUES (5, 'menuManager:btn_add', 'button', '新增', '/menu/{*}', '6', NULL, NULL, 'POST', '', '2020-12-03 13:25:44', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_element` VALUES (6, 'menuManager:btn_edit', 'button', '编辑', '/menu', '6', '', '', 'PUT', '', '2020-12-03 13:26:03', '1', 'admin', '127.0.0.1', '', '', '', '', '', '', '', ''); +INSERT INTO `base_element` VALUES (7, 'menuManager:btn_del', 'button', '删除', '/menu/{*}', '6', '', '', 'DELETE', '', '2020-12-03 13:26:12', '1', 'admin', '127.0.0.1', '', '', '', '', '', '', '', ''); +INSERT INTO `base_element` VALUES (8, 'menuManager:btn_element_add', 'button', '新增元素', '/element', '6', NULL, NULL, 'POST', '', '2020-12-03 13:26:26', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_element` VALUES (9, 'menuManager:btn_element_edit', 'button', '编辑元素', '/element', '6', NULL, NULL, 'PUT', '', '2020-12-03 13:26:37', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_element` VALUES (10, 'menuManager:btn_element_del', 'button', '删除元素', '/element/{*}', '6', NULL, NULL, 'DELETE', '', '2020-12-03 13:26:43', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_element` VALUES (12, 'groupManager:btn_edit', 'button', '编辑', '/group', '7', NULL, NULL, 'PUT', '', '2020-12-03 13:46:59', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_element` VALUES (14, 'groupManager:btn_userManager', 'button', '分配用户', '/group/{*}/user', '7', NULL, NULL, 'PUT', '', '2020-12-03 13:26:58', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_element` VALUES (15, 'groupManager:btn_resourceManager', 'button', '分配权限', '/group/{*}/authority/menu', '7', NULL, NULL, 'PUT', '', '2020-12-03 13:48:31', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_element` VALUES (19, 'menuManager:view', 'uri', '查看', '/admin/menu/{*}', '6', '', '', 'GET', '', '2017-06-26 00:00:00', '', '', '', '', '', '', '', '', '', '', ''); +INSERT INTO `base_element` VALUES (20, 'menuManager:element_view', 'uri', '查看', '/admin/element/{*}', '6', NULL, NULL, 'GET', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_element` VALUES (22, 'groupTypeManager:view', 'uri', '查看', '/admin/groupType/{*}', '8', NULL, NULL, 'GET', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_element` VALUES (23, 'groupTypeManager:btn_add', 'button', '新增', '/groupType', '8', NULL, NULL, 'POST', NULL, '2020-12-03 13:17:51', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_element` VALUES (24, 'groupTypeManager:btn_edit', 'button', '编辑', '/groupType', '8', NULL, NULL, 'PUT', NULL, '2020-12-03 13:22:14', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_element` VALUES (25, 'groupTypeManager:btn_del', 'button', '删除', '/groupType/{*}', '8', NULL, NULL, 'DELETE', NULL, '2020-12-03 13:18:12', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_element` VALUES (27, 'serviceManager:view', 'URI', '查看', '/auth/service/{*}', '10', NULL, NULL, 'GET', NULL, '2017-12-26 20:17:42', '1', 'Mr.AG', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_element` VALUES (28, 'serviceManager:btn_add', 'button', '新增', '/auth/service', '10', NULL, NULL, 'POST', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_element` VALUES (29, 'serviceManager:btn_edit', 'button', '编辑', '/auth/service/{*}', '10', NULL, NULL, 'PUT', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_element` VALUES (30, 'serviceManager:btn_del', 'button', '删除', '/auth/service/{*}', '10', NULL, NULL, 'DELETE', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_element` VALUES (31, 'serviceManager:btn_clientManager', 'button', '服务授权', '/auth/service/{*}/client', '10', NULL, NULL, 'POST', NULL, '2017-12-30 16:32:48', '1', 'Mr.AG', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_element` VALUES (34, 'home', 'uri', '查看', 'home/', '16', NULL, NULL, 'GET', NULL, '2018-11-08 17:50:05', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_element` VALUES (37, 'userManager:btn_add', 'button', '添加', '/user', '1', NULL, NULL, 'POST', '', '2020-12-03 13:23:40', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_element` VALUES (38, 'userManager:btn_del', 'button', '删除', '/user/{*}', '1', NULL, NULL, 'DELETE', '', '2020-12-03 13:24:35', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_element` VALUES (39, 'userManager:btn_edit', 'button', '修改', '/user/{*}', '1', NULL, NULL, 'PUT', '', '2020-12-03 13:35:36', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_element` VALUES (42, 'groupManager:btn_del', 'button', '删除', '/group', '7', NULL, NULL, 'DELETE', '', '2020-12-03 13:48:03', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_element` VALUES (41, 'groupManager:btn_add', 'button', '新增', '/group', '7', NULL, NULL, 'POST', '', '2020-12-03 13:47:29', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_element` VALUES (40, 'userManage:rest', 'button', '重置密码', '/user/password/{*}', '1', NULL, NULL, 'PUT', '', '2020-12-03 13:42:38', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + +-- ---------------------------- +-- Table structure for base_group +-- ---------------------------- +DROP TABLE IF EXISTS `base_group`; +CREATE TABLE `base_group` ( + `id` int NOT NULL AUTO_INCREMENT, + `code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `parent_id` int NOT NULL, + `path` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `type` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `group_type` int NOT NULL, + `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `crt_time` timestamp NULL DEFAULT NULL, + `crt_user` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `crt_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `crt_host` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `upd_time` timestamp NULL DEFAULT NULL, + `upd_user` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `upd_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `upd_host` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr1` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr2` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr3` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr4` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr5` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr6` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr7` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr8` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `id_13178352287356`(`id`) USING BTREE +) ENGINE = MyISAM AUTO_INCREMENT = 11 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of base_group +-- ---------------------------- +INSERT INTO `base_group` VALUES (7, 'financeDepart', '财务部', 6, '/company/financeDepart', NULL, 2, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_group` VALUES (8, 'hrDepart', '人力资源部', 6, '/company/hrDepart', NULL, 2, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_group` VALUES (9, 'admin', '管理员', -1, NULL, NULL, 1, '管理员', '2020-09-16 16:52:18', '1', 'admin', '127.0.0.1', '2020-09-16 16:52:18', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_group` VALUES (10, 'youke', '游客', -1, NULL, NULL, 1, 'aaa', '2020-10-26 16:10:37', '1', 'admin', '127.0.0.1', '2020-10-26 16:10:37', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + +-- ---------------------------- +-- Table structure for base_group_leader +-- ---------------------------- +DROP TABLE IF EXISTS `base_group_leader`; +CREATE TABLE `base_group_leader` ( + `id` int NOT NULL AUTO_INCREMENT, + `group_id` int NULL DEFAULT NULL, + `user_id` int NULL DEFAULT NULL, + `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `crt_time` timestamp NULL DEFAULT NULL, + `crt_user` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `crt_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `crt_host` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `upd_time` timestamp NULL DEFAULT NULL, + `upd_user` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `upd_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `upd_host` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr1` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr2` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr3` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr4` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr5` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr6` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr7` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr8` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `id_13178357041319`(`id`) USING BTREE +) ENGINE = MyISAM AUTO_INCREMENT = 39 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of base_group_leader +-- ---------------------------- +INSERT INTO `base_group_leader` VALUES (32, 4, 29, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_group_leader` VALUES (35, 3, 29, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_group_leader` VALUES (36, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_group_leader` VALUES (38, 9, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + +-- ---------------------------- +-- Table structure for base_group_member +-- ---------------------------- +DROP TABLE IF EXISTS `base_group_member`; +CREATE TABLE `base_group_member` ( + `id` int NOT NULL AUTO_INCREMENT, + `group_id` int NULL DEFAULT NULL, + `user_id` int NULL DEFAULT NULL, + `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `crt_time` timestamp NULL DEFAULT NULL, + `crt_user` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `crt_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `crt_host` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `upd_time` timestamp NULL DEFAULT NULL, + `upd_user` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `upd_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `upd_host` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr1` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr2` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr3` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr4` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr5` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr6` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr7` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr8` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `id_13178361150862`(`id`) USING BTREE +) ENGINE = MyISAM AUTO_INCREMENT = 63 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of base_group_member +-- ---------------------------- +INSERT INTO `base_group_member` VALUES (54, 4, 29, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_group_member` VALUES (57, 3, 29, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_group_member` VALUES (58, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_group_member` VALUES (59, 1, 4, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_group_member` VALUES (60, 1, 29, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_group_member` VALUES (62, 9, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + +-- ---------------------------- +-- Table structure for base_group_type +-- ---------------------------- +DROP TABLE IF EXISTS `base_group_type`; +CREATE TABLE `base_group_type` ( + `id` int NOT NULL AUTO_INCREMENT, + `code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `crt_time` timestamp NULL DEFAULT NULL, + `crt_user` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `crt_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `crt_host` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `upd_time` timestamp NULL DEFAULT NULL, + `upd_user` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `upd_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `upd_host` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr1` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr2` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr3` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr4` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr5` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr6` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr7` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr8` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `id_13178366074910`(`id`) USING BTREE +) ENGINE = MyISAM AUTO_INCREMENT = 14 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of base_group_type +-- ---------------------------- +INSERT INTO `base_group_type` VALUES (1, 'role', '角色类型', 'role', NULL, NULL, NULL, NULL, '2017-08-25 17:52:37', '1', 'Mr.AG', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_group_type` VALUES (2, 'depart', '部门类型', '部门类型', NULL, NULL, NULL, NULL, '2020-08-01 19:25:34', '1', 'Mr.AG', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_group_type` VALUES (3, 'freeaa', '自定义类型', 'sadf', NULL, NULL, NULL, NULL, '2020-12-03 19:57:40', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + +-- ---------------------------- +-- Table structure for base_menu +-- ---------------------------- +DROP TABLE IF EXISTS `base_menu`; +CREATE TABLE `base_menu` ( + `id` int NOT NULL AUTO_INCREMENT, + `code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `parent_id` int NOT NULL, + `href` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `icon` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `type` char(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `order_num` int NOT NULL DEFAULT 0, + `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `path` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `enabled` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `crt_time` timestamp NULL DEFAULT NULL, + `crt_user` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `crt_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `crt_host` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `upd_time` timestamp NULL DEFAULT NULL, + `upd_user` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `upd_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `upd_host` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr1` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr2` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr3` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr4` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr5` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr6` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr7` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr8` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `id_13178377753991`(`id`) USING BTREE +) ENGINE = MyISAM AUTO_INCREMENT = 50 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of base_menu +-- ---------------------------- +INSERT INTO `base_menu` VALUES (1, 'userManager', '用户管理', 5, 'com.fx.client.gui.uicomponents.admin.user.UserManagementController', 'yonghuguanli_huaban', 'menu', 11, 'aaaa', '/adminSys/baseManager/userManager', NULL, '2020-12-03 13:43:21', '1', 'admin', '127.0.0.1', '2020-12-03 13:43:21', '1', 'admin', '127.0.0.1', 'admin/user/index', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_menu` VALUES (5, 'baseManager', '基础配置管理', 13, '/admin', 'jichupeizhi', 'dirt', 4, '', '/adminSys/baseManager', NULL, '2021-01-14 16:29:13', '1', 'admin', '127.0.0.1', '2021-01-14 16:29:13', '1', 'admin', '127.0.0.1', 'Layout', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_menu` VALUES (6, 'menuManager', '菜单管理', 5, 'com.fx.client.gui.uicomponents.admin.menu.MenuManagementController', 'jiaoyixulie', 'menu', 12, '你大爷', '/adminSys/baseManager/menuManager', NULL, '2020-09-18 16:53:22', '1', 'admin', '127.0.0.1', '2020-09-18 16:53:22', '1', 'admin', '127.0.0.1', 'admin/menu/index', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_menu` VALUES (7, 'groupManager', '角色权限管理', 5, 'com.fx.client.gui.uicomponents.admin.group.GroupManagementController', 'gongnengjiaosequanxianguanli', 'menu', 13, '', '/adminSys/baseManager/groupManager', NULL, '2020-08-20 15:45:42', '1', 'admin', '127.0.0.1', '2020-08-20 15:45:42', '1', 'admin', '127.0.0.1', 'admin/group/index', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_menu` VALUES (8, 'groupTypeManager', '角色类型管理', 5, 'com.fx.client.gui.uicomponents.admin.grouptype.GroupTypeManagementController', 'jiaoseleixing', 'menu', 14, '', '/adminSys/baseManager/groupTypeManager', NULL, '2020-08-20 15:45:49', '1', 'admin', '127.0.0.1', '2020-08-20 15:45:49', '1', 'admin', '127.0.0.1', 'admin/groupType/index', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_menu` VALUES (13, 'adminSys', '系统菜单', -1, '/base', 'align-justify', 'dirt', 0, '', '/adminSys', NULL, '2020-08-02 18:39:35', '1', 'admin', '127.0.0.1', '2020-08-02 18:39:35', '1', 'admin', '127.0.0.1', 'Layout', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_menu` VALUES (44, 'home', '主页', 13, 'com.fx.client.gui.uicomponents.home.HomeController', 'home-outline', NULL, 0, '', 'com.epri.fx.client.gui.uicomponents.home.HomeController', NULL, '2020-08-03 15:51:48', '1', 'admin', '127.0.0.1', '2020-08-03 15:51:48', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_menu` VALUES (45, 'baseInfo', '基础信息录入', 13, '', 'jichuxinxi', NULL, 1, '基础信息录入', NULL, NULL, '2020-10-14 17:20:25', '1', 'admin', '127.0.0.1', '2020-10-14 17:20:25', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_menu` VALUES (46, 'base', '基础参数', 45, 'com.fx.client.gui.uicomponents.basicInfo.BasicDataSetController', 'jichucanshu', NULL, 0, '', NULL, NULL, '2020-10-14 17:20:04', '1', 'admin', '127.0.0.1', '2020-10-14 17:20:04', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_menu` VALUES (47, '', '煤价差', 45, 'com.fx.client.gui.uicomponents.basicInfo.CoalPriceDiffController', 'Energy-', NULL, 1, '', NULL, NULL, '2020-10-14 17:19:47', '1', 'admin', '127.0.0.1', '2020-10-14 17:19:47', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_menu` VALUES (48, '', '铁路成本', 45, 'com.fx.client.gui.uicomponents.basicInfo.RailwayCostController', 'tieluyunshu', NULL, 2, '', NULL, NULL, '2020-10-14 17:20:41', '1', 'admin', '127.0.0.1', '2020-10-14 17:20:41', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_menu` VALUES (49, '', '现行运价', 45, 'com.fx.client.gui.uicomponents.basicInfo.CurrentFreightController', 'hangzheng', NULL, 3, '', NULL, NULL, '2020-10-14 17:21:09', '1', 'admin', '127.0.0.1', '2020-10-14 17:21:09', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_menu` VALUES (50, 'Systemmonitoring', '系统监控', 13, '', 'jiankong', NULL, 2, '', NULL, NULL, '2021-01-14 16:29:04', '1', 'admin', '127.0.0.1', '2021-01-14 16:29:04', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_menu` VALUES (51, 'log', '日志管理', 13, '', 'rizhiguanli', NULL, 3, '', NULL, NULL, '2021-01-14 16:29:09', '1', 'admin', '127.0.0.1', '2021-01-14 16:29:09', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_menu` VALUES (52, 'online_user', '在线用户', 50, 'com.fx.client.gui.uicomponents.monitor.onlineuser.OnlineUserController', 'ic_user_zx', NULL, 0, '', NULL, NULL, '2021-01-14 16:29:57', '1', 'admin', '127.0.0.1', '2021-01-14 16:29:57', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_menu` VALUES (53, 'job', '定时任务', 50, 'com.fx.client.gui.uicomponents.monitor.quartz.SysJobController', 'time', NULL, 1, '', NULL, NULL, '2021-01-14 16:30:45', '1', 'admin', '127.0.0.1', '2021-01-14 16:30:45', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_menu` VALUES (54, 'login_log', '登录日志', 51, 'com.fx.client.gui.uicomponents.admin.logManagement.LoginLogController', 'denglurizhi', NULL, 1, '', NULL, NULL, '2021-01-14 16:31:29', '1', 'admin', '127.0.0.1', '2021-01-14 16:31:29', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_menu` VALUES (55, 'opt_log', '操作日志', 51, 'com.fx.client.gui.uicomponents.admin.logManagement.OperationLogController', 'caozuorizhi', NULL, 0, '', NULL, NULL, '2021-01-14 16:32:07', '1', 'admin', '127.0.0.1', '2021-01-14 16:32:07', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + +-- ---------------------------- +-- Table structure for base_resource_authority +-- ---------------------------- +DROP TABLE IF EXISTS `base_resource_authority`; +CREATE TABLE `base_resource_authority` ( + `id` int NOT NULL AUTO_INCREMENT, + `authority_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `authority_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `resource_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `resource_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `parent_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `path` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `crt_time` timestamp NULL DEFAULT NULL, + `crt_user` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `crt_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `crt_host` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr1` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr2` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr3` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr4` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr5` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr6` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr7` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr8` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `id_13178383042404`(`id`) USING BTREE +) ENGINE = MyISAM AUTO_INCREMENT = 2516 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of base_resource_authority +-- ---------------------------- +INSERT INTO `base_resource_authority` VALUES (2165, '1', 'group', '1', 'menu', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2166, '1', 'group', '5', 'menu', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2167, '1', 'group', '4', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2168, '1', 'group', '5', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2169, '1', 'group', '6', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2170, '1', 'group', '7', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2171, '1', 'group', '8', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2172, '1', 'group', '9', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2173, '1', 'group', '10', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2174, '1', 'group', '19', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2175, '1', 'group', '20', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2176, '1', 'group', '6', 'menu', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2177, '1', 'group', '11', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2178, '1', 'group', '12', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2179, '1', 'group', '13', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2180, '1', 'group', '14', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2181, '1', 'group', '15', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2182, '1', 'group', '16', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2183, '1', 'group', '17', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2184, '1', 'group', '21', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2185, '1', 'group', '26', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2186, '1', 'group', '7', 'menu', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2187, '1', 'group', '22', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2188, '1', 'group', '23', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2189, '1', 'group', '24', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2190, '1', 'group', '25', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2191, '1', 'group', '8', 'menu', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2193, '1', 'group', '44', 'menu', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2545, '9', 'group', '45', 'menu', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2544, '9', 'group', '44', 'menu', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2542, '9', 'group', '8', 'menu', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2541, '9', 'group', '25', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2540, '9', 'group', '24', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2539, '9', 'group', '23', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2538, '9', 'group', '22', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2537, '9', 'group', '7', 'menu', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2536, '9', 'group', '41', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2535, '9', 'group', '42', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2534, '9', 'group', '15', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2533, '9', 'group', '14', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2532, '9', 'group', '12', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2531, '9', 'group', '6', 'menu', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2530, '9', 'group', '20', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2529, '9', 'group', '19', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2528, '9', 'group', '10', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2527, '9', 'group', '9', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2526, '9', 'group', '8', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2525, '9', 'group', '7', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2524, '9', 'group', '6', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2523, '9', 'group', '5', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2522, '9', 'group', '4', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2521, '9', 'group', '5', 'menu', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2520, '9', 'group', '1', 'menu', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2519, '9', 'group', '40', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2518, '9', 'group', '39', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2517, '9', 'group', '38', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2516, '9', 'group', '37', 'button', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2546, '9', 'group', '46', 'menu', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2547, '9', 'group', '47', 'menu', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2548, '9', 'group', '48', 'menu', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2549, '9', 'group', '49', 'menu', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2550, '9', 'group', '50', 'menu', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2551, '9', 'group', '51', 'menu', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2552, '9', 'group', '52', 'menu', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2553, '9', 'group', '53', 'menu', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2554, '9', 'group', '54', 'menu', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_resource_authority` VALUES (2555, '9', 'group', '55', 'menu', '-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + +-- ---------------------------- +-- Table structure for base_rsa_key +-- ---------------------------- +DROP TABLE IF EXISTS `base_rsa_key`; +CREATE TABLE `base_rsa_key` ( + `rsa_key` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `key_value` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + PRIMARY KEY (`rsa_key`) USING BTREE +) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of base_rsa_key +-- ---------------------------- +INSERT INTO `base_rsa_key` VALUES ('IPSM:AUTH:JWT:PRI', 'MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAIaPvusxk+x8KcVONjFUo+ursfLx\nSwOIvci5q0xPa+nUm3C0uu3jX1RQP+s3hWqCb7KgR67HDcZUS8bn2pNzJJWJ352lrpVrb1wftOot\nmrWPhnrdr9sdcgE2pLV8HAy18pq+agXmjWnkf+T558zo5k3I8VBVcTfzsL6HLc5mFt/dAgMBAAEC\ngYAYkZpsWwsFPM5rphIjA69CUoEVOJVXudndEnmCX2X2tckD1RvkX4WCYXyqN+L2RYabeMRd1x5e\nvflwAdlY3sco+otA0Ld9vP9yadlbfjuxzA8XyuvomaZPeJjMxL3dZnEvy29SMkNx3358ILp3BwGg\ne16GYPNZAjbB9fF+9YcggQJBAMs67m65cu2/h9Fe8+kevU32VVF6WZ3+506tYJFmsEbNILp+HFMK\nyp/OXX5DIMJIVA5f9ZYzG9GIgyaNMaKaFlECQQCpgEkflrwhwMkyOqJ0bJDB6GDk6iql2onR4bzF\n2sExbwYh5FjKdSQay+UIvrxLDvJOHyiySKL3rHxQggrgtbHNAkBVfQSvLvNZbygCup5/gZ7AHM7m\n50CrZX6HagclIr0kC0WpLUNc6z0w2+4YHsS49RPmuBbmh7k7+uCwZtRqQccBAkAeFunkM6v+Ce0t\nf38rT8J6ybe5q2AaxSrGGV6bePPmxKDAD3s7pYPdRejInqNqZ6LX/2wICiDz+qiu2gb4UQjZAkAx\nRtRw7QzNu/5aLnU5pxdD33lE+fubQSkq17y3JfeLO2/HsIl0BnKUQGg4TaKpYOaEoHZpgyd2pwlm\nUuNuRalU\n'); +INSERT INTO `base_rsa_key` VALUES ('IPSM:AUTH:JWT:PUB', 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCGj77rMZPsfCnFTjYxVKPrq7Hy8UsDiL3IuatM\nT2vp1JtwtLrt419UUD/rN4Vqgm+yoEeuxw3GVEvG59qTcySVid+dpa6Va29cH7TqLZq1j4Z63a/b\nHXIBNqS1fBwMtfKavmoF5o1p5H/k+efM6OZNyPFQVXE387C+hy3OZhbf3QIDAQAB\n'); + +-- ---------------------------- +-- Table structure for base_user +-- ---------------------------- +DROP TABLE IF EXISTS `base_user`; +CREATE TABLE `base_user` ( + `id` int NOT NULL AUTO_INCREMENT, + `username` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `birthday` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `mobile_phone` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `tel_phone` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `email` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `sex` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `type` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `crt_time` datetime NULL DEFAULT NULL, + `crt_user` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `crt_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `crt_host` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `upd_time` datetime NULL DEFAULT NULL, + `upd_user` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `upd_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `upd_host` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr1` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr2` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr3` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr4` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr5` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr6` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr7` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `attr8` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 32 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of base_user +-- ---------------------------- +INSERT INTO `base_user` VALUES (1, 'admin', '$2a$12$/Xa6YcdVm387zA.EE/6xce11UX.AZBiwerBztXLAVBMhVKQ/pZfNW', 'liwen', '', NULL, '', NULL, '', '男', NULL, NULL, '', '2020-12-03 17:19:07', '1', 'admin', '127.0.0.1', '2020-12-03 17:19:07', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_user` VALUES (4, 'blog', '$2a$12$qWkIM1ZwBhzfs6eHgu6yFOeZB0Rtklt/MlzTg/YkagS19k8EmeV2C', 'Mr.Liwen(博主)', '', NULL, '', NULL, '', '女', NULL, NULL, '12', '2020-12-03 19:56:04', '1', 'admin', '127.0.0.1', '2020-12-03 19:56:36', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `base_user` VALUES (30, 'liwen', '$2a$12$TsY.B4VLwtuIfGSTIpWjHu3tiuwjmVoFoqYTbJv7f/193kdCCRIXO', 'liwen', NULL, NULL, NULL, NULL, NULL, '男', NULL, NULL, 'admin', '2020-11-25 02:37:33', '1', 'admin', '127.0.0.1', '2020-12-03 13:42:11', '1', 'admin', '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + +-- ---------------------------- +-- Table structure for gate_log +-- ---------------------------- +DROP TABLE IF EXISTS `gate_log`; +CREATE TABLE `gate_log` ( + `id` int NOT NULL AUTO_INCREMENT, + `menu` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `opt` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `uri` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `crt_time` timestamp NULL DEFAULT NULL, + `crt_user` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `crt_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `crt_host` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `body` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `id_13178398875749`(`id`) USING BTREE +) ENGINE = MyISAM AUTO_INCREMENT = 107 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of gate_log +-- ---------------------------- +INSERT INTO `gate_log` VALUES (102, '用户管理', '修改', '/user/{*}', '2020-12-03 19:56:04', '1', 'liwen', '127.0.0.1', '{ \"id\" : 4, \"username\" : \"blog\", \"name\" : \"Mr.Liwen(博主)\", \"sex\" : \"女\", \"description\" : \"12\"}'); +INSERT INTO `gate_log` VALUES (103, '用户管理', '重置密码', '/user/password/{*}', '2020-12-03 19:56:36', '1', 'liwen', '127.0.0.1', ''); +INSERT INTO `gate_log` VALUES (104, '角色权限管理', '分配权限', '/group/{*}/authority/menu', '2020-12-03 19:57:06', '1', 'liwen', '127.0.0.1', '[ { \"id\" : 1, \"code\" : \"userManager\", \"title\" : \"用户管理\", \"parentId\" : 5, \"href\" : \"com.epri.fx.client.gui.uicomponents.admin.user.UserManagementController\", \"icon\" : \"yonghuguanli_huaban\", \"type\" : \"menu\", \"orderNum\" : 11, \"description\" : \"aaaa\", \"path\" : \"/adminSys/baseManager/userManager\", \"sel\" : true, \"elementVOS\" : [ { \"id\" : 37, \"code\" : \"userManager:btn_add\", \"type\" : \"button\", \"name\" : \"添加\", \"uri\" : \"/user\", \"menuId\" : \"1\", \"method\" : \"POST\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 38, \"code\" : \"userManager:btn_del\", \"type\" : \"button\", \"name\" : \"删除\", \"uri\" : \"/user/{*}\", \"menuId\" : \"1\", \"method\" : \"DELETE\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 39, \"code\" : \"userManager:btn_edit\", \"type\" : \"button\", \"name\" : \"修改\", \"uri\" : \"/user/{*}\", \"menuId\" : \"1\", \"method\" : \"PUT\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 40, \"code\" : \"userManage:rest\", \"type\" : \"button\", \"name\" : \"重置密码\", \"uri\" : \"/user/password/{*}\", \"menuId\" : \"1\", \"method\" : \"PUT\", \"description\" : \"\", \"sel\" : true } ]}, { \"id\" : 5, \"code\" : \"baseManager\", \"title\" : \"基础配置管理\", \"parentId\" : 13, \"href\" : \"/admin\", \"icon\" : \"jichupeizhi\", \"type\" : \"dirt\", \"orderNum\" : 2, \"description\" : \"\", \"path\" : \"/adminSys/baseManager\", \"sel\" : true, \"elementVOS\" : [ ]}, { \"id\" : 6, \"code\" : \"menuManager\", \"title\" : \"菜单管理\", \"parentId\" : 5, \"href\" : \"com.epri.fx.client.gui.uicomponents.admin.menu.MenuManagementController\", \"icon\" : \"jiaoyixulie\", \"type\" : \"menu\", \"orderNum\" : 12, \"description\" : \"你大爷\", \"path\" : \"/adminSys/baseManager/menuManager\", \"sel\" : true, \"elementVOS\" : [ { \"id\" : 4, \"code\" : \"menuManager:element\", \"type\" : \"uri\", \"name\" : \"按钮页面\", \"uri\" : \"/admin/element\", \"menuId\" : \"6\", \"method\" : \"GET\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 5, \"code\" : \"menuManager:btn_add\", \"type\" : \"button\", \"name\" : \"新增\", \"uri\" : \"/menu/{*}\", \"menuId\" : \"6\", \"method\" : \"POST\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 6, \"code\" : \"menuManager:btn_edit\", \"type\" : \"button\", \"name\" : \"编辑\", \"uri\" : \"/menu\", \"menuId\" : \"6\", \"parentId\" : \"\", \"path\" : \"\", \"method\" : \"PUT\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 7, \"code\" : \"menuManager:btn_del\", \"type\" : \"button\", \"name\" : \"删除\", \"uri\" : \"/menu/{*}\", \"menuId\" : \"6\", \"parentId\" : \"\", \"path\" : \"\", \"method\" : \"DELETE\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 8, \"code\" : \"menuManager:btn_element_add\", \"type\" : \"button\", \"name\" : \"新增元素\", \"uri\" : \"/element\", \"menuId\" : \"6\", \"method\" : \"POST\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 9, \"code\" : \"menuManager:btn_element_edit\", \"type\" : \"button\", \"name\" : \"编辑元素\", \"uri\" : \"/element\", \"menuId\" : \"6\", \"method\" : \"PUT\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 10, \"code\" : \"menuManager:btn_element_del\", \"type\" : \"button\", \"name\" : \"删除元素\", \"uri\" : \"/element/{*}\", \"menuId\" : \"6\", \"method\" : \"DELETE\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 19, \"code\" : \"menuManager:view\", \"type\" : \"uri\", \"name\" : \"查看\", \"uri\" : \"/admin/menu/{*}\", \"menuId\" : \"6\", \"parentId\" : \"\", \"path\" : \"\", \"method\" : \"GET\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 20, \"code\" : \"menuManager:element_view\", \"type\" : \"uri\", \"name\" : \"查看\", \"uri\" : \"/admin/element/{*}\", \"menuId\" : \"6\", \"method\" : \"GET\", \"sel\" : true } ]}, { \"id\" : 7, \"code\" : \"groupManager\", \"title\" : \"角色权限管理\", \"parentId\" : 5, \"href\" : \"com.epri.fx.client.gui.uicomponents.admin.group.GroupManagementController\", \"icon\" : \"gongnengjiaosequanxianguanli\", \"type\" : \"menu\", \"orderNum\" : 13, \"description\" : \"\", \"path\" : \"/adminSys/baseManager/groupManager\", \"sel\" : true, \"elementVOS\" : [ { \"id\" : 12, \"code\" : \"groupManager:btn_edit\", \"type\" : \"button\", \"name\" : \"编辑\", \"uri\" : \"/group\", \"menuId\" : \"7\", \"method\" : \"PUT\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 14, \"code\" : \"groupManager:btn_userManager\", \"type\" : \"button\", \"name\" : \"分配用户\", \"uri\" : \"/group/{*}/user\", \"menuId\" : \"7\", \"method\" : \"PUT\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 15, \"code\" : \"groupManager:btn_resourceManager\", \"type\" : \"button\", \"name\" : \"分配权限\", \"uri\" : \"/group/{*}/authority/menu\", \"menuId\" : \"7\", \"method\" : \"PUT\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 42, \"code\" : \"groupManager:btn_del\", \"type\" : \"button\", \"name\" : \"删除\", \"uri\" : \"/group\", \"menuId\" : \"7\", \"method\" : \"DELETE\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 41, \"code\" : \"groupManager:btn_add\", \"type\" : \"button\", \"name\" : \"新增\", \"uri\" : \"/group\", \"menuId\" : \"7\", \"method\" : \"POST\", \"description\" : \"\", \"sel\" : true } ]}, { \"id\" : 8, \"code\" : \"groupTypeManager\", \"title\" : \"角色类型管理\", \"parentId\" : 5, \"href\" : \"com.epri.fx.client.gui.uicomponents.admin.grouptype.GroupTypeManagementController\", \"icon\" : \"jiaoseleixing\", \"type\" : \"menu\", \"orderNum\" : 14, \"description\" : \"\", \"path\" : \"/adminSys/baseManager/groupTypeManager\", \"sel\" : true, \"elementVOS\" : [ { \"id\" : 22, \"code\" : \"groupTypeManager:view\", \"type\" : \"uri\", \"name\" : \"查看\", \"uri\" : \"/admin/groupType/{*}\", \"menuId\" : \"8\", \"method\" : \"GET\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 23, \"code\" : \"groupTypeManager:btn_add\", \"type\" : \"button\", \"name\" : \"新增\", \"uri\" : \"/groupType\", \"menuId\" : \"8\", \"method\" : \"POST\", \"sel\" : true }, { \"id\" : 24, \"code\" : \"groupTypeManager:btn_edit\", \"type\" : \"button\", \"name\" : \"编辑\", \"uri\" : \"/groupType\", \"menuId\" : \"8\", \"method\" : \"PUT\", \"sel\" : true }, { \"id\" : 25, \"code\" : \"groupTypeManager:btn_del\", \"type\" : \"button\", \"name\" : \"删除\", \"uri\" : \"/groupType/{*}\", \"menuId\" : \"8\", \"method\" : \"DELETE\", \"sel\" : true } ]}, { \"id\" : 27, \"code\" : \"gateLogManager\", \"title\" : \"操作日志\", \"parentId\" : 5, \"href\" : \"/admin/gateLog\", \"icon\" : \"caozuorizhi\", \"type\" : \"menu\", \"orderNum\" : 15, \"description\" : \"\", \"path\" : \"/adminSys/baseManager/gateLogManager\", \"sel\" : true, \"elementVOS\" : [ ]}, { \"id\" : 44, \"code\" : \"home\", \"title\" : \"主页\", \"parentId\" : 13, \"href\" : \"com.epri.fx.client.gui.uicomponents.home.HomeController\", \"icon\" : \"home-outline\", \"orderNum\" : 0, \"description\" : \"\", \"path\" : \"com.epri.fx.client.gui.uicomponents.home.HomeController\", \"sel\" : true, \"elementVOS\" : [ ]}, { \"id\" : 45, \"code\" : \"baseInfo\", \"title\" : \"基础信息录入\", \"parentId\" : 13, \"href\" : \"\", \"icon\" : \"jichuxinxi\", \"orderNum\" : 1, \"description\" : \"基础信息录入\", \"sel\" : true, \"elementVOS\" : [ ]}, { \"id\" : 46, \"code\" : \"base\", \"title\" : \"基础参数\", \"parentId\" : 45, \"href\" : \"com.epri.fx.client.gui.uicomponents.basicInfo.BasicDataSetController\", \"icon\" : \"jichucanshu\", \"orderNum\" : 0, \"description\" : \"\", \"sel\" : true, \"elementVOS\" : [ ]}, { \"id\" : 47, \"code\" : \"\", \"title\" : \"煤价差\", \"parentId\" : 45, \"href\" : \"com.epri.fx.client.gui.uicomponents.basicInfo.CoalPriceDiffController\", \"icon\" : \"Energy-\", \"orderNum\" : 1, \"description\" : \"\", \"sel\" : true, \"elementVOS\" : [ ]}, { \"id\" : 48, \"code\" : \"\", \"title\" : \"铁路成本\", \"parentId\" : 45, \"href\" : \"com.epri.fx.client.gui.uicomponents.basicInfo.RailwayCostController\", \"icon\" : \"tieluyunshu\", \"orderNum\" : 2, \"description\" : \"\", \"sel\" : true, \"elementVOS\" : [ ]}, { \"id\" : 49, \"code\" : \"\", \"title\" : \"现行运价\", \"parentId\" : 45, \"href\" : \"com.epri.fx.client.gui.uicomponents.basicInfo.CurrentFreightController\", \"icon\" : \"hangzheng\", \"orderNum\" : 3, \"description\" : \"\", \"sel\" : true, \"elementVOS\" : [ ]} ]'); +INSERT INTO `gate_log` VALUES (101, '用户管理', '修改', '/user/{*}', '2020-12-03 17:19:07', '1', 'liwen', '127.0.0.1', '{ \"id\" : 1, \"username\" : \"admin\", \"name\" : \"liwen\", \"sex\" : \"男\", \"description\" : \"\"}'); +INSERT INTO `gate_log` VALUES (105, '角色类型管理', '编辑', '/groupType', '2020-12-03 19:57:40', '1', 'liwen', '127.0.0.1', '{ \"id\" : 3, \"code\" : \"freeaa\", \"name\" : \"自定义类型\", \"description\" : \"sadf\"}'); +INSERT INTO `gate_log` VALUES (106, '菜单管理', '编辑', '/menu', '2020-12-04 10:30:20', '1', 'liwen', '127.0.0.1', '{ \"id\" : 27, \"code\" : \"gateLogManager\", \"title\" : \"操作日志\", \"parentId\" : 5, \"href\" : \"com.epri.fx.client.gui.uicomponents.admin.log.LogManagementController\", \"icon\" : \"caozuorizhi\", \"type\" : \"menu\", \"orderNum\" : 15, \"description\" : \"\", \"path\" : \"/adminSys/baseManager/gateLogManager\", \"sel\" : false, \"elementVOS\" : [ ]}'); +INSERT INTO `gate_log` VALUES (107, '菜单管理', '编辑', '/menu', '2021-01-14 16:29:04', '1', 'liwen', '127.0.0.1', '{ \"id\" : 50, \"code\" : \"Systemmonitoring\", \"title\" : \"系统监控\", \"parentId\" : 13, \"href\" : \"\", \"icon\" : \"jiankong\", \"orderNum\" : 2, \"description\" : \"\", \"sel\" : false, \"elementVOS\" : [ ]}'); +INSERT INTO `gate_log` VALUES (108, '菜单管理', '编辑', '/menu', '2021-01-14 16:29:09', '1', 'liwen', '127.0.0.1', '{ \"id\" : 51, \"code\" : \"log\", \"title\" : \"日志管理\", \"parentId\" : 13, \"href\" : \"\", \"icon\" : \"rizhiguanli\", \"orderNum\" : 3, \"description\" : \"\", \"sel\" : false, \"elementVOS\" : [ ]}'); +INSERT INTO `gate_log` VALUES (109, '菜单管理', '编辑', '/menu', '2021-01-14 16:29:13', '1', 'liwen', '127.0.0.1', '{ \"id\" : 5, \"code\" : \"baseManager\", \"title\" : \"基础配置管理\", \"parentId\" : 13, \"href\" : \"/admin\", \"icon\" : \"jichupeizhi\", \"type\" : \"dirt\", \"orderNum\" : 4, \"description\" : \"\", \"path\" : \"/adminSys/baseManager\", \"sel\" : false, \"elementVOS\" : [ ]}'); +INSERT INTO `gate_log` VALUES (110, '菜单管理', '编辑', '/menu', '2021-01-14 16:30:45', '1', 'liwen', '127.0.0.1', '{ \"id\" : 53, \"code\" : \"job\", \"title\" : \"定时任务\", \"parentId\" : 50, \"href\" : \"com.fx.client.gui.uicomponents.monitor.quartz.SysJobController\", \"icon\" : \"time\", \"orderNum\" : 1, \"description\" : \"\", \"sel\" : false, \"elementVOS\" : [ ]}'); +INSERT INTO `gate_log` VALUES (111, '角色权限管理', '分配权限', '/group/{*}/authority/menu', '2021-01-14 16:32:32', '1', 'liwen', '127.0.0.1', '[ { \"id\" : 1, \"code\" : \"userManager\", \"title\" : \"用户管理\", \"parentId\" : 5, \"href\" : \"com.fx.client.gui.uicomponents.admin.user.UserManagementController\", \"icon\" : \"yonghuguanli_huaban\", \"type\" : \"menu\", \"orderNum\" : 11, \"description\" : \"aaaa\", \"path\" : \"/adminSys/baseManager/userManager\", \"sel\" : true, \"elementVOS\" : [ { \"id\" : 37, \"code\" : \"userManager:btn_add\", \"type\" : \"button\", \"name\" : \"添加\", \"uri\" : \"/user\", \"menuId\" : \"1\", \"method\" : \"POST\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 38, \"code\" : \"userManager:btn_del\", \"type\" : \"button\", \"name\" : \"删除\", \"uri\" : \"/user/{*}\", \"menuId\" : \"1\", \"method\" : \"DELETE\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 39, \"code\" : \"userManager:btn_edit\", \"type\" : \"button\", \"name\" : \"修改\", \"uri\" : \"/user/{*}\", \"menuId\" : \"1\", \"method\" : \"PUT\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 40, \"code\" : \"userManage:rest\", \"type\" : \"button\", \"name\" : \"重置密码\", \"uri\" : \"/user/password/{*}\", \"menuId\" : \"1\", \"method\" : \"PUT\", \"description\" : \"\", \"sel\" : true } ]}, { \"id\" : 5, \"code\" : \"baseManager\", \"title\" : \"基础配置管理\", \"parentId\" : 13, \"href\" : \"/admin\", \"icon\" : \"jichupeizhi\", \"type\" : \"dirt\", \"orderNum\" : 4, \"description\" : \"\", \"path\" : \"/adminSys/baseManager\", \"sel\" : true, \"elementVOS\" : [ ]}, { \"id\" : 6, \"code\" : \"menuManager\", \"title\" : \"菜单管理\", \"parentId\" : 5, \"href\" : \"com.fx.client.gui.uicomponents.admin.menu.MenuManagementController\", \"icon\" : \"jiaoyixulie\", \"type\" : \"menu\", \"orderNum\" : 12, \"description\" : \"你大爷\", \"path\" : \"/adminSys/baseManager/menuManager\", \"sel\" : true, \"elementVOS\" : [ { \"id\" : 4, \"code\" : \"menuManager:element\", \"type\" : \"uri\", \"name\" : \"按钮页面\", \"uri\" : \"/admin/element\", \"menuId\" : \"6\", \"method\" : \"GET\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 5, \"code\" : \"menuManager:btn_add\", \"type\" : \"button\", \"name\" : \"新增\", \"uri\" : \"/menu/{*}\", \"menuId\" : \"6\", \"method\" : \"POST\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 6, \"code\" : \"menuManager:btn_edit\", \"type\" : \"button\", \"name\" : \"编辑\", \"uri\" : \"/menu\", \"menuId\" : \"6\", \"parentId\" : \"\", \"path\" : \"\", \"method\" : \"PUT\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 7, \"code\" : \"menuManager:btn_del\", \"type\" : \"button\", \"name\" : \"删除\", \"uri\" : \"/menu/{*}\", \"menuId\" : \"6\", \"parentId\" : \"\", \"path\" : \"\", \"method\" : \"DELETE\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 8, \"code\" : \"menuManager:btn_element_add\", \"type\" : \"button\", \"name\" : \"新增元素\", \"uri\" : \"/element\", \"menuId\" : \"6\", \"method\" : \"POST\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 9, \"code\" : \"menuManager:btn_element_edit\", \"type\" : \"button\", \"name\" : \"编辑元素\", \"uri\" : \"/element\", \"menuId\" : \"6\", \"method\" : \"PUT\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 10, \"code\" : \"menuManager:btn_element_del\", \"type\" : \"button\", \"name\" : \"删除元素\", \"uri\" : \"/element/{*}\", \"menuId\" : \"6\", \"method\" : \"DELETE\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 19, \"code\" : \"menuManager:view\", \"type\" : \"uri\", \"name\" : \"查看\", \"uri\" : \"/admin/menu/{*}\", \"menuId\" : \"6\", \"parentId\" : \"\", \"path\" : \"\", \"method\" : \"GET\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 20, \"code\" : \"menuManager:element_view\", \"type\" : \"uri\", \"name\" : \"查看\", \"uri\" : \"/admin/element/{*}\", \"menuId\" : \"6\", \"method\" : \"GET\", \"sel\" : true } ]}, { \"id\" : 7, \"code\" : \"groupManager\", \"title\" : \"角色权限管理\", \"parentId\" : 5, \"href\" : \"com.fx.client.gui.uicomponents.admin.group.GroupManagementController\", \"icon\" : \"gongnengjiaosequanxianguanli\", \"type\" : \"menu\", \"orderNum\" : 13, \"description\" : \"\", \"path\" : \"/adminSys/baseManager/groupManager\", \"sel\" : true, \"elementVOS\" : [ { \"id\" : 12, \"code\" : \"groupManager:btn_edit\", \"type\" : \"button\", \"name\" : \"编辑\", \"uri\" : \"/group\", \"menuId\" : \"7\", \"method\" : \"PUT\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 14, \"code\" : \"groupManager:btn_userManager\", \"type\" : \"button\", \"name\" : \"分配用户\", \"uri\" : \"/group/{*}/user\", \"menuId\" : \"7\", \"method\" : \"PUT\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 15, \"code\" : \"groupManager:btn_resourceManager\", \"type\" : \"button\", \"name\" : \"分配权限\", \"uri\" : \"/group/{*}/authority/menu\", \"menuId\" : \"7\", \"method\" : \"PUT\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 42, \"code\" : \"groupManager:btn_del\", \"type\" : \"button\", \"name\" : \"删除\", \"uri\" : \"/group\", \"menuId\" : \"7\", \"method\" : \"DELETE\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 41, \"code\" : \"groupManager:btn_add\", \"type\" : \"button\", \"name\" : \"新增\", \"uri\" : \"/group\", \"menuId\" : \"7\", \"method\" : \"POST\", \"description\" : \"\", \"sel\" : true } ]}, { \"id\" : 8, \"code\" : \"groupTypeManager\", \"title\" : \"角色类型管理\", \"parentId\" : 5, \"href\" : \"com.fx.client.gui.uicomponents.admin.grouptype.GroupTypeManagementController\", \"icon\" : \"jiaoseleixing\", \"type\" : \"menu\", \"orderNum\" : 14, \"description\" : \"\", \"path\" : \"/adminSys/baseManager/groupTypeManager\", \"sel\" : true, \"elementVOS\" : [ { \"id\" : 22, \"code\" : \"groupTypeManager:view\", \"type\" : \"uri\", \"name\" : \"查看\", \"uri\" : \"/admin/groupType/{*}\", \"menuId\" : \"8\", \"method\" : \"GET\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 23, \"code\" : \"groupTypeManager:btn_add\", \"type\" : \"button\", \"name\" : \"新增\", \"uri\" : \"/groupType\", \"menuId\" : \"8\", \"method\" : \"POST\", \"sel\" : true }, { \"id\" : 24, \"code\" : \"groupTypeManager:btn_edit\", \"type\" : \"button\", \"name\" : \"编辑\", \"uri\" : \"/groupType\", \"menuId\" : \"8\", \"method\" : \"PUT\", \"sel\" : true }, { \"id\" : 25, \"code\" : \"groupTypeManager:btn_del\", \"type\" : \"button\", \"name\" : \"删除\", \"uri\" : \"/groupType/{*}\", \"menuId\" : \"8\", \"method\" : \"DELETE\", \"sel\" : true } ]}, { \"id\" : 27, \"code\" : \"gateLogManager\", \"title\" : \"操作日志\", \"parentId\" : 5, \"href\" : \"com.fx.client.gui.uicomponents.admin.log.LogManagementController\", \"icon\" : \"caozuorizhi\", \"type\" : \"menu\", \"orderNum\" : 15, \"description\" : \"\", \"path\" : \"/adminSys/baseManager/gateLogManager\", \"sel\" : true, \"elementVOS\" : [ ]}, { \"id\" : 44, \"code\" : \"home\", \"title\" : \"主页\", \"parentId\" : 13, \"href\" : \"com.fx.client.gui.uicomponents.home.HomeController\", \"icon\" : \"home-outline\", \"orderNum\" : 0, \"description\" : \"\", \"path\" : \"com.epri.fx.client.gui.uicomponents.home.HomeController\", \"sel\" : true, \"elementVOS\" : [ ]}, { \"id\" : 45, \"code\" : \"baseInfo\", \"title\" : \"基础信息录入\", \"parentId\" : 13, \"href\" : \"\", \"icon\" : \"jichuxinxi\", \"orderNum\" : 1, \"description\" : \"基础信息录入\", \"sel\" : true, \"elementVOS\" : [ ]}, { \"id\" : 46, \"code\" : \"base\", \"title\" : \"基础参数\", \"parentId\" : 45, \"href\" : \"com.fx.client.gui.uicomponents.basicInfo.BasicDataSetController\", \"icon\" : \"jichucanshu\", \"orderNum\" : 0, \"description\" : \"\", \"sel\" : true, \"elementVOS\" : [ ]}, { \"id\" : 47, \"code\" : \"\", \"title\" : \"煤价差\", \"parentId\" : 45, \"href\" : \"com.fx.client.gui.uicomponents.basicInfo.CoalPriceDiffController\", \"icon\" : \"Energy-\", \"orderNum\" : 1, \"description\" : \"\", \"sel\" : true, \"elementVOS\" : [ ]}, { \"id\" : 48, \"code\" : \"\", \"title\" : \"铁路成本\", \"parentId\" : 45, \"href\" : \"com.fx.client.gui.uicomponents.basicInfo.RailwayCostController\", \"icon\" : \"tieluyunshu\", \"orderNum\" : 2, \"description\" : \"\", \"sel\" : true, \"elementVOS\" : [ ]}, { \"id\" : 49, \"code\" : \"\", \"title\" : \"现行运价\", \"parentId\" : 45, \"href\" : \"com.fx.client.gui.uicomponents.basicInfo.CurrentFreightController\", \"icon\" : \"hangzheng\", \"orderNum\" : 3, \"description\" : \"\", \"sel\" : true, \"elementVOS\" : [ ]}, { \"id\" : 50, \"code\" : \"Systemmonitoring\", \"title\" : \"系统监控\", \"parentId\" : 13, \"href\" : \"\", \"icon\" : \"jiankong\", \"orderNum\" : 2, \"description\" : \"\", \"sel\" : true, \"elementVOS\" : [ ]}, { \"id\" : 51, \"code\" : \"log\", \"title\" : \"日志管理\", \"parentId\" : 13, \"href\" : \"\", \"icon\" : \"rizhiguanli\", \"orderNum\" : 3, \"description\" : \"\", \"sel\" : true, \"elementVOS\" : [ ]}, { \"id\" : 52, \"code\" : \"online_user\", \"title\" : \"在线用户\", \"parentId\" : 50, \"href\" : \"com.fx.client.gui.uicomponents.monitor.onlineuser.OnlineUserController\", \"icon\" : \"ic_user_zx\", \"orderNum\" : 0, \"description\" : \"\", \"sel\" : true, \"elementVOS\" : [ ]}, { \"id\" : 53, \"code\" : \"job\", \"title\" : \"定时任务\", \"parentId\" : 50, \"href\" : \"com.fx.client.gui.uicomponents.monitor.quartz.SysJobController\", \"icon\" : \"time\", \"orderNum\" : 1, \"description\" : \"\", \"sel\" : true, \"elementVOS\" : [ ]}, { \"id\" : 54, \"code\" : \"login_log\", \"title\" : \"登录日志\", \"parentId\" : 51, \"href\" : \"com.fx.client.gui.uicomponents.admin.logManagement.LoginLogController\", \"icon\" : \"denglurizhi\", \"orderNum\" : 1, \"description\" : \"\", \"sel\" : true, \"elementVOS\" : [ ]}, { \"id\" : 55, \"code\" : \"opt_log\", \"title\" : \"操作日志\", \"parentId\" : 51, \"href\" : \"com.fx.client.gui.uicomponents.admin.logManagement.OperationLogController\", \"icon\" : \"caozuorizhi\", \"orderNum\" : 0, \"description\" : \"\", \"sel\" : true, \"elementVOS\" : [ ]} ]'); + +-- ---------------------------- +-- Table structure for qrtz_blob_triggers +-- ---------------------------- +DROP TABLE IF EXISTS `qrtz_blob_triggers`; +CREATE TABLE `qrtz_blob_triggers` ( + `SCHED_NAME` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `TRIGGER_NAME` varchar(190) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `BLOB_DATA` blob NULL, + PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE, + INDEX `SCHED_NAME`(`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE, + CONSTRAINT `qrtz_blob_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `qrtz_triggers` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of qrtz_blob_triggers +-- ---------------------------- + +-- ---------------------------- +-- Table structure for qrtz_calendars +-- ---------------------------- +DROP TABLE IF EXISTS `qrtz_calendars`; +CREATE TABLE `qrtz_calendars` ( + `SCHED_NAME` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `CALENDAR_NAME` varchar(190) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `CALENDAR` blob NOT NULL, + PRIMARY KEY (`SCHED_NAME`, `CALENDAR_NAME`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of qrtz_calendars +-- ---------------------------- + +-- ---------------------------- +-- Table structure for qrtz_cron_triggers +-- ---------------------------- +DROP TABLE IF EXISTS `qrtz_cron_triggers`; +CREATE TABLE `qrtz_cron_triggers` ( + `SCHED_NAME` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `TRIGGER_NAME` varchar(190) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `CRON_EXPRESSION` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `TIME_ZONE_ID` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE, + CONSTRAINT `qrtz_cron_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `qrtz_triggers` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of qrtz_cron_triggers +-- ---------------------------- + +-- ---------------------------- +-- Table structure for qrtz_fired_triggers +-- ---------------------------- +DROP TABLE IF EXISTS `qrtz_fired_triggers`; +CREATE TABLE `qrtz_fired_triggers` ( + `SCHED_NAME` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `ENTRY_ID` varchar(95) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `TRIGGER_NAME` varchar(190) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `INSTANCE_NAME` varchar(190) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `FIRED_TIME` bigint NOT NULL, + `SCHED_TIME` bigint NOT NULL, + `PRIORITY` int NOT NULL, + `STATE` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `JOB_NAME` varchar(190) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `JOB_GROUP` varchar(190) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `IS_NONCONCURRENT` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `REQUESTS_RECOVERY` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + PRIMARY KEY (`SCHED_NAME`, `ENTRY_ID`) USING BTREE, + INDEX `IDX_QRTZ_FT_TRIG_INST_NAME`(`SCHED_NAME`, `INSTANCE_NAME`) USING BTREE, + INDEX `IDX_QRTZ_FT_INST_JOB_REQ_RCVRY`(`SCHED_NAME`, `INSTANCE_NAME`, `REQUESTS_RECOVERY`) USING BTREE, + INDEX `IDX_QRTZ_FT_J_G`(`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) USING BTREE, + INDEX `IDX_QRTZ_FT_JG`(`SCHED_NAME`, `JOB_GROUP`) USING BTREE, + INDEX `IDX_QRTZ_FT_T_G`(`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE, + INDEX `IDX_QRTZ_FT_TG`(`SCHED_NAME`, `TRIGGER_GROUP`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of qrtz_fired_triggers +-- ---------------------------- + +-- ---------------------------- +-- Table structure for qrtz_job_details +-- ---------------------------- +DROP TABLE IF EXISTS `qrtz_job_details`; +CREATE TABLE `qrtz_job_details` ( + `SCHED_NAME` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `JOB_NAME` varchar(190) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `JOB_GROUP` varchar(190) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `DESCRIPTION` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `JOB_CLASS_NAME` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `IS_DURABLE` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `IS_NONCONCURRENT` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `IS_UPDATE_DATA` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `REQUESTS_RECOVERY` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `JOB_DATA` blob NULL, + PRIMARY KEY (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) USING BTREE, + INDEX `IDX_QRTZ_J_REQ_RECOVERY`(`SCHED_NAME`, `REQUESTS_RECOVERY`) USING BTREE, + INDEX `IDX_QRTZ_J_GRP`(`SCHED_NAME`, `JOB_GROUP`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of qrtz_job_details +-- ---------------------------- + +-- ---------------------------- +-- Table structure for qrtz_locks +-- ---------------------------- +DROP TABLE IF EXISTS `qrtz_locks`; +CREATE TABLE `qrtz_locks` ( + `SCHED_NAME` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `LOCK_NAME` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + PRIMARY KEY (`SCHED_NAME`, `LOCK_NAME`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of qrtz_locks +-- ---------------------------- +INSERT INTO `qrtz_locks` VALUES ('quartzScheduler', 'TRIGGER_ACCESS'); + +-- ---------------------------- +-- Table structure for qrtz_paused_trigger_grps +-- ---------------------------- +DROP TABLE IF EXISTS `qrtz_paused_trigger_grps`; +CREATE TABLE `qrtz_paused_trigger_grps` ( + `SCHED_NAME` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + PRIMARY KEY (`SCHED_NAME`, `TRIGGER_GROUP`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of qrtz_paused_trigger_grps +-- ---------------------------- + +-- ---------------------------- +-- Table structure for qrtz_scheduler_state +-- ---------------------------- +DROP TABLE IF EXISTS `qrtz_scheduler_state`; +CREATE TABLE `qrtz_scheduler_state` ( + `SCHED_NAME` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `INSTANCE_NAME` varchar(190) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `LAST_CHECKIN_TIME` bigint NOT NULL, + `CHECKIN_INTERVAL` bigint NOT NULL, + PRIMARY KEY (`SCHED_NAME`, `INSTANCE_NAME`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of qrtz_scheduler_state +-- ---------------------------- + +-- ---------------------------- +-- Table structure for qrtz_simple_triggers +-- ---------------------------- +DROP TABLE IF EXISTS `qrtz_simple_triggers`; +CREATE TABLE `qrtz_simple_triggers` ( + `SCHED_NAME` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `TRIGGER_NAME` varchar(190) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `REPEAT_COUNT` bigint NOT NULL, + `REPEAT_INTERVAL` bigint NOT NULL, + `TIMES_TRIGGERED` bigint NOT NULL, + PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE, + CONSTRAINT `qrtz_simple_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `qrtz_triggers` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of qrtz_simple_triggers +-- ---------------------------- + +-- ---------------------------- +-- Table structure for qrtz_simprop_triggers +-- ---------------------------- +DROP TABLE IF EXISTS `qrtz_simprop_triggers`; +CREATE TABLE `qrtz_simprop_triggers` ( + `SCHED_NAME` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `TRIGGER_NAME` varchar(190) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `STR_PROP_1` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `STR_PROP_2` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `STR_PROP_3` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `INT_PROP_1` int NULL DEFAULT NULL, + `INT_PROP_2` int NULL DEFAULT NULL, + `LONG_PROP_1` bigint NULL DEFAULT NULL, + `LONG_PROP_2` bigint NULL DEFAULT NULL, + `DEC_PROP_1` decimal(13, 4) NULL DEFAULT NULL, + `DEC_PROP_2` decimal(13, 4) NULL DEFAULT NULL, + `BOOL_PROP_1` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `BOOL_PROP_2` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE, + CONSTRAINT `qrtz_simprop_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `qrtz_triggers` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of qrtz_simprop_triggers +-- ---------------------------- + +-- ---------------------------- +-- Table structure for qrtz_triggers +-- ---------------------------- +DROP TABLE IF EXISTS `qrtz_triggers`; +CREATE TABLE `qrtz_triggers` ( + `SCHED_NAME` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `TRIGGER_NAME` varchar(190) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `JOB_NAME` varchar(190) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `JOB_GROUP` varchar(190) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `DESCRIPTION` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `NEXT_FIRE_TIME` bigint NULL DEFAULT NULL, + `PREV_FIRE_TIME` bigint NULL DEFAULT NULL, + `PRIORITY` int NULL DEFAULT NULL, + `TRIGGER_STATE` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `TRIGGER_TYPE` varchar(8) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `START_TIME` bigint NOT NULL, + `END_TIME` bigint NULL DEFAULT NULL, + `CALENDAR_NAME` varchar(190) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `MISFIRE_INSTR` smallint NULL DEFAULT NULL, + `JOB_DATA` blob NULL, + PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE, + INDEX `IDX_QRTZ_T_J`(`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) USING BTREE, + INDEX `IDX_QRTZ_T_JG`(`SCHED_NAME`, `JOB_GROUP`) USING BTREE, + INDEX `IDX_QRTZ_T_C`(`SCHED_NAME`, `CALENDAR_NAME`) USING BTREE, + INDEX `IDX_QRTZ_T_G`(`SCHED_NAME`, `TRIGGER_GROUP`) USING BTREE, + INDEX `IDX_QRTZ_T_STATE`(`SCHED_NAME`, `TRIGGER_STATE`) USING BTREE, + INDEX `IDX_QRTZ_T_N_STATE`(`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `TRIGGER_STATE`) USING BTREE, + INDEX `IDX_QRTZ_T_N_G_STATE`(`SCHED_NAME`, `TRIGGER_GROUP`, `TRIGGER_STATE`) USING BTREE, + INDEX `IDX_QRTZ_T_NEXT_FIRE_TIME`(`SCHED_NAME`, `NEXT_FIRE_TIME`) USING BTREE, + INDEX `IDX_QRTZ_T_NFT_ST`(`SCHED_NAME`, `TRIGGER_STATE`, `NEXT_FIRE_TIME`) USING BTREE, + INDEX `IDX_QRTZ_T_NFT_MISFIRE`(`SCHED_NAME`, `MISFIRE_INSTR`, `NEXT_FIRE_TIME`) USING BTREE, + INDEX `IDX_QRTZ_T_NFT_ST_MISFIRE`(`SCHED_NAME`, `MISFIRE_INSTR`, `NEXT_FIRE_TIME`, `TRIGGER_STATE`) USING BTREE, + INDEX `IDX_QRTZ_T_NFT_ST_MISFIRE_GRP`(`SCHED_NAME`, `MISFIRE_INSTR`, `NEXT_FIRE_TIME`, `TRIGGER_GROUP`, `TRIGGER_STATE`) USING BTREE, + CONSTRAINT `qrtz_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) REFERENCES `qrtz_job_details` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of qrtz_triggers +-- ---------------------------- + +-- ---------------------------- +-- Table structure for sys_job_log +-- ---------------------------- +DROP TABLE IF EXISTS `sys_job_log`; +CREATE TABLE `sys_job_log` ( + `job_log_id` bigint NOT NULL AUTO_INCREMENT COMMENT '任务日志ID', + `job_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '任务名称', + `job_group` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '任务组名', + `invoke_target` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '调用目标字符串', + `job_message` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '日志信息', + `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '执行状态(0正常 1失败)', + `exception_info` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '异常信息', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', + PRIMARY KEY (`job_log_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1905 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '定时任务调度日志表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of sys_job_log +-- ---------------------------- + +-- ---------------------------- +-- Table structure for sys_logininfor +-- ---------------------------- +DROP TABLE IF EXISTS `sys_logininfor`; +CREATE TABLE `sys_logininfor` ( + `info_id` bigint NOT NULL AUTO_INCREMENT COMMENT '访问ID', + `login_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '登录账号', + `ipaddr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '登录IP地址', + `login_location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '登录地点', + `browser` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '浏览器类型', + `os` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '操作系统', + `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '登录状态(0成功 1失败)', + `msg` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '提示消息', + `login_time` datetime NULL DEFAULT NULL COMMENT '访问时间', + PRIMARY KEY (`info_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 276 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '系统访问记录' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of sys_logininfor +-- ---------------------------- +INSERT INTO `sys_logininfor` VALUES (276, 'admin', '/127.0.0.1:63620', '', '', '', '0', '登录成功!', '2021-01-14 16:36:30'); + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/falsework-sever/sql/mysql/ipsm_dba.sql b/falsework-sever/sql/mysql/ipsm_dba.sql deleted file mode 100644 index 843022b..0000000 --- a/falsework-sever/sql/mysql/ipsm_dba.sql +++ /dev/null @@ -1,505 +0,0 @@ -/* -Navicat MySQL Data Transfer - -Source Server : localhost_3306 -Source Server Version : 80022 -Source Host : localhost:3306 -Source Database : ipsm_dba - -Target Server Type : MYSQL -Target Server Version : 80022 -File Encoding : 65001 - -Date: 2020-12-04 10:46:34 -*/ - -SET FOREIGN_KEY_CHECKS=0; - --- ---------------------------- --- Table structure for auth_client_service --- ---------------------------- -DROP TABLE IF EXISTS `auth_client_service`; -CREATE TABLE `auth_client_service` ( - `id` int NOT NULL AUTO_INCREMENT, - `service_id` varchar(255) DEFAULT NULL, - `client_id` varchar(255) DEFAULT NULL, - `description` varchar(255) DEFAULT NULL, - `crt_time` timestamp NULL DEFAULT NULL, - `crt_user` varchar(255) DEFAULT NULL, - `crt_name` varchar(255) DEFAULT NULL, - `crt_host` varchar(255) DEFAULT NULL, - `attr1` varchar(255) DEFAULT NULL, - `attr2` varchar(255) DEFAULT NULL, - `attr3` varchar(255) DEFAULT NULL, - `attr4` varchar(255) DEFAULT NULL, - `attr5` varchar(255) DEFAULT NULL, - `attr6` varchar(255) DEFAULT NULL, - `attr7` varchar(255) DEFAULT NULL, - `attr8` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `id_13178295930045` (`id`) -) ENGINE=MyISAM AUTO_INCREMENT=20 DEFAULT CHARSET=utf8; - --- ---------------------------- --- Records of auth_client_service --- ---------------------------- -INSERT INTO `auth_client_service` VALUES ('1', '3', '1', null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `auth_client_service` VALUES ('2', '2', '1', null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `auth_client_service` VALUES ('3', '2', '3', null, '2017-12-31 08:58:03', 'null', 'null', 'null', null, null, null, null, null, null, null, null); -INSERT INTO `auth_client_service` VALUES ('16', '1', '7', null, '2018-11-15 19:50:50', '9', 'admin', '127.0.0.1', null, null, null, null, null, null, null, null); -INSERT INTO `auth_client_service` VALUES ('17', '2', '7', null, '2018-11-15 19:50:50', '9', 'admin', '127.0.0.1', null, null, null, null, null, null, null, null); -INSERT INTO `auth_client_service` VALUES ('18', '3', '7', null, '2018-11-15 19:50:50', '9', 'admin', '127.0.0.1', null, null, null, null, null, null, null, null); -INSERT INTO `auth_client_service` VALUES ('19', '7', '7', null, '2018-11-15 19:50:50', '9', 'admin', '127.0.0.1', null, null, null, null, null, null, null, null); - --- ---------------------------- --- Table structure for base_element --- ---------------------------- -DROP TABLE IF EXISTS `base_element`; -CREATE TABLE `base_element` ( - `id` int NOT NULL AUTO_INCREMENT, - `code` varchar(255) DEFAULT NULL, - `type` varchar(255) DEFAULT NULL, - `name` varchar(255) DEFAULT NULL, - `uri` varchar(255) DEFAULT NULL, - `menu_id` varchar(255) DEFAULT NULL, - `parent_id` varchar(255) DEFAULT NULL, - `path` varchar(2000) DEFAULT NULL, - `method` varchar(10) DEFAULT NULL, - `description` varchar(255) DEFAULT NULL, - `crt_time` timestamp NULL DEFAULT NULL, - `crt_user` varchar(255) DEFAULT NULL, - `crt_name` varchar(255) DEFAULT NULL, - `crt_host` varchar(255) DEFAULT NULL, - `attr1` varchar(255) DEFAULT NULL, - `attr2` varchar(255) DEFAULT NULL, - `attr3` varchar(255) DEFAULT NULL, - `attr4` varchar(255) DEFAULT NULL, - `attr5` varchar(255) DEFAULT NULL, - `attr6` varchar(255) DEFAULT NULL, - `attr7` varchar(255) DEFAULT NULL, - `attr8` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `id_13178345917581` (`id`) -) ENGINE=MyISAM AUTO_INCREMENT=43 DEFAULT CHARSET=utf8; - --- ---------------------------- --- Records of base_element --- ---------------------------- -INSERT INTO `base_element` VALUES ('4', 'menuManager:element', 'uri', '按钮页面', '/admin/element', '6', null, null, 'GET', '', null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_element` VALUES ('5', 'menuManager:btn_add', 'button', '新增', '/menu/{*}', '6', null, null, 'POST', '', '2020-12-03 13:25:44', '1', 'admin', '127.0.0.1', null, null, null, null, null, null, null, null); -INSERT INTO `base_element` VALUES ('6', 'menuManager:btn_edit', 'button', '编辑', '/menu', '6', '', '', 'PUT', '', '2020-12-03 13:26:03', '1', 'admin', '127.0.0.1', '', '', '', '', '', '', '', ''); -INSERT INTO `base_element` VALUES ('7', 'menuManager:btn_del', 'button', '删除', '/menu/{*}', '6', '', '', 'DELETE', '', '2020-12-03 13:26:12', '1', 'admin', '127.0.0.1', '', '', '', '', '', '', '', ''); -INSERT INTO `base_element` VALUES ('8', 'menuManager:btn_element_add', 'button', '新增元素', '/element', '6', null, null, 'POST', '', '2020-12-03 13:26:26', '1', 'admin', '127.0.0.1', null, null, null, null, null, null, null, null); -INSERT INTO `base_element` VALUES ('9', 'menuManager:btn_element_edit', 'button', '编辑元素', '/element', '6', null, null, 'PUT', '', '2020-12-03 13:26:37', '1', 'admin', '127.0.0.1', null, null, null, null, null, null, null, null); -INSERT INTO `base_element` VALUES ('10', 'menuManager:btn_element_del', 'button', '删除元素', '/element/{*}', '6', null, null, 'DELETE', '', '2020-12-03 13:26:43', '1', 'admin', '127.0.0.1', null, null, null, null, null, null, null, null); -INSERT INTO `base_element` VALUES ('12', 'groupManager:btn_edit', 'button', '编辑', '/group', '7', null, null, 'PUT', '', '2020-12-03 13:46:59', '1', 'admin', '127.0.0.1', null, null, null, null, null, null, null, null); -INSERT INTO `base_element` VALUES ('14', 'groupManager:btn_userManager', 'button', '分配用户', '/group/{*}/user', '7', null, null, 'PUT', '', '2020-12-03 13:26:58', '1', 'admin', '127.0.0.1', null, null, null, null, null, null, null, null); -INSERT INTO `base_element` VALUES ('15', 'groupManager:btn_resourceManager', 'button', '分配权限', '/group/{*}/authority/menu', '7', null, null, 'PUT', '', '2020-12-03 13:48:31', '1', 'admin', '127.0.0.1', null, null, null, null, null, null, null, null); -INSERT INTO `base_element` VALUES ('19', 'menuManager:view', 'uri', '查看', '/admin/menu/{*}', '6', '', '', 'GET', '', '2017-06-26 00:00:00', '', '', '', '', '', '', '', '', '', '', ''); -INSERT INTO `base_element` VALUES ('20', 'menuManager:element_view', 'uri', '查看', '/admin/element/{*}', '6', null, null, 'GET', null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_element` VALUES ('22', 'groupTypeManager:view', 'uri', '查看', '/admin/groupType/{*}', '8', null, null, 'GET', '', null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_element` VALUES ('23', 'groupTypeManager:btn_add', 'button', '新增', '/groupType', '8', null, null, 'POST', null, '2020-12-03 13:17:51', '1', 'admin', '127.0.0.1', null, null, null, null, null, null, null, null); -INSERT INTO `base_element` VALUES ('24', 'groupTypeManager:btn_edit', 'button', '编辑', '/groupType', '8', null, null, 'PUT', null, '2020-12-03 13:22:14', '1', 'admin', '127.0.0.1', null, null, null, null, null, null, null, null); -INSERT INTO `base_element` VALUES ('25', 'groupTypeManager:btn_del', 'button', '删除', '/groupType/{*}', '8', null, null, 'DELETE', null, '2020-12-03 13:18:12', '1', 'admin', '127.0.0.1', null, null, null, null, null, null, null, null); -INSERT INTO `base_element` VALUES ('27', 'serviceManager:view', 'URI', '查看', '/auth/service/{*}', '10', null, null, 'GET', null, '2017-12-26 20:17:42', '1', 'Mr.AG', '127.0.0.1', null, null, null, null, null, null, null, null); -INSERT INTO `base_element` VALUES ('28', 'serviceManager:btn_add', 'button', '新增', '/auth/service', '10', null, null, 'POST', null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_element` VALUES ('29', 'serviceManager:btn_edit', 'button', '编辑', '/auth/service/{*}', '10', null, null, 'PUT', null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_element` VALUES ('30', 'serviceManager:btn_del', 'button', '删除', '/auth/service/{*}', '10', null, null, 'DELETE', null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_element` VALUES ('31', 'serviceManager:btn_clientManager', 'button', '服务授权', '/auth/service/{*}/client', '10', null, null, 'POST', null, '2017-12-30 16:32:48', '1', 'Mr.AG', '127.0.0.1', null, null, null, null, null, null, null, null); -INSERT INTO `base_element` VALUES ('34', 'home', 'uri', '查看', 'home/', '16', null, null, 'GET', null, '2018-11-08 17:50:05', '1', 'admin', '127.0.0.1', null, null, null, null, null, null, null, null); -INSERT INTO `base_element` VALUES ('37', 'userManager:btn_add', 'button', '添加', '/user', '1', null, null, 'POST', '', '2020-12-03 13:23:40', '1', 'admin', '127.0.0.1', null, null, null, null, null, null, null, null); -INSERT INTO `base_element` VALUES ('38', 'userManager:btn_del', 'button', '删除', '/user/{*}', '1', null, null, 'DELETE', '', '2020-12-03 13:24:35', '1', 'admin', '127.0.0.1', null, null, null, null, null, null, null, null); -INSERT INTO `base_element` VALUES ('39', 'userManager:btn_edit', 'button', '修改', '/user/{*}', '1', null, null, 'PUT', '', '2020-12-03 13:35:36', '1', 'admin', '127.0.0.1', null, null, null, null, null, null, null, null); -INSERT INTO `base_element` VALUES ('42', 'groupManager:btn_del', 'button', '删除', '/group', '7', null, null, 'DELETE', '', '2020-12-03 13:48:03', '1', 'admin', '127.0.0.1', null, null, null, null, null, null, null, null); -INSERT INTO `base_element` VALUES ('41', 'groupManager:btn_add', 'button', '新增', '/group', '7', null, null, 'POST', '', '2020-12-03 13:47:29', '1', 'admin', '127.0.0.1', null, null, null, null, null, null, null, null); -INSERT INTO `base_element` VALUES ('40', 'userManage:rest', 'button', '重置密码', '/user/password/{*}', '1', null, null, 'PUT', '', '2020-12-03 13:42:38', '1', 'admin', '127.0.0.1', null, null, null, null, null, null, null, null); - --- ---------------------------- --- Table structure for base_group --- ---------------------------- -DROP TABLE IF EXISTS `base_group`; -CREATE TABLE `base_group` ( - `id` int NOT NULL AUTO_INCREMENT, - `code` varchar(255) DEFAULT NULL, - `name` varchar(255) DEFAULT NULL, - `parent_id` int NOT NULL, - `path` varchar(2000) DEFAULT NULL, - `type` char(1) DEFAULT NULL, - `group_type` int NOT NULL, - `description` varchar(255) DEFAULT NULL, - `crt_time` timestamp NULL DEFAULT NULL, - `crt_user` varchar(255) DEFAULT NULL, - `crt_name` varchar(255) DEFAULT NULL, - `crt_host` varchar(255) DEFAULT NULL, - `upd_time` timestamp NULL DEFAULT NULL, - `upd_user` varchar(255) DEFAULT NULL, - `upd_name` varchar(255) DEFAULT NULL, - `upd_host` varchar(255) DEFAULT NULL, - `attr1` varchar(255) DEFAULT NULL, - `attr2` varchar(255) DEFAULT NULL, - `attr3` varchar(255) DEFAULT NULL, - `attr4` varchar(255) DEFAULT NULL, - `attr5` varchar(255) DEFAULT NULL, - `attr6` varchar(255) DEFAULT NULL, - `attr7` varchar(255) DEFAULT NULL, - `attr8` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `id_13178352287356` (`id`) -) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; - --- ---------------------------- --- Records of base_group --- ---------------------------- -INSERT INTO `base_group` VALUES ('7', 'financeDepart', '财务部', '6', '/company/financeDepart', null, '2', '', null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_group` VALUES ('8', 'hrDepart', '人力资源部', '6', '/company/hrDepart', null, '2', '', null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_group` VALUES ('9', 'admin', '管理员', '-1', null, null, '1', '管理员', '2020-09-16 16:52:18', '1', 'admin', '127.0.0.1', '2020-09-16 16:52:18', '1', 'admin', '127.0.0.1', null, null, null, null, null, null, null, null); -INSERT INTO `base_group` VALUES ('10', 'youke', '游客', '-1', null, null, '1', 'aaa', '2020-10-26 16:10:37', '1', 'admin', '127.0.0.1', '2020-10-26 16:10:37', '1', 'admin', '127.0.0.1', null, null, null, null, null, null, null, null); - --- ---------------------------- --- Table structure for base_group_leader --- ---------------------------- -DROP TABLE IF EXISTS `base_group_leader`; -CREATE TABLE `base_group_leader` ( - `id` int NOT NULL AUTO_INCREMENT, - `group_id` int DEFAULT NULL, - `user_id` int DEFAULT NULL, - `description` varchar(255) DEFAULT NULL, - `crt_time` timestamp NULL DEFAULT NULL, - `crt_user` varchar(255) DEFAULT NULL, - `crt_name` varchar(255) DEFAULT NULL, - `crt_host` varchar(255) DEFAULT NULL, - `upd_time` timestamp NULL DEFAULT NULL, - `upd_user` varchar(255) DEFAULT NULL, - `upd_name` varchar(255) DEFAULT NULL, - `upd_host` varchar(255) DEFAULT NULL, - `attr1` varchar(255) DEFAULT NULL, - `attr2` varchar(255) DEFAULT NULL, - `attr3` varchar(255) DEFAULT NULL, - `attr4` varchar(255) DEFAULT NULL, - `attr5` varchar(255) DEFAULT NULL, - `attr6` varchar(255) DEFAULT NULL, - `attr7` varchar(255) DEFAULT NULL, - `attr8` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `id_13178357041319` (`id`) -) ENGINE=MyISAM AUTO_INCREMENT=39 DEFAULT CHARSET=utf8; - --- ---------------------------- --- Records of base_group_leader --- ---------------------------- -INSERT INTO `base_group_leader` VALUES ('32', '4', '29', null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_group_leader` VALUES ('35', '3', '29', null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_group_leader` VALUES ('36', '1', '1', null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_group_leader` VALUES ('38', '9', '1', null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null); - --- ---------------------------- --- Table structure for base_group_member --- ---------------------------- -DROP TABLE IF EXISTS `base_group_member`; -CREATE TABLE `base_group_member` ( - `id` int NOT NULL AUTO_INCREMENT, - `group_id` int DEFAULT NULL, - `user_id` int DEFAULT NULL, - `description` varchar(255) DEFAULT NULL, - `crt_time` timestamp NULL DEFAULT NULL, - `crt_user` varchar(255) DEFAULT NULL, - `crt_name` varchar(255) DEFAULT NULL, - `crt_host` varchar(255) DEFAULT NULL, - `upd_time` timestamp NULL DEFAULT NULL, - `upd_user` varchar(255) DEFAULT NULL, - `upd_name` varchar(255) DEFAULT NULL, - `upd_host` varchar(255) DEFAULT NULL, - `attr1` varchar(255) DEFAULT NULL, - `attr2` varchar(255) DEFAULT NULL, - `attr3` varchar(255) DEFAULT NULL, - `attr4` varchar(255) DEFAULT NULL, - `attr5` varchar(255) DEFAULT NULL, - `attr6` varchar(255) DEFAULT NULL, - `attr7` varchar(255) DEFAULT NULL, - `attr8` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `id_13178361150862` (`id`) -) ENGINE=MyISAM AUTO_INCREMENT=63 DEFAULT CHARSET=utf8; - --- ---------------------------- --- Records of base_group_member --- ---------------------------- -INSERT INTO `base_group_member` VALUES ('54', '4', '29', null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_group_member` VALUES ('57', '3', '29', null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_group_member` VALUES ('58', '1', '1', null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_group_member` VALUES ('59', '1', '4', null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_group_member` VALUES ('60', '1', '29', null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_group_member` VALUES ('62', '9', '1', null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null); - --- ---------------------------- --- Table structure for base_group_type --- ---------------------------- -DROP TABLE IF EXISTS `base_group_type`; -CREATE TABLE `base_group_type` ( - `id` int NOT NULL AUTO_INCREMENT, - `code` varchar(255) DEFAULT NULL, - `name` varchar(255) DEFAULT NULL, - `description` varchar(255) DEFAULT NULL, - `crt_time` timestamp NULL DEFAULT NULL, - `crt_user` varchar(255) DEFAULT NULL, - `crt_name` varchar(255) DEFAULT NULL, - `crt_host` varchar(255) DEFAULT NULL, - `upd_time` timestamp NULL DEFAULT NULL, - `upd_user` varchar(255) DEFAULT NULL, - `upd_name` varchar(255) DEFAULT NULL, - `upd_host` varchar(255) DEFAULT NULL, - `attr1` varchar(255) DEFAULT NULL, - `attr2` varchar(255) DEFAULT NULL, - `attr3` varchar(255) DEFAULT NULL, - `attr4` varchar(255) DEFAULT NULL, - `attr5` varchar(255) DEFAULT NULL, - `attr6` varchar(255) DEFAULT NULL, - `attr7` varchar(255) DEFAULT NULL, - `attr8` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `id_13178366074910` (`id`) -) ENGINE=MyISAM AUTO_INCREMENT=14 DEFAULT CHARSET=utf8; - --- ---------------------------- --- Records of base_group_type --- ---------------------------- -INSERT INTO `base_group_type` VALUES ('1', 'role', '角色类型', 'role', null, null, null, null, '2017-08-25 17:52:37', '1', 'Mr.AG', '127.0.0.1', null, null, null, null, null, null, null, null); -INSERT INTO `base_group_type` VALUES ('2', 'depart', '部门类型', '部门类型', null, null, null, null, '2020-08-01 19:25:34', '1', 'Mr.AG', '127.0.0.1', null, null, null, null, null, null, null, null); -INSERT INTO `base_group_type` VALUES ('3', 'freeaa', '自定义类型', 'sadf', null, null, null, null, '2020-12-03 19:57:40', '1', 'admin', '127.0.0.1', null, null, null, null, null, null, null, null); - --- ---------------------------- --- Table structure for base_menu --- ---------------------------- -DROP TABLE IF EXISTS `base_menu`; -CREATE TABLE `base_menu` ( - `id` int NOT NULL AUTO_INCREMENT, - `code` varchar(255) DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `parent_id` int NOT NULL, - `href` varchar(255) DEFAULT NULL, - `icon` varchar(255) DEFAULT NULL, - `type` char(10) DEFAULT NULL, - `order_num` int NOT NULL DEFAULT '0', - `description` varchar(255) DEFAULT NULL, - `path` varchar(500) DEFAULT NULL, - `enabled` char(1) DEFAULT NULL, - `crt_time` timestamp NULL DEFAULT NULL, - `crt_user` varchar(255) DEFAULT NULL, - `crt_name` varchar(255) DEFAULT NULL, - `crt_host` varchar(255) DEFAULT NULL, - `upd_time` timestamp NULL DEFAULT NULL, - `upd_user` varchar(255) DEFAULT NULL, - `upd_name` varchar(255) DEFAULT NULL, - `upd_host` varchar(255) DEFAULT NULL, - `attr1` varchar(255) DEFAULT NULL, - `attr2` varchar(255) DEFAULT NULL, - `attr3` varchar(255) DEFAULT NULL, - `attr4` varchar(255) DEFAULT NULL, - `attr5` varchar(255) DEFAULT NULL, - `attr6` varchar(255) DEFAULT NULL, - `attr7` varchar(255) DEFAULT NULL, - `attr8` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `id_13178377753991` (`id`) -) ENGINE=MyISAM AUTO_INCREMENT=50 DEFAULT CHARSET=utf8; - --- ---------------------------- --- Records of base_menu --- ---------------------------- -INSERT INTO `base_menu` VALUES ('1', 'userManager', '用户管理', '5', 'com.epri.fx.client.gui.uicomponents.admin.user.UserManagementController', 'yonghuguanli_huaban', 'menu', '11', 'aaaa', '/adminSys/baseManager/userManager', null, '2020-12-03 13:43:21', '1', 'admin', '127.0.0.1', '2020-12-03 13:43:21', '1', 'admin', '127.0.0.1', 'admin/user/index', null, null, null, null, null, null, null); -INSERT INTO `base_menu` VALUES ('5', 'baseManager', '基础配置管理', '13', '/admin', 'jichupeizhi', 'dirt', '2', '', '/adminSys/baseManager', null, '2020-10-14 16:15:25', '1', 'admin', '127.0.0.1', '2020-10-14 16:15:25', '1', 'admin', '127.0.0.1', 'Layout', null, null, null, null, null, null, null); -INSERT INTO `base_menu` VALUES ('6', 'menuManager', '菜单管理', '5', 'com.epri.fx.client.gui.uicomponents.admin.menu.MenuManagementController', 'jiaoyixulie', 'menu', '12', '你大爷', '/adminSys/baseManager/menuManager', null, '2020-09-18 16:53:22', '1', 'admin', '127.0.0.1', '2020-09-18 16:53:22', '1', 'admin', '127.0.0.1', 'admin/menu/index', null, null, null, null, null, null, null); -INSERT INTO `base_menu` VALUES ('7', 'groupManager', '角色权限管理', '5', 'com.epri.fx.client.gui.uicomponents.admin.group.GroupManagementController', 'gongnengjiaosequanxianguanli', 'menu', '13', '', '/adminSys/baseManager/groupManager', null, '2020-08-20 15:45:42', '1', 'admin', '127.0.0.1', '2020-08-20 15:45:42', '1', 'admin', '127.0.0.1', 'admin/group/index', null, null, null, null, null, null, null); -INSERT INTO `base_menu` VALUES ('8', 'groupTypeManager', '角色类型管理', '5', 'com.epri.fx.client.gui.uicomponents.admin.grouptype.GroupTypeManagementController', 'jiaoseleixing', 'menu', '14', '', '/adminSys/baseManager/groupTypeManager', null, '2020-08-20 15:45:49', '1', 'admin', '127.0.0.1', '2020-08-20 15:45:49', '1', 'admin', '127.0.0.1', 'admin/groupType/index', null, null, null, null, null, null, null); -INSERT INTO `base_menu` VALUES ('13', 'adminSys', '系统菜单', '-1', '/base', 'align-justify', 'dirt', '0', '', '/adminSys', null, '2020-08-02 18:39:35', '1', 'admin', '127.0.0.1', '2020-08-02 18:39:35', '1', 'admin', '127.0.0.1', 'Layout', null, null, null, null, null, null, null); -INSERT INTO `base_menu` VALUES ('27', 'gateLogManager', '操作日志', '5', 'com.epri.fx.client.gui.uicomponents.admin.log.LogManagementController', 'caozuorizhi', 'menu', '15', '', '/adminSys/baseManager/gateLogManager', null, '2020-12-04 10:30:20', '1', 'admin', '127.0.0.1', '2020-12-04 10:30:20', '1', 'admin', '127.0.0.1', 'admin/gateLog/index', null, null, null, null, null, null, null); -INSERT INTO `base_menu` VALUES ('44', 'home', '主页', '13', 'com.epri.fx.client.gui.uicomponents.home.HomeController', 'home-outline', null, '0', '', 'com.epri.fx.client.gui.uicomponents.home.HomeController', null, '2020-08-03 15:51:48', '1', 'admin', '127.0.0.1', '2020-08-03 15:51:48', '1', 'admin', '127.0.0.1', null, null, null, null, null, null, null, null); -INSERT INTO `base_menu` VALUES ('45', 'baseInfo', '基础信息录入', '13', '', 'jichuxinxi', null, '1', '基础信息录入', null, null, '2020-10-14 17:20:25', '1', 'admin', '127.0.0.1', '2020-10-14 17:20:25', '1', 'admin', '127.0.0.1', null, null, null, null, null, null, null, null); -INSERT INTO `base_menu` VALUES ('46', 'base', '基础参数', '45', 'com.epri.fx.client.gui.uicomponents.basicInfo.BasicDataSetController', 'jichucanshu', null, '0', '', null, null, '2020-10-14 17:20:04', '1', 'admin', '127.0.0.1', '2020-10-14 17:20:04', '1', 'admin', '127.0.0.1', null, null, null, null, null, null, null, null); -INSERT INTO `base_menu` VALUES ('47', '', '煤价差', '45', 'com.epri.fx.client.gui.uicomponents.basicInfo.CoalPriceDiffController', 'Energy-', null, '1', '', null, null, '2020-10-14 17:19:47', '1', 'admin', '127.0.0.1', '2020-10-14 17:19:47', '1', 'admin', '127.0.0.1', null, null, null, null, null, null, null, null); -INSERT INTO `base_menu` VALUES ('48', '', '铁路成本', '45', 'com.epri.fx.client.gui.uicomponents.basicInfo.RailwayCostController', 'tieluyunshu', null, '2', '', null, null, '2020-10-14 17:20:41', '1', 'admin', '127.0.0.1', '2020-10-14 17:20:41', '1', 'admin', '127.0.0.1', null, null, null, null, null, null, null, null); -INSERT INTO `base_menu` VALUES ('49', '', '现行运价', '45', 'com.epri.fx.client.gui.uicomponents.basicInfo.CurrentFreightController', 'hangzheng', null, '3', '', null, null, '2020-10-14 17:21:09', '1', 'admin', '127.0.0.1', '2020-10-14 17:21:09', '1', 'admin', '127.0.0.1', null, null, null, null, null, null, null, null); - --- ---------------------------- --- Table structure for base_resource_authority --- ---------------------------- -DROP TABLE IF EXISTS `base_resource_authority`; -CREATE TABLE `base_resource_authority` ( - `id` int NOT NULL AUTO_INCREMENT, - `authority_id` varchar(255) DEFAULT NULL, - `authority_type` varchar(255) DEFAULT NULL, - `resource_id` varchar(255) DEFAULT NULL, - `resource_type` varchar(255) DEFAULT NULL, - `parent_id` varchar(255) DEFAULT NULL, - `path` varchar(2000) DEFAULT NULL, - `description` varchar(255) DEFAULT NULL, - `crt_time` timestamp NULL DEFAULT NULL, - `crt_user` varchar(255) DEFAULT NULL, - `crt_name` varchar(255) DEFAULT NULL, - `crt_host` varchar(255) DEFAULT NULL, - `attr1` varchar(255) DEFAULT NULL, - `attr2` varchar(255) DEFAULT NULL, - `attr3` varchar(255) DEFAULT NULL, - `attr4` varchar(255) DEFAULT NULL, - `attr5` varchar(255) DEFAULT NULL, - `attr6` varchar(255) DEFAULT NULL, - `attr7` varchar(255) DEFAULT NULL, - `attr8` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `id_13178383042404` (`id`) -) ENGINE=MyISAM AUTO_INCREMENT=2516 DEFAULT CHARSET=utf8; - --- ---------------------------- --- Records of base_resource_authority --- ---------------------------- -INSERT INTO `base_resource_authority` VALUES ('2165', '1', 'group', '1', 'menu', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2166', '1', 'group', '5', 'menu', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2167', '1', 'group', '4', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2168', '1', 'group', '5', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2169', '1', 'group', '6', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2170', '1', 'group', '7', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2171', '1', 'group', '8', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2172', '1', 'group', '9', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2173', '1', 'group', '10', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2174', '1', 'group', '19', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2175', '1', 'group', '20', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2176', '1', 'group', '6', 'menu', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2177', '1', 'group', '11', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2178', '1', 'group', '12', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2179', '1', 'group', '13', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2180', '1', 'group', '14', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2181', '1', 'group', '15', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2182', '1', 'group', '16', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2183', '1', 'group', '17', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2184', '1', 'group', '21', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2185', '1', 'group', '26', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2186', '1', 'group', '7', 'menu', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2187', '1', 'group', '22', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2188', '1', 'group', '23', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2189', '1', 'group', '24', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2190', '1', 'group', '25', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2191', '1', 'group', '8', 'menu', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2192', '1', 'group', '27', 'menu', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2193', '1', 'group', '44', 'menu', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2515', '9', 'group', '49', 'menu', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2514', '9', 'group', '48', 'menu', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2513', '9', 'group', '47', 'menu', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2512', '9', 'group', '46', 'menu', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2511', '9', 'group', '45', 'menu', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2510', '9', 'group', '44', 'menu', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2509', '9', 'group', '27', 'menu', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2508', '9', 'group', '8', 'menu', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2507', '9', 'group', '25', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2506', '9', 'group', '24', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2505', '9', 'group', '23', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2504', '9', 'group', '22', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2503', '9', 'group', '7', 'menu', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2502', '9', 'group', '41', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2501', '9', 'group', '42', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2500', '9', 'group', '15', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2499', '9', 'group', '14', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2497', '9', 'group', '6', 'menu', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2498', '9', 'group', '12', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2496', '9', 'group', '20', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2495', '9', 'group', '19', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2494', '9', 'group', '10', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2493', '9', 'group', '9', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2492', '9', 'group', '8', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2491', '9', 'group', '7', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2490', '9', 'group', '6', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2489', '9', 'group', '5', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2488', '9', 'group', '4', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2487', '9', 'group', '5', 'menu', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2486', '9', 'group', '1', 'menu', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2485', '9', 'group', '40', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2484', '9', 'group', '39', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2482', '9', 'group', '37', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); -INSERT INTO `base_resource_authority` VALUES ('2483', '9', 'group', '38', 'button', '-1', null, null, null, null, null, null, null, null, null, null, null, null, null, null); - --- ---------------------------- --- Table structure for base_rsa_key --- ---------------------------- -DROP TABLE IF EXISTS `base_rsa_key`; -CREATE TABLE `base_rsa_key` ( - `rsa_key` varchar(200) NOT NULL, - `key_value` varchar(2000) NOT NULL, - PRIMARY KEY (`rsa_key`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - --- ---------------------------- --- Records of base_rsa_key --- ---------------------------- -INSERT INTO `base_rsa_key` VALUES ('IPSM:AUTH:JWT:PRI', 'MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAIaPvusxk+x8KcVONjFUo+ursfLx\nSwOIvci5q0xPa+nUm3C0uu3jX1RQP+s3hWqCb7KgR67HDcZUS8bn2pNzJJWJ352lrpVrb1wftOot\nmrWPhnrdr9sdcgE2pLV8HAy18pq+agXmjWnkf+T558zo5k3I8VBVcTfzsL6HLc5mFt/dAgMBAAEC\ngYAYkZpsWwsFPM5rphIjA69CUoEVOJVXudndEnmCX2X2tckD1RvkX4WCYXyqN+L2RYabeMRd1x5e\nvflwAdlY3sco+otA0Ld9vP9yadlbfjuxzA8XyuvomaZPeJjMxL3dZnEvy29SMkNx3358ILp3BwGg\ne16GYPNZAjbB9fF+9YcggQJBAMs67m65cu2/h9Fe8+kevU32VVF6WZ3+506tYJFmsEbNILp+HFMK\nyp/OXX5DIMJIVA5f9ZYzG9GIgyaNMaKaFlECQQCpgEkflrwhwMkyOqJ0bJDB6GDk6iql2onR4bzF\n2sExbwYh5FjKdSQay+UIvrxLDvJOHyiySKL3rHxQggrgtbHNAkBVfQSvLvNZbygCup5/gZ7AHM7m\n50CrZX6HagclIr0kC0WpLUNc6z0w2+4YHsS49RPmuBbmh7k7+uCwZtRqQccBAkAeFunkM6v+Ce0t\nf38rT8J6ybe5q2AaxSrGGV6bePPmxKDAD3s7pYPdRejInqNqZ6LX/2wICiDz+qiu2gb4UQjZAkAx\nRtRw7QzNu/5aLnU5pxdD33lE+fubQSkq17y3JfeLO2/HsIl0BnKUQGg4TaKpYOaEoHZpgyd2pwlm\nUuNuRalU\n'); -INSERT INTO `base_rsa_key` VALUES ('IPSM:AUTH:JWT:PUB', 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCGj77rMZPsfCnFTjYxVKPrq7Hy8UsDiL3IuatM\nT2vp1JtwtLrt419UUD/rN4Vqgm+yoEeuxw3GVEvG59qTcySVid+dpa6Va29cH7TqLZq1j4Z63a/b\nHXIBNqS1fBwMtfKavmoF5o1p5H/k+efM6OZNyPFQVXE387C+hy3OZhbf3QIDAQAB\n'); - --- ---------------------------- --- Table structure for base_user --- ---------------------------- -DROP TABLE IF EXISTS `base_user`; -CREATE TABLE `base_user` ( - `id` int NOT NULL AUTO_INCREMENT, - `username` varchar(255) DEFAULT NULL, - `password` varchar(255) DEFAULT NULL, - `name` varchar(255) DEFAULT NULL, - `birthday` varchar(255) DEFAULT NULL, - `address` varchar(255) DEFAULT NULL, - `mobile_phone` varchar(255) DEFAULT NULL, - `tel_phone` varchar(255) DEFAULT NULL, - `email` varchar(255) DEFAULT NULL, - `sex` char(1) DEFAULT NULL, - `type` char(1) DEFAULT NULL, - `status` char(1) DEFAULT NULL, - `description` varchar(255) DEFAULT NULL, - `crt_time` datetime DEFAULT NULL, - `crt_user` varchar(255) DEFAULT NULL, - `crt_name` varchar(255) DEFAULT NULL, - `crt_host` varchar(255) DEFAULT NULL, - `upd_time` datetime DEFAULT NULL, - `upd_user` varchar(255) DEFAULT NULL, - `upd_name` varchar(255) DEFAULT NULL, - `upd_host` varchar(255) DEFAULT NULL, - `attr1` varchar(255) DEFAULT NULL, - `attr2` varchar(255) DEFAULT NULL, - `attr3` varchar(255) DEFAULT NULL, - `attr4` varchar(255) DEFAULT NULL, - `attr5` varchar(255) DEFAULT NULL, - `attr6` varchar(255) DEFAULT NULL, - `attr7` varchar(255) DEFAULT NULL, - `attr8` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8; - --- ---------------------------- --- Records of base_user --- ---------------------------- -INSERT INTO `base_user` VALUES ('1', 'admin', '$2a$12$/Xa6YcdVm387zA.EE/6xce11UX.AZBiwerBztXLAVBMhVKQ/pZfNW', 'liwen', '', null, '', null, '', '男', null, null, '', '2020-12-03 17:19:07', '1', 'admin', '127.0.0.1', '2020-12-03 17:19:07', '1', 'admin', '127.0.0.1', null, null, null, null, null, null, null, null); -INSERT INTO `base_user` VALUES ('4', 'blog', '$2a$12$qWkIM1ZwBhzfs6eHgu6yFOeZB0Rtklt/MlzTg/YkagS19k8EmeV2C', 'Mr.Liwen(博主)', '', null, '', null, '', '女', null, null, '12', '2020-12-03 19:56:04', '1', 'admin', '127.0.0.1', '2020-12-03 19:56:36', '1', 'admin', '127.0.0.1', null, null, null, null, null, null, null, null); -INSERT INTO `base_user` VALUES ('30', 'liwen', '$2a$12$TsY.B4VLwtuIfGSTIpWjHu3tiuwjmVoFoqYTbJv7f/193kdCCRIXO', 'liwen', null, null, null, null, null, '男', null, null, 'admin', '2020-11-25 02:37:33', '1', 'admin', '127.0.0.1', '2020-12-03 13:42:11', '1', 'admin', '127.0.0.1', null, null, null, null, null, null, null, null); - --- ---------------------------- --- Table structure for gate_log --- ---------------------------- -DROP TABLE IF EXISTS `gate_log`; -CREATE TABLE `gate_log` ( - `id` int NOT NULL AUTO_INCREMENT, - `menu` varchar(255) DEFAULT NULL, - `opt` varchar(255) DEFAULT NULL, - `uri` varchar(255) DEFAULT NULL, - `crt_time` timestamp NULL DEFAULT NULL, - `crt_user` varchar(255) DEFAULT NULL, - `crt_name` varchar(255) DEFAULT NULL, - `crt_host` varchar(255) DEFAULT NULL, - `body` text, - PRIMARY KEY (`id`), - UNIQUE KEY `id_13178398875749` (`id`) -) ENGINE=MyISAM AUTO_INCREMENT=107 DEFAULT CHARSET=utf8; - --- ---------------------------- --- Records of gate_log --- ---------------------------- -INSERT INTO `gate_log` VALUES ('102', '用户管理', '修改', '/user/{*}', '2020-12-03 19:56:04', '1', 'liwen', '127.0.0.1', '{ \"id\" : 4, \"username\" : \"blog\", \"name\" : \"Mr.Liwen(博主)\", \"sex\" : \"女\", \"description\" : \"12\"}'); -INSERT INTO `gate_log` VALUES ('103', '用户管理', '重置密码', '/user/password/{*}', '2020-12-03 19:56:36', '1', 'liwen', '127.0.0.1', ''); -INSERT INTO `gate_log` VALUES ('104', '角色权限管理', '分配权限', '/group/{*}/authority/menu', '2020-12-03 19:57:06', '1', 'liwen', '127.0.0.1', '[ { \"id\" : 1, \"code\" : \"userManager\", \"title\" : \"用户管理\", \"parentId\" : 5, \"href\" : \"com.epri.fx.client.gui.uicomponents.admin.user.UserManagementController\", \"icon\" : \"yonghuguanli_huaban\", \"type\" : \"menu\", \"orderNum\" : 11, \"description\" : \"aaaa\", \"path\" : \"/adminSys/baseManager/userManager\", \"sel\" : true, \"elementVOS\" : [ { \"id\" : 37, \"code\" : \"userManager:btn_add\", \"type\" : \"button\", \"name\" : \"添加\", \"uri\" : \"/user\", \"menuId\" : \"1\", \"method\" : \"POST\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 38, \"code\" : \"userManager:btn_del\", \"type\" : \"button\", \"name\" : \"删除\", \"uri\" : \"/user/{*}\", \"menuId\" : \"1\", \"method\" : \"DELETE\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 39, \"code\" : \"userManager:btn_edit\", \"type\" : \"button\", \"name\" : \"修改\", \"uri\" : \"/user/{*}\", \"menuId\" : \"1\", \"method\" : \"PUT\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 40, \"code\" : \"userManage:rest\", \"type\" : \"button\", \"name\" : \"重置密码\", \"uri\" : \"/user/password/{*}\", \"menuId\" : \"1\", \"method\" : \"PUT\", \"description\" : \"\", \"sel\" : true } ]}, { \"id\" : 5, \"code\" : \"baseManager\", \"title\" : \"基础配置管理\", \"parentId\" : 13, \"href\" : \"/admin\", \"icon\" : \"jichupeizhi\", \"type\" : \"dirt\", \"orderNum\" : 2, \"description\" : \"\", \"path\" : \"/adminSys/baseManager\", \"sel\" : true, \"elementVOS\" : [ ]}, { \"id\" : 6, \"code\" : \"menuManager\", \"title\" : \"菜单管理\", \"parentId\" : 5, \"href\" : \"com.epri.fx.client.gui.uicomponents.admin.menu.MenuManagementController\", \"icon\" : \"jiaoyixulie\", \"type\" : \"menu\", \"orderNum\" : 12, \"description\" : \"你大爷\", \"path\" : \"/adminSys/baseManager/menuManager\", \"sel\" : true, \"elementVOS\" : [ { \"id\" : 4, \"code\" : \"menuManager:element\", \"type\" : \"uri\", \"name\" : \"按钮页面\", \"uri\" : \"/admin/element\", \"menuId\" : \"6\", \"method\" : \"GET\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 5, \"code\" : \"menuManager:btn_add\", \"type\" : \"button\", \"name\" : \"新增\", \"uri\" : \"/menu/{*}\", \"menuId\" : \"6\", \"method\" : \"POST\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 6, \"code\" : \"menuManager:btn_edit\", \"type\" : \"button\", \"name\" : \"编辑\", \"uri\" : \"/menu\", \"menuId\" : \"6\", \"parentId\" : \"\", \"path\" : \"\", \"method\" : \"PUT\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 7, \"code\" : \"menuManager:btn_del\", \"type\" : \"button\", \"name\" : \"删除\", \"uri\" : \"/menu/{*}\", \"menuId\" : \"6\", \"parentId\" : \"\", \"path\" : \"\", \"method\" : \"DELETE\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 8, \"code\" : \"menuManager:btn_element_add\", \"type\" : \"button\", \"name\" : \"新增元素\", \"uri\" : \"/element\", \"menuId\" : \"6\", \"method\" : \"POST\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 9, \"code\" : \"menuManager:btn_element_edit\", \"type\" : \"button\", \"name\" : \"编辑元素\", \"uri\" : \"/element\", \"menuId\" : \"6\", \"method\" : \"PUT\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 10, \"code\" : \"menuManager:btn_element_del\", \"type\" : \"button\", \"name\" : \"删除元素\", \"uri\" : \"/element/{*}\", \"menuId\" : \"6\", \"method\" : \"DELETE\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 19, \"code\" : \"menuManager:view\", \"type\" : \"uri\", \"name\" : \"查看\", \"uri\" : \"/admin/menu/{*}\", \"menuId\" : \"6\", \"parentId\" : \"\", \"path\" : \"\", \"method\" : \"GET\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 20, \"code\" : \"menuManager:element_view\", \"type\" : \"uri\", \"name\" : \"查看\", \"uri\" : \"/admin/element/{*}\", \"menuId\" : \"6\", \"method\" : \"GET\", \"sel\" : true } ]}, { \"id\" : 7, \"code\" : \"groupManager\", \"title\" : \"角色权限管理\", \"parentId\" : 5, \"href\" : \"com.epri.fx.client.gui.uicomponents.admin.group.GroupManagementController\", \"icon\" : \"gongnengjiaosequanxianguanli\", \"type\" : \"menu\", \"orderNum\" : 13, \"description\" : \"\", \"path\" : \"/adminSys/baseManager/groupManager\", \"sel\" : true, \"elementVOS\" : [ { \"id\" : 12, \"code\" : \"groupManager:btn_edit\", \"type\" : \"button\", \"name\" : \"编辑\", \"uri\" : \"/group\", \"menuId\" : \"7\", \"method\" : \"PUT\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 14, \"code\" : \"groupManager:btn_userManager\", \"type\" : \"button\", \"name\" : \"分配用户\", \"uri\" : \"/group/{*}/user\", \"menuId\" : \"7\", \"method\" : \"PUT\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 15, \"code\" : \"groupManager:btn_resourceManager\", \"type\" : \"button\", \"name\" : \"分配权限\", \"uri\" : \"/group/{*}/authority/menu\", \"menuId\" : \"7\", \"method\" : \"PUT\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 42, \"code\" : \"groupManager:btn_del\", \"type\" : \"button\", \"name\" : \"删除\", \"uri\" : \"/group\", \"menuId\" : \"7\", \"method\" : \"DELETE\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 41, \"code\" : \"groupManager:btn_add\", \"type\" : \"button\", \"name\" : \"新增\", \"uri\" : \"/group\", \"menuId\" : \"7\", \"method\" : \"POST\", \"description\" : \"\", \"sel\" : true } ]}, { \"id\" : 8, \"code\" : \"groupTypeManager\", \"title\" : \"角色类型管理\", \"parentId\" : 5, \"href\" : \"com.epri.fx.client.gui.uicomponents.admin.grouptype.GroupTypeManagementController\", \"icon\" : \"jiaoseleixing\", \"type\" : \"menu\", \"orderNum\" : 14, \"description\" : \"\", \"path\" : \"/adminSys/baseManager/groupTypeManager\", \"sel\" : true, \"elementVOS\" : [ { \"id\" : 22, \"code\" : \"groupTypeManager:view\", \"type\" : \"uri\", \"name\" : \"查看\", \"uri\" : \"/admin/groupType/{*}\", \"menuId\" : \"8\", \"method\" : \"GET\", \"description\" : \"\", \"sel\" : true }, { \"id\" : 23, \"code\" : \"groupTypeManager:btn_add\", \"type\" : \"button\", \"name\" : \"新增\", \"uri\" : \"/groupType\", \"menuId\" : \"8\", \"method\" : \"POST\", \"sel\" : true }, { \"id\" : 24, \"code\" : \"groupTypeManager:btn_edit\", \"type\" : \"button\", \"name\" : \"编辑\", \"uri\" : \"/groupType\", \"menuId\" : \"8\", \"method\" : \"PUT\", \"sel\" : true }, { \"id\" : 25, \"code\" : \"groupTypeManager:btn_del\", \"type\" : \"button\", \"name\" : \"删除\", \"uri\" : \"/groupType/{*}\", \"menuId\" : \"8\", \"method\" : \"DELETE\", \"sel\" : true } ]}, { \"id\" : 27, \"code\" : \"gateLogManager\", \"title\" : \"操作日志\", \"parentId\" : 5, \"href\" : \"/admin/gateLog\", \"icon\" : \"caozuorizhi\", \"type\" : \"menu\", \"orderNum\" : 15, \"description\" : \"\", \"path\" : \"/adminSys/baseManager/gateLogManager\", \"sel\" : true, \"elementVOS\" : [ ]}, { \"id\" : 44, \"code\" : \"home\", \"title\" : \"主页\", \"parentId\" : 13, \"href\" : \"com.epri.fx.client.gui.uicomponents.home.HomeController\", \"icon\" : \"home-outline\", \"orderNum\" : 0, \"description\" : \"\", \"path\" : \"com.epri.fx.client.gui.uicomponents.home.HomeController\", \"sel\" : true, \"elementVOS\" : [ ]}, { \"id\" : 45, \"code\" : \"baseInfo\", \"title\" : \"基础信息录入\", \"parentId\" : 13, \"href\" : \"\", \"icon\" : \"jichuxinxi\", \"orderNum\" : 1, \"description\" : \"基础信息录入\", \"sel\" : true, \"elementVOS\" : [ ]}, { \"id\" : 46, \"code\" : \"base\", \"title\" : \"基础参数\", \"parentId\" : 45, \"href\" : \"com.epri.fx.client.gui.uicomponents.basicInfo.BasicDataSetController\", \"icon\" : \"jichucanshu\", \"orderNum\" : 0, \"description\" : \"\", \"sel\" : true, \"elementVOS\" : [ ]}, { \"id\" : 47, \"code\" : \"\", \"title\" : \"煤价差\", \"parentId\" : 45, \"href\" : \"com.epri.fx.client.gui.uicomponents.basicInfo.CoalPriceDiffController\", \"icon\" : \"Energy-\", \"orderNum\" : 1, \"description\" : \"\", \"sel\" : true, \"elementVOS\" : [ ]}, { \"id\" : 48, \"code\" : \"\", \"title\" : \"铁路成本\", \"parentId\" : 45, \"href\" : \"com.epri.fx.client.gui.uicomponents.basicInfo.RailwayCostController\", \"icon\" : \"tieluyunshu\", \"orderNum\" : 2, \"description\" : \"\", \"sel\" : true, \"elementVOS\" : [ ]}, { \"id\" : 49, \"code\" : \"\", \"title\" : \"现行运价\", \"parentId\" : 45, \"href\" : \"com.epri.fx.client.gui.uicomponents.basicInfo.CurrentFreightController\", \"icon\" : \"hangzheng\", \"orderNum\" : 3, \"description\" : \"\", \"sel\" : true, \"elementVOS\" : [ ]} ]'); -INSERT INTO `gate_log` VALUES ('101', '用户管理', '修改', '/user/{*}', '2020-12-03 17:19:07', '1', 'liwen', '127.0.0.1', '{ \"id\" : 1, \"username\" : \"admin\", \"name\" : \"liwen\", \"sex\" : \"男\", \"description\" : \"\"}'); -INSERT INTO `gate_log` VALUES ('105', '角色类型管理', '编辑', '/groupType', '2020-12-03 19:57:40', '1', 'liwen', '127.0.0.1', '{ \"id\" : 3, \"code\" : \"freeaa\", \"name\" : \"自定义类型\", \"description\" : \"sadf\"}'); -INSERT INTO `gate_log` VALUES ('106', '菜单管理', '编辑', '/menu', '2020-12-04 10:30:20', '1', 'liwen', '127.0.0.1', '{ \"id\" : 27, \"code\" : \"gateLogManager\", \"title\" : \"操作日志\", \"parentId\" : 5, \"href\" : \"com.epri.fx.client.gui.uicomponents.admin.log.LogManagementController\", \"icon\" : \"caozuorizhi\", \"type\" : \"menu\", \"orderNum\" : 15, \"description\" : \"\", \"path\" : \"/adminSys/baseManager/gateLogManager\", \"sel\" : false, \"elementVOS\" : [ ]}'); diff --git a/falsework-sever/src/main/java/com/epri/fx/server/config/WebSecurityConfig.java b/falsework-sever/src/main/java/com/epri/fx/server/config/WebSecurityConfig.java deleted file mode 100644 index 2a9f6ad..0000000 --- a/falsework-sever/src/main/java/com/epri/fx/server/config/WebSecurityConfig.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.epri.fx.server.config; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; -import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; -import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; -import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; -import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; -import org.springframework.security.crypto.password.PasswordEncoder; - -//@Configuration -//@EnableWebSecurity//开启Spring安全 -//@EnableGlobalMethodSecurity(prePostEnabled=true)//开启Spring方法级安全 -public class WebSecurityConfig extends WebSecurityConfigurerAdapter { - - - @Override - protected void configure(AuthenticationManagerBuilder auth) throws Exception { - - - /* - * 配置为从内存中进行加载认证信息. - * 这里配置了两个用户 admin和user - */ - auth.inMemoryAuthentication() - .withUser("admin") - .password(passwordEncoder().encode("123456")) - .roles("admin"); - - auth.inMemoryAuthentication() - .withUser("user") - .password(passwordEncoder().encode("123456")) - .roles("normal"); - } - - @Bean - public PasswordEncoder passwordEncoder() { - return new BCryptPasswordEncoder(); - } -} \ No newline at end of file diff --git a/falsework-sever/src/main/java/com/epri/fx/server/util/DateUtils.java b/falsework-sever/src/main/java/com/epri/fx/server/util/DateUtils.java deleted file mode 100644 index 5fa11c7..0000000 --- a/falsework-sever/src/main/java/com/epri/fx/server/util/DateUtils.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.epri.fx.server.util; - -import java.text.SimpleDateFormat; -import java.util.Date; - -public class DateUtils { - /** 时间格式(yyyy-MM-dd) */ - public final static String DATE_PATTERN = "yyyy-MM-dd"; - /** 时间格式(yyyy-MM-dd HH:mm:ss) */ - public final static String DATE_TIME_PATTERN = "yyyy-MM-dd HH:mm:ss"; - - public static String format(Date date) { - return format(date, DATE_PATTERN); - } - - public static String format(Date date, String pattern) { - if(date != null){ - SimpleDateFormat df = new SimpleDateFormat(pattern); - return df.format(date); - } - return null; - } -} diff --git a/falsework-sever/src/main/java/com/epri/fx/server/ServerApplication.java b/falsework-sever/src/main/java/com/fx/server/ServerApplication.java similarity index 85% rename from falsework-sever/src/main/java/com/epri/fx/server/ServerApplication.java rename to falsework-sever/src/main/java/com/fx/server/ServerApplication.java index 28df9f0..f3a9fbf 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/ServerApplication.java +++ b/falsework-sever/src/main/java/com/fx/server/ServerApplication.java @@ -1,6 +1,6 @@ -package com.epri.fx.server; +package com.fx.server; -import com.epri.fx.server.util.DBLog; +import com.fx.server.util.DBLog; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -8,7 +8,7 @@ import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfi import org.springframework.transaction.annotation.EnableTransactionManagement; @EnableTransactionManagement -@MapperScan("com.epri.fx.server.mapper") +@MapperScan("com.fx.server.mapper") @SpringBootApplication(exclude=SecurityAutoConfiguration.class) public class ServerApplication { diff --git a/falsework-sever/src/main/java/com/epri/fx/server/config/FilterConfig.java b/falsework-sever/src/main/java/com/fx/server/config/FilterConfig.java similarity index 91% rename from falsework-sever/src/main/java/com/epri/fx/server/config/FilterConfig.java rename to falsework-sever/src/main/java/com/fx/server/config/FilterConfig.java index 16b4fc3..3b5e806 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/config/FilterConfig.java +++ b/falsework-sever/src/main/java/com/fx/server/config/FilterConfig.java @@ -1,6 +1,6 @@ -package com.epri.fx.server.config; +package com.fx.server.config; -import com.epri.fx.server.filter.ReplaceStreamFilter; +import com.fx.server.filter.ReplaceStreamFilter; import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/config/KeyConfiguration.java b/falsework-sever/src/main/java/com/fx/server/config/KeyConfiguration.java similarity index 91% rename from falsework-sever/src/main/java/com/epri/fx/server/config/KeyConfiguration.java rename to falsework-sever/src/main/java/com/fx/server/config/KeyConfiguration.java index cf86390..f40ab33 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/config/KeyConfiguration.java +++ b/falsework-sever/src/main/java/com/fx/server/config/KeyConfiguration.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.config; +package com.fx.server.config; import lombok.Data; import org.springframework.beans.factory.annotation.Value; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/config/UserAuthConfig.java b/falsework-sever/src/main/java/com/fx/server/config/UserAuthConfig.java similarity index 96% rename from falsework-sever/src/main/java/com/epri/fx/server/config/UserAuthConfig.java rename to falsework-sever/src/main/java/com/fx/server/config/UserAuthConfig.java index 9f59b45..e30765a 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/config/UserAuthConfig.java +++ b/falsework-sever/src/main/java/com/fx/server/config/UserAuthConfig.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.config; +package com.fx.server.config; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Configuration; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/config/UserConfiguration.java b/falsework-sever/src/main/java/com/fx/server/config/UserConfiguration.java similarity index 89% rename from falsework-sever/src/main/java/com/epri/fx/server/config/UserConfiguration.java rename to falsework-sever/src/main/java/com/fx/server/config/UserConfiguration.java index 9741efd..dc7728d 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/config/UserConfiguration.java +++ b/falsework-sever/src/main/java/com/fx/server/config/UserConfiguration.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.config; +package com.fx.server.config; import lombok.Data; import org.springframework.beans.factory.annotation.Value; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/config/WebConfiguration.java b/falsework-sever/src/main/java/com/fx/server/config/WebConfiguration.java similarity index 85% rename from falsework-sever/src/main/java/com/epri/fx/server/config/WebConfiguration.java rename to falsework-sever/src/main/java/com/fx/server/config/WebConfiguration.java index fd6dcde..a4b5b32 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/config/WebConfiguration.java +++ b/falsework-sever/src/main/java/com/fx/server/config/WebConfiguration.java @@ -1,9 +1,9 @@ -package com.epri.fx.server.config; +package com.fx.server.config; -import com.epri.fx.server.handler.GlobalExceptionHandler; -import com.epri.fx.server.interceptor.LogInterceptor; -import com.epri.fx.server.interceptor.UserAuthRestInterceptor; +import com.fx.server.handler.GlobalExceptionHandler; +import com.fx.server.interceptor.LogInterceptor; +import com.fx.server.interceptor.UserAuthRestInterceptor; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Primary; @@ -19,7 +19,7 @@ import java.util.Collections; */ @Configuration("admimWebConfig") @Primary -public class WebConfiguration implements WebMvcConfigurer { +public class WebConfiguration implements WebMvcConfigurer { @Bean GlobalExceptionHandler getGlobalExceptionHandler() { return new GlobalExceptionHandler(); @@ -36,14 +36,17 @@ public class WebConfiguration implements WebMvcConfigurer { UserAuthRestInterceptor getUserAuthRestInterceptor() { return new UserAuthRestInterceptor(); } + @Bean LogInterceptor getLogInterceptor() { return new LogInterceptor(); } + /** * 需要用户和服务认证判断的路径 + * * @return */ private ArrayList getIncludePathPatterns() { diff --git a/falsework-sever/src/main/java/com/fx/server/config/WebSocketConfig.java b/falsework-sever/src/main/java/com/fx/server/config/WebSocketConfig.java new file mode 100644 index 0000000..02993d1 --- /dev/null +++ b/falsework-sever/src/main/java/com/fx/server/config/WebSocketConfig.java @@ -0,0 +1,27 @@ +package com.fx.server.config; + +import com.fx.server.interceptor.WebcocketInterceptor; +import com.fx.server.websocket.WebSocketMessageHandler; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.socket.config.annotation.EnableWebSocket; +import org.springframework.web.socket.config.annotation.WebSocketConfigurer; +import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry; + +@Configuration +@EnableWebSocket +public class WebSocketConfig implements WebSocketConfigurer { + + @Autowired + private WebSocketMessageHandler webSocketMessageHandler; + @Autowired + private WebcocketInterceptor myInterceptor; + + @Override + public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { + registry + .addHandler(webSocketMessageHandler, "/websocket/*") + .addInterceptors(myInterceptor) + .setAllowedOrigins("*"); + } +} \ No newline at end of file diff --git a/falsework-sever/src/main/java/com/epri/fx/server/constant/AdminCommonConstant.java b/falsework-sever/src/main/java/com/fx/server/constant/AdminCommonConstant.java similarity index 96% rename from falsework-sever/src/main/java/com/epri/fx/server/constant/AdminCommonConstant.java rename to falsework-sever/src/main/java/com/fx/server/constant/AdminCommonConstant.java index b6907a2..346c1e2 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/constant/AdminCommonConstant.java +++ b/falsework-sever/src/main/java/com/fx/server/constant/AdminCommonConstant.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.constant; +package com.fx.server.constant; /** * diff --git a/falsework-sever/src/main/java/com/epri/fx/server/constant/CommonConstants.java b/falsework-sever/src/main/java/com/fx/server/constant/CommonConstants.java similarity index 64% rename from falsework-sever/src/main/java/com/epri/fx/server/constant/CommonConstants.java rename to falsework-sever/src/main/java/com/fx/server/constant/CommonConstants.java index a2effe3..f8ce4b1 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/constant/CommonConstants.java +++ b/falsework-sever/src/main/java/com/fx/server/constant/CommonConstants.java @@ -1,9 +1,7 @@ -package com.epri.fx.server.constant; +package com.fx.server.constant; /** - * * @Description: - * * @param: * @return: * @auther: liwen @@ -25,4 +23,19 @@ public class CommonConstants { public static final String CONTEXT_KEY_USER_TOKEN = "currentUserToken"; public static final String JWT_KEY_USER_ID = "userId"; public static final String JWT_KEY_NAME = "name"; + public static final String FAIL = "1"; + public static final String SUCCESS = "0"; + /** + * 执行目标key + */ + public static final String TASK_PROPERTIES = "TASK_PROPERTIES"; + /** + * 执行目标参数 + */ + public static final String TASK_PARAMETERS = "TASK_PARAMETERS"; + public static final String WEB_SOCKET_USER_LIST = "web_socket_user_list"; + public static final String WEB_SOCKET_USER_ID = "web_socket_user_id"; + public static final String WEB_SOCKET_TOKEN = "WEB_SOCKET_TOKEN"; + + } diff --git a/falsework-sever/src/main/java/com/epri/fx/server/constant/RestCodeConstants.java b/falsework-sever/src/main/java/com/fx/server/constant/RestCodeConstants.java similarity index 87% rename from falsework-sever/src/main/java/com/epri/fx/server/constant/RestCodeConstants.java rename to falsework-sever/src/main/java/com/fx/server/constant/RestCodeConstants.java index dbe1be7..2db766c 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/constant/RestCodeConstants.java +++ b/falsework-sever/src/main/java/com/fx/server/constant/RestCodeConstants.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.constant; +package com.fx.server.constant; /** * diff --git a/falsework-sever/src/main/java/com/epri/fx/server/constant/UserConstant.java b/falsework-sever/src/main/java/com/fx/server/constant/UserConstant.java similarity index 80% rename from falsework-sever/src/main/java/com/epri/fx/server/constant/UserConstant.java rename to falsework-sever/src/main/java/com/fx/server/constant/UserConstant.java index d6b58b1..01d03b8 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/constant/UserConstant.java +++ b/falsework-sever/src/main/java/com/fx/server/constant/UserConstant.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.constant; +package com.fx.server.constant; /** * ${DESCRIPTION} diff --git a/falsework-sever/src/main/java/com/epri/fx/server/context/BaseContextHandler.java b/falsework-sever/src/main/java/com/fx/server/context/BaseContextHandler.java similarity index 91% rename from falsework-sever/src/main/java/com/epri/fx/server/context/BaseContextHandler.java rename to falsework-sever/src/main/java/com/fx/server/context/BaseContextHandler.java index 28da1b5..bce3b68 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/context/BaseContextHandler.java +++ b/falsework-sever/src/main/java/com/fx/server/context/BaseContextHandler.java @@ -1,10 +1,8 @@ -package com.epri.fx.server.context; +package com.fx.server.context; -import com.epri.fx.server.constant.CommonConstants; -import com.epri.fx.server.util.StringHelper; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import com.fx.server.constant.CommonConstants; +import com.fx.server.util.StringHelper; import java.util.HashMap; import java.util.Map; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/entity/Element.java b/falsework-sever/src/main/java/com/fx/server/entity/Element.java similarity index 95% rename from falsework-sever/src/main/java/com/epri/fx/server/entity/Element.java rename to falsework-sever/src/main/java/com/fx/server/entity/Element.java index 8d1b05a..0d66118 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/entity/Element.java +++ b/falsework-sever/src/main/java/com/fx/server/entity/Element.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.entity; +package com.fx.server.entity; import lombok.Data; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/entity/Group.java b/falsework-sever/src/main/java/com/fx/server/entity/Group.java similarity index 99% rename from falsework-sever/src/main/java/com/epri/fx/server/entity/Group.java rename to falsework-sever/src/main/java/com/fx/server/entity/Group.java index 0aea33a..c6f3827 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/entity/Group.java +++ b/falsework-sever/src/main/java/com/fx/server/entity/Group.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.entity; +package com.fx.server.entity; import java.io.Serializable; import java.util.Date; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/entity/GroupType.java b/falsework-sever/src/main/java/com/fx/server/entity/GroupType.java similarity index 99% rename from falsework-sever/src/main/java/com/epri/fx/server/entity/GroupType.java rename to falsework-sever/src/main/java/com/fx/server/entity/GroupType.java index 2bec83c..70e4a62 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/entity/GroupType.java +++ b/falsework-sever/src/main/java/com/fx/server/entity/GroupType.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.entity; +package com.fx.server.entity; import java.io.Serializable; import java.util.Date; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/entity/Menu.java b/falsework-sever/src/main/java/com/fx/server/entity/Menu.java similarity index 96% rename from falsework-sever/src/main/java/com/epri/fx/server/entity/Menu.java rename to falsework-sever/src/main/java/com/fx/server/entity/Menu.java index 42b1ffd..d41e270 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/entity/Menu.java +++ b/falsework-sever/src/main/java/com/fx/server/entity/Menu.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.entity; +package com.fx.server.entity; import lombok.Data; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/entity/ResourceAuthority.java b/falsework-sever/src/main/java/com/fx/server/entity/ResourceAuthority.java similarity index 99% rename from falsework-sever/src/main/java/com/epri/fx/server/entity/ResourceAuthority.java rename to falsework-sever/src/main/java/com/fx/server/entity/ResourceAuthority.java index 4d29b4e..126f222 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/entity/ResourceAuthority.java +++ b/falsework-sever/src/main/java/com/fx/server/entity/ResourceAuthority.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.entity; +package com.fx.server.entity; import java.io.Serializable; import java.util.Date; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/entity/RsaKey.java b/falsework-sever/src/main/java/com/fx/server/entity/RsaKey.java similarity index 85% rename from falsework-sever/src/main/java/com/epri/fx/server/entity/RsaKey.java rename to falsework-sever/src/main/java/com/fx/server/entity/RsaKey.java index 445ded8..5b4f0e4 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/entity/RsaKey.java +++ b/falsework-sever/src/main/java/com/fx/server/entity/RsaKey.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.entity; +package com.fx.server.entity; import lombok.Data; diff --git a/falsework-sever/src/main/java/com/fx/server/entity/SysJob.java b/falsework-sever/src/main/java/com/fx/server/entity/SysJob.java new file mode 100644 index 0000000..6f6fd4e --- /dev/null +++ b/falsework-sever/src/main/java/com/fx/server/entity/SysJob.java @@ -0,0 +1,57 @@ +package com.fx.server.entity; + +import lombok.Data; +import org.quartz.Job; +import org.springframework.scheduling.quartz.QuartzJobBean; + +import java.io.Serializable; +import java.util.List; +import java.util.Map; + +/** + * @description: + * @className: SysJob + * @author: liwen + * @date: 2020/12/25 09:06 + */ +@Data +public class SysJob implements Serializable { + + /** + * 任务实现类 + */ + private String jobClass; + /** + * 任务名称(建议唯一) + */ + private String jobName; + /** + * 任务组名 + */ + private String jobGroupName; + /** + * 时间表达式 (如:0/5 * * * * ? ) + */ + private String jobTime; + /** + * 参数 + */ + private String parames; + + private String description; + private String jobStatus; + + + public SysJob(String jobClass, String jobName, String jobGroupName, String jobTime, String parames) { + this.jobClass = jobClass; + this.jobName = jobName; + this.jobGroupName = jobGroupName; + this.jobTime = jobTime; + this.parames = parames; + } + + public SysJob() { + + } + +} diff --git a/falsework-sever/src/main/java/com/epri/fx/server/entity/User.java b/falsework-sever/src/main/java/com/fx/server/entity/User.java similarity index 96% rename from falsework-sever/src/main/java/com/epri/fx/server/entity/User.java rename to falsework-sever/src/main/java/com/fx/server/entity/User.java index 2cae075..6691aff 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/entity/User.java +++ b/falsework-sever/src/main/java/com/fx/server/entity/User.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.entity; +package com.fx.server.entity; import lombok.Data; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/entity/UserInfo.java b/falsework-sever/src/main/java/com/fx/server/entity/UserInfo.java similarity index 97% rename from falsework-sever/src/main/java/com/epri/fx/server/entity/UserInfo.java rename to falsework-sever/src/main/java/com/fx/server/entity/UserInfo.java index 2dc7558..64384e8 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/entity/UserInfo.java +++ b/falsework-sever/src/main/java/com/fx/server/entity/UserInfo.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.entity; +package com.fx.server.entity; import java.io.Serializable; import java.util.Date; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/entity/log/GateLog.java b/falsework-sever/src/main/java/com/fx/server/entity/log/GateLog.java similarity index 91% rename from falsework-sever/src/main/java/com/epri/fx/server/entity/log/GateLog.java rename to falsework-sever/src/main/java/com/fx/server/entity/log/GateLog.java index 9c60599..ceca79c 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/entity/log/GateLog.java +++ b/falsework-sever/src/main/java/com/fx/server/entity/log/GateLog.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.entity.log; +package com.fx.server.entity.log; import java.io.Serializable; import java.util.Date; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/entity/log/LogInfo.java b/falsework-sever/src/main/java/com/fx/server/entity/log/LogInfo.java similarity index 93% rename from falsework-sever/src/main/java/com/epri/fx/server/entity/log/LogInfo.java rename to falsework-sever/src/main/java/com/fx/server/entity/log/LogInfo.java index 7a3c26f..4b65b84 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/entity/log/LogInfo.java +++ b/falsework-sever/src/main/java/com/fx/server/entity/log/LogInfo.java @@ -1,13 +1,16 @@ -package com.epri.fx.server.entity.log; +package com.fx.server.entity.log; import java.io.Serializable; import java.util.Date; /** - * ${DESCRIPTION} * - * @author wanghaobin - * @create 2017-07-01 11:18 + * @Description: + * + * @param: + * @return: + * @auther: liwen + * @date: 2021/1/4 1:03 下午 */ public class LogInfo implements Serializable{ private String id; diff --git a/falsework-sever/src/main/java/com/fx/server/entity/log/SysJobLog.java b/falsework-sever/src/main/java/com/fx/server/entity/log/SysJobLog.java new file mode 100644 index 0000000..704fb74 --- /dev/null +++ b/falsework-sever/src/main/java/com/fx/server/entity/log/SysJobLog.java @@ -0,0 +1,61 @@ +package com.fx.server.entity.log; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * sys_job_log + * @author + */ +@Data +public class SysJobLog implements Serializable { + /** + * 任务日志ID + */ + private Long jobLogId; + + /** + * 任务名称 + */ + private String jobName; + + /** + * 任务组名 + */ + private String jobGroup; + + /** + * 调用目标字符串 + */ + private String invokeTarget; + + /** + * 日志信息 + */ + private String jobMessage; + + /** + * 执行状态(0正常 1失败) + */ + private String status; + + /** + * 异常信息 + */ + private String exceptionInfo; + + /** + * 创建时间 + */ + private Date createTime; + + /** 开始时间 */ + private Date startTime; + + /** 结束时间 */ + private Date endTime; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/falsework-sever/src/main/java/com/fx/server/entity/log/SysLoginInfor.java b/falsework-sever/src/main/java/com/fx/server/entity/log/SysLoginInfor.java new file mode 100644 index 0000000..24c0427 --- /dev/null +++ b/falsework-sever/src/main/java/com/fx/server/entity/log/SysLoginInfor.java @@ -0,0 +1,59 @@ +package com.fx.server.entity.log; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +/** + * sys_logininfor + * @author + */ +@Data +public class SysLoginInfor implements Serializable { + /** + * 访问ID + */ + private Long infoId; + + /** + * 登录账号 + */ + private String loginName; + + /** + * 登录IP地址 + */ + private String ipaddr; + + /** + * 登录地点 + */ + private String loginLocation; + + /** + * 浏览器类型 + */ + private String browser; + + /** + * 操作系统 + */ + private String os; + + /** + * 登录状态(0成功 1失败) + */ + private String status; + + /** + * 提示消息 + */ + private String msg; + + /** + * 访问时间 + */ + private Date loginTime; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/falsework-sever/src/main/java/com/epri/fx/server/exception/BaseException.java b/falsework-sever/src/main/java/com/fx/server/exception/BaseException.java similarity index 96% rename from falsework-sever/src/main/java/com/epri/fx/server/exception/BaseException.java rename to falsework-sever/src/main/java/com/fx/server/exception/BaseException.java index 35734a6..36f2400 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/exception/BaseException.java +++ b/falsework-sever/src/main/java/com/fx/server/exception/BaseException.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.exception; +package com.fx.server.exception; /** * diff --git a/falsework-sever/src/main/java/com/epri/fx/server/exception/auth/ClientForbiddenException.java b/falsework-sever/src/main/java/com/fx/server/exception/auth/ClientForbiddenException.java similarity index 67% rename from falsework-sever/src/main/java/com/epri/fx/server/exception/auth/ClientForbiddenException.java rename to falsework-sever/src/main/java/com/fx/server/exception/auth/ClientForbiddenException.java index e17dc9e..a1fa804 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/exception/auth/ClientForbiddenException.java +++ b/falsework-sever/src/main/java/com/fx/server/exception/auth/ClientForbiddenException.java @@ -1,8 +1,8 @@ -package com.epri.fx.server.exception.auth; +package com.fx.server.exception.auth; -import com.epri.fx.server.constant.CommonConstants; -import com.epri.fx.server.exception.BaseException; +import com.fx.server.constant.CommonConstants; +import com.fx.server.exception.BaseException; /** * diff --git a/falsework-sever/src/main/java/com/epri/fx/server/exception/auth/ClientInvalidException.java b/falsework-sever/src/main/java/com/fx/server/exception/auth/ClientInvalidException.java similarity index 66% rename from falsework-sever/src/main/java/com/epri/fx/server/exception/auth/ClientInvalidException.java rename to falsework-sever/src/main/java/com/fx/server/exception/auth/ClientInvalidException.java index 689bc90..5205b8f 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/exception/auth/ClientInvalidException.java +++ b/falsework-sever/src/main/java/com/fx/server/exception/auth/ClientInvalidException.java @@ -1,8 +1,8 @@ -package com.epri.fx.server.exception.auth; +package com.fx.server.exception.auth; -import com.epri.fx.server.constant.CommonConstants; -import com.epri.fx.server.exception.BaseException; +import com.fx.server.constant.CommonConstants; +import com.fx.server.exception.BaseException; /** * diff --git a/falsework-sever/src/main/java/com/epri/fx/server/exception/auth/ClientTokenException.java b/falsework-sever/src/main/java/com/fx/server/exception/auth/ClientTokenException.java similarity index 66% rename from falsework-sever/src/main/java/com/epri/fx/server/exception/auth/ClientTokenException.java rename to falsework-sever/src/main/java/com/fx/server/exception/auth/ClientTokenException.java index f72c9ec..a1373c9 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/exception/auth/ClientTokenException.java +++ b/falsework-sever/src/main/java/com/fx/server/exception/auth/ClientTokenException.java @@ -1,8 +1,8 @@ -package com.epri.fx.server.exception.auth; +package com.fx.server.exception.auth; -import com.epri.fx.server.constant.CommonConstants; -import com.epri.fx.server.exception.BaseException; +import com.fx.server.constant.CommonConstants; +import com.fx.server.exception.BaseException; /** * diff --git a/falsework-sever/src/main/java/com/epri/fx/server/exception/auth/UserInvalidException.java b/falsework-sever/src/main/java/com/fx/server/exception/auth/UserInvalidException.java similarity index 66% rename from falsework-sever/src/main/java/com/epri/fx/server/exception/auth/UserInvalidException.java rename to falsework-sever/src/main/java/com/fx/server/exception/auth/UserInvalidException.java index a6e5352..d60ed4e 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/exception/auth/UserInvalidException.java +++ b/falsework-sever/src/main/java/com/fx/server/exception/auth/UserInvalidException.java @@ -1,8 +1,8 @@ -package com.epri.fx.server.exception.auth; +package com.fx.server.exception.auth; -import com.epri.fx.server.constant.CommonConstants; -import com.epri.fx.server.exception.BaseException; +import com.fx.server.constant.CommonConstants; +import com.fx.server.exception.BaseException; /** * diff --git a/falsework-sever/src/main/java/com/epri/fx/server/exception/auth/UserTokenException.java b/falsework-sever/src/main/java/com/fx/server/exception/auth/UserTokenException.java similarity index 65% rename from falsework-sever/src/main/java/com/epri/fx/server/exception/auth/UserTokenException.java rename to falsework-sever/src/main/java/com/fx/server/exception/auth/UserTokenException.java index 7cb6c61..64ab32f 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/exception/auth/UserTokenException.java +++ b/falsework-sever/src/main/java/com/fx/server/exception/auth/UserTokenException.java @@ -1,8 +1,8 @@ -package com.epri.fx.server.exception.auth; +package com.fx.server.exception.auth; -import com.epri.fx.server.constant.CommonConstants; -import com.epri.fx.server.exception.BaseException; +import com.fx.server.constant.CommonConstants; +import com.fx.server.exception.BaseException; /** * diff --git a/falsework-sever/src/main/java/com/epri/fx/server/filter/ReplaceStreamFilter.java b/falsework-sever/src/main/java/com/fx/server/filter/ReplaceStreamFilter.java similarity index 95% rename from falsework-sever/src/main/java/com/epri/fx/server/filter/ReplaceStreamFilter.java rename to falsework-sever/src/main/java/com/fx/server/filter/ReplaceStreamFilter.java index 139a795..0750650 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/filter/ReplaceStreamFilter.java +++ b/falsework-sever/src/main/java/com/fx/server/filter/ReplaceStreamFilter.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.filter; +package com.fx.server.filter; import lombok.extern.slf4j.Slf4j; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/filter/RequestWrapper.java b/falsework-sever/src/main/java/com/fx/server/filter/RequestWrapper.java similarity index 98% rename from falsework-sever/src/main/java/com/epri/fx/server/filter/RequestWrapper.java rename to falsework-sever/src/main/java/com/fx/server/filter/RequestWrapper.java index a7ca9b2..12a839c 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/filter/RequestWrapper.java +++ b/falsework-sever/src/main/java/com/fx/server/filter/RequestWrapper.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.filter; +package com.fx.server.filter; import lombok.extern.slf4j.Slf4j; diff --git a/falsework-sever/src/main/java/com/fx/server/handler/ChatHandshakeInterceptor.java b/falsework-sever/src/main/java/com/fx/server/handler/ChatHandshakeInterceptor.java new file mode 100644 index 0000000..5ffd67c --- /dev/null +++ b/falsework-sever/src/main/java/com/fx/server/handler/ChatHandshakeInterceptor.java @@ -0,0 +1,52 @@ +package com.fx.server.handler; + +import org.springframework.http.server.ServerHttpRequest; +import org.springframework.http.server.ServerHttpResponse; +import org.springframework.web.socket.WebSocketHandler; +import org.springframework.web.socket.handler.TextWebSocketHandler; +import org.springframework.web.socket.server.support.HttpSessionHandshakeInterceptor; + +import java.util.Map; + +/** + * WebSocket握手请求的拦截器. 检查握手请求和响应, 对WebSocketHandler传递属性 + */ +public class ChatHandshakeInterceptor extends HttpSessionHandshakeInterceptor { + /** + * 在握手之前执行该方法, 继续握手返回true, 中断握手返回false. 通过attributes参数设置WebSocketSession的属性 + * + * @param request + * @param response + * @param wsHandler + * @param attributes + * @return + * @throws Exception + */ + @Override + public boolean beforeHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, + Map attributes) throws Exception { +//为了方便区分来源,在此以用户的名字来区分,名字我们通过要求用输入进行传递,所以在这里先从请求中获取到用户输入的名字,因为是使用的rest 风格,所以规定路径的最后一个字符串是名字 + System.out.println("握手之前"); + String s = request.getURI().toString(); + String s1 = s.substring(s.lastIndexOf("/") + 1); + + return super.beforeHandshake(request, response, wsHandler, attributes); + } + + /** + * 在握手之后执行该方法. 无论是否握手成功都指明了响应状态码和相应头. + * + * @param request + * @param response + * @param wsHandler + * @param ex + */ + @Override + public void afterHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, + Exception ex) { + System.out.println("After Handshake"); + super.afterHandshake(request, response, wsHandler, ex); + } + + +} \ No newline at end of file diff --git a/falsework-sever/src/main/java/com/epri/fx/server/handler/GlobalExceptionHandler.java b/falsework-sever/src/main/java/com/fx/server/handler/GlobalExceptionHandler.java similarity index 82% rename from falsework-sever/src/main/java/com/epri/fx/server/handler/GlobalExceptionHandler.java rename to falsework-sever/src/main/java/com/fx/server/handler/GlobalExceptionHandler.java index 7689db8..d413f0d 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/handler/GlobalExceptionHandler.java +++ b/falsework-sever/src/main/java/com/fx/server/handler/GlobalExceptionHandler.java @@ -1,12 +1,12 @@ -package com.epri.fx.server.handler; +package com.fx.server.handler; -import com.epri.fx.server.constant.CommonConstants; -import com.epri.fx.server.exception.BaseException; -import com.epri.fx.server.exception.auth.ClientTokenException; -import com.epri.fx.server.exception.auth.UserInvalidException; -import com.epri.fx.server.exception.auth.UserTokenException; -import com.epri.fx.server.msg.BaseResponse; +import com.fx.server.constant.CommonConstants; +import com.fx.server.exception.BaseException; +import com.fx.server.exception.auth.ClientTokenException; +import com.fx.server.exception.auth.UserInvalidException; +import com.fx.server.exception.auth.UserTokenException; +import com.fx.server.msg.BaseResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.bind.annotation.ControllerAdvice; @@ -18,7 +18,7 @@ import javax.servlet.http.HttpServletResponse; /** * Created by ace on 2017/9/8. */ -@ControllerAdvice("com.epri.fx.server") +@ControllerAdvice("com.fx.server") @ResponseBody public class GlobalExceptionHandler { private Logger logger = LoggerFactory.getLogger(GlobalExceptionHandler.class); diff --git a/falsework-sever/src/main/java/com/epri/fx/server/interceptor/LogInterceptor.java b/falsework-sever/src/main/java/com/fx/server/interceptor/LogInterceptor.java similarity index 90% rename from falsework-sever/src/main/java/com/epri/fx/server/interceptor/LogInterceptor.java rename to falsework-sever/src/main/java/com/fx/server/interceptor/LogInterceptor.java index 1642c53..1f092c6 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/interceptor/LogInterceptor.java +++ b/falsework-sever/src/main/java/com/fx/server/interceptor/LogInterceptor.java @@ -1,16 +1,16 @@ -package com.epri.fx.server.interceptor; +package com.fx.server.interceptor; -import com.epri.fx.server.config.UserConfiguration; -import com.epri.fx.server.context.BaseContextHandler; -import com.epri.fx.server.entity.log.LogInfo; -import com.epri.fx.server.filter.RequestWrapper; -import com.epri.fx.server.jwt.IJWTInfo; -import com.epri.fx.server.service.PermissionService; -import com.epri.fx.server.service.log.GateLogService; -import com.epri.fx.server.util.DBLog; -import com.epri.fx.server.util.user.JwtTokenUtil; -import com.epri.fx.server.vo.PermissionInfo; +import com.fx.server.config.UserConfiguration; +import com.fx.server.context.BaseContextHandler; +import com.fx.server.entity.log.LogInfo; +import com.fx.server.filter.RequestWrapper; +import com.fx.server.jwt.IJWTInfo; +import com.fx.server.service.PermissionService; +import com.fx.server.service.log.GateLogService; +import com.fx.server.util.DBLog; +import com.fx.server.util.user.JwtTokenUtil; +import com.fx.server.vo.PermissionInfo; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/interceptor/UserAuthRestInterceptor.java b/falsework-sever/src/main/java/com/fx/server/interceptor/UserAuthRestInterceptor.java similarity index 82% rename from falsework-sever/src/main/java/com/epri/fx/server/interceptor/UserAuthRestInterceptor.java rename to falsework-sever/src/main/java/com/fx/server/interceptor/UserAuthRestInterceptor.java index 2efb7e3..2d920a4 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/interceptor/UserAuthRestInterceptor.java +++ b/falsework-sever/src/main/java/com/fx/server/interceptor/UserAuthRestInterceptor.java @@ -1,12 +1,12 @@ -package com.epri.fx.server.interceptor; +package com.fx.server.interceptor; -import com.epri.fx.server.config.UserConfiguration; -import com.epri.fx.server.context.BaseContextHandler; -import com.epri.fx.server.jwt.IJWTInfo; -import com.epri.fx.server.service.PermissionService; -import com.epri.fx.server.service.log.GateLogService; -import com.epri.fx.server.util.user.JwtTokenUtil; +import com.fx.server.config.UserConfiguration; +import com.fx.server.context.BaseContextHandler; +import com.fx.server.jwt.IJWTInfo; +import com.fx.server.service.PermissionService; +import com.fx.server.service.log.GateLogService; +import com.fx.server.util.user.JwtTokenUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; diff --git a/falsework-sever/src/main/java/com/fx/server/interceptor/WebcocketInterceptor.java b/falsework-sever/src/main/java/com/fx/server/interceptor/WebcocketInterceptor.java new file mode 100644 index 0000000..cc6b9b0 --- /dev/null +++ b/falsework-sever/src/main/java/com/fx/server/interceptor/WebcocketInterceptor.java @@ -0,0 +1,93 @@ +package com.fx.server.interceptor; + +import com.fx.server.config.UserConfiguration; +import com.fx.server.entity.log.SysLoginInfor; +import com.fx.server.jwt.IJWTInfo; +import com.fx.server.service.log.SysLoginInfoService; +import com.fx.server.util.user.JwtTokenUtil; +import com.fx.server.constant.CommonConstants; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.server.ServerHttpRequest; +import org.springframework.http.server.ServerHttpResponse; +import org.springframework.stereotype.Component; +import org.springframework.web.socket.WebSocketHandler; +import org.springframework.web.socket.server.HandshakeInterceptor; + +import java.util.Date; +import java.util.Map; + +import static java.util.UUID.*; + +/** + * @author buhao + * @version MyInterceptor.java, v 0.1 2019-10-17 19:21 buhao + */ +@Slf4j +@Component +public class WebcocketInterceptor implements HandshakeInterceptor { + + @Autowired + private JwtTokenUtil jwtTokenUtil; + @Autowired + private UserConfiguration userConfiguration; + + @Autowired + private SysLoginInfoService sysLoginInfoService; + + /** + * 握手前 + * + * @param request + * @param response + * @param wsHandler + * @param attributes + * @return + * @throws Exception + */ + @Override + public boolean beforeHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, Map attributes) throws Exception { + log.info("握手开始"); + + // 获得请求参数 + String token = request.getHeaders().getFirst(userConfiguration.getUserTokenHeader()); + String userName = request.getHeaders().getFirst("userName"); + IJWTInfo ijwtInfo = jwtTokenUtil.getInfoFromToken(token); + SysLoginInfor sysLoginInfor = new SysLoginInfor(); + sysLoginInfor.setInfoId(randomUUID().getMostSignificantBits()); + sysLoginInfor.setLoginName(userName); + sysLoginInfor.setIpaddr(request.getRemoteAddress().toString()); + sysLoginInfor.setLoginTime(new Date()); + + if (ijwtInfo != null) { + sysLoginInfor.setStatus("0"); + sysLoginInfor.setMsg("登录成功!"); + // 放入属性域 + attributes.put(CommonConstants.WEB_SOCKET_USER_LIST, sysLoginInfor); + attributes.put(CommonConstants.WEB_SOCKET_USER_ID, sysLoginInfor.getLoginName()); + sysLoginInfoService.addSysJobLog(sysLoginInfor); + return true; + } else { + log.error("用户登录已失效"); + sysLoginInfor.setStatus("1"); + sysLoginInfor.setMsg("登录失败!"); + sysLoginInfoService.addSysJobLog(sysLoginInfor); + return false; + } + + } + + /** + * 握手后 + * + * @param request + * @param response + * @param wsHandler + * @param exception + */ + @Override + public void afterHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, Exception exception) { + log.info("握手完成."); + } + +} \ No newline at end of file diff --git a/falsework-sever/src/main/java/com/fx/server/job/AbstractQuartzJob.java b/falsework-sever/src/main/java/com/fx/server/job/AbstractQuartzJob.java new file mode 100644 index 0000000..86e3253 --- /dev/null +++ b/falsework-sever/src/main/java/com/fx/server/job/AbstractQuartzJob.java @@ -0,0 +1,102 @@ +package com.fx.server.job; + + +import com.fx.server.constant.CommonConstants; +import com.fx.server.entity.SysJob; +import com.fx.server.entity.log.SysJobLog; +import com.fx.server.service.log.SysJobLogService; +import com.fx.server.util.SpringUtils; +import org.apache.commons.lang3.StringUtils; +import org.quartz.Job; +import org.quartz.JobExecutionContext; +import org.quartz.JobExecutionException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.BeanUtils; + +import java.util.Date; + +/** + * 抽象quartz调用 + * + * @author ruoyi + */ +public abstract class AbstractQuartzJob implements Job { + private static final Logger log = LoggerFactory.getLogger(AbstractQuartzJob.class); + + /** + * 线程本地变量 + */ + private static ThreadLocal threadLocal = new ThreadLocal<>(); + + @Override + public void execute(JobExecutionContext context) throws JobExecutionException { + SysJob sysJob = new SysJob(); + Object obj = context.getMergedJobDataMap().get(CommonConstants.TASK_PROPERTIES); + if (obj != null) { + BeanUtils.copyProperties(obj, sysJob); + + } + try { + before(context, sysJob); + if (sysJob != null) { + doExecute(context, sysJob); + } + after(context, sysJob, null); + } catch (Exception e) { + log.error("任务执行异常 - :", e); + after(context, sysJob, e); + } + } + + /** + * 执行前 + * + * @param context 工作执行上下文对象 + * @param sysJob 系统计划任务 + */ + protected void before(JobExecutionContext context, SysJob sysJob) { + threadLocal.set(new Date()); + } + + /** + * 执行后 + * + * @param context 工作执行上下文对象 + * @param sysScheduleJob 系统计划任务 + */ + protected void after(JobExecutionContext context, SysJob sysJob, Exception e) { + Date startTime = threadLocal.get(); + threadLocal.remove(); + + final SysJobLog sysJobLog = new SysJobLog(); + sysJobLog.setCreateTime(startTime); + sysJobLog.setJobName(sysJob.getJobName()); + sysJobLog.setJobGroup(sysJob.getJobGroupName()); + sysJobLog.setInvokeTarget(sysJob.getJobClass()); + sysJobLog.setStartTime(startTime); + sysJobLog.setEndTime(new Date()); + long runMs = sysJobLog.getEndTime().getTime() - sysJobLog.getStartTime().getTime(); + sysJobLog.setJobMessage(sysJobLog.getJobName() + " 总共耗时:" + runMs + "毫秒"); + if (e != null) { + sysJobLog.setStatus(CommonConstants.FAIL); + String errorMsg = StringUtils.substring(e.getMessage(), 0, 2000); + sysJobLog.setExceptionInfo(errorMsg); + } else { + sysJobLog.setStatus(CommonConstants.SUCCESS); + } + + // 写入数据库当中 + SpringUtils.getBean(SysJobLogService.class).addSysJobLog(sysJobLog); + + } + + /** + * 执行方法,由子类重载 + * + * @param context 工作执行上下文对象 + * @param sysJob 系统计划任务 + * @throws Exception 执行过程中的异常 + */ + protected abstract void doExecute(JobExecutionContext context, SysJob sysJob) throws Exception; +} diff --git a/falsework-sever/src/main/java/com/fx/server/job/TestJob.java b/falsework-sever/src/main/java/com/fx/server/job/TestJob.java new file mode 100644 index 0000000..6e729ac --- /dev/null +++ b/falsework-sever/src/main/java/com/fx/server/job/TestJob.java @@ -0,0 +1,23 @@ +package com.fx.server.job; + +import com.fx.server.entity.SysJob; +import com.fx.server.util.SpringUtils; +import com.fx.server.websocket.WebSocketMessageHandler; +import org.quartz.JobExecutionContext; +import org.springframework.web.socket.TextMessage; + +/** + * @description: + * @className: TestJob + * @author: liwen + * @date: 2020/12/24 16:23 + */ +public class TestJob extends AbstractQuartzJob { + + @Override + protected void doExecute(JobExecutionContext context, SysJob sysJob) throws Exception { + System.err.println("aafdsafdsa"); + // 写入数据库当中 + SpringUtils.getBean(WebSocketMessageHandler.class).sendMessageToUsers(new TextMessage("999999999999999999999999999999")); + } +} diff --git a/falsework-sever/src/main/java/com/epri/fx/server/jwt/IJWTInfo.java b/falsework-sever/src/main/java/com/fx/server/jwt/IJWTInfo.java similarity index 91% rename from falsework-sever/src/main/java/com/epri/fx/server/jwt/IJWTInfo.java rename to falsework-sever/src/main/java/com/fx/server/jwt/IJWTInfo.java index 6ed5aca..6b0d8b0 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/jwt/IJWTInfo.java +++ b/falsework-sever/src/main/java/com/fx/server/jwt/IJWTInfo.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.jwt; +package com.fx.server.jwt; /** * diff --git a/falsework-sever/src/main/java/com/epri/fx/server/jwt/JWTHelper.java b/falsework-sever/src/main/java/com/fx/server/jwt/JWTHelper.java similarity index 96% rename from falsework-sever/src/main/java/com/epri/fx/server/jwt/JWTHelper.java rename to falsework-sever/src/main/java/com/fx/server/jwt/JWTHelper.java index 7574638..af6aeef 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/jwt/JWTHelper.java +++ b/falsework-sever/src/main/java/com/fx/server/jwt/JWTHelper.java @@ -1,8 +1,8 @@ -package com.epri.fx.server.jwt; +package com.fx.server.jwt; -import com.epri.fx.server.constant.CommonConstants; -import com.epri.fx.server.util.StringHelper; +import com.fx.server.constant.CommonConstants; +import com.fx.server.util.StringHelper; import io.jsonwebtoken.Claims; import io.jsonwebtoken.Jws; import io.jsonwebtoken.Jwts; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/jwt/JWTInfo.java b/falsework-sever/src/main/java/com/fx/server/jwt/JWTInfo.java similarity index 98% rename from falsework-sever/src/main/java/com/epri/fx/server/jwt/JWTInfo.java rename to falsework-sever/src/main/java/com/fx/server/jwt/JWTInfo.java index cc6d4da..be1e53b 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/jwt/JWTInfo.java +++ b/falsework-sever/src/main/java/com/fx/server/jwt/JWTInfo.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.jwt; +package com.fx.server.jwt; import java.io.Serializable; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/jwt/RsaKeyHelper.java b/falsework-sever/src/main/java/com/fx/server/jwt/RsaKeyHelper.java similarity index 96% rename from falsework-sever/src/main/java/com/epri/fx/server/jwt/RsaKeyHelper.java rename to falsework-sever/src/main/java/com/fx/server/jwt/RsaKeyHelper.java index 211fb7e..5aa7d42 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/jwt/RsaKeyHelper.java +++ b/falsework-sever/src/main/java/com/fx/server/jwt/RsaKeyHelper.java @@ -1,9 +1,7 @@ -package com.epri.fx.server.jwt; +package com.fx.server.jwt; - - - -import org.apache.commons.codec.binary.Base64; +import sun.misc.BASE64Decoder; +import sun.misc.BASE64Encoder; import java.io.DataInputStream; import java.io.FileOutputStream; @@ -155,11 +153,11 @@ public class RsaKeyHelper { } public static String toHexString(byte[] b) { - return Base64.encodeBase64String(b); + return (new BASE64Encoder()).encodeBuffer(b); } public static final byte[] toBytes(String s) throws IOException { - return Base64.decodeBase64(s); + return (new BASE64Decoder()).decodeBuffer(s); } public static void main(String[] args) throws NoSuchAlgorithmException { diff --git a/falsework-sever/src/main/java/com/epri/fx/server/jwt/UserAuthUtil.java b/falsework-sever/src/main/java/com/fx/server/jwt/UserAuthUtil.java similarity index 86% rename from falsework-sever/src/main/java/com/epri/fx/server/jwt/UserAuthUtil.java rename to falsework-sever/src/main/java/com/fx/server/jwt/UserAuthUtil.java index 6420acc..15c998d 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/jwt/UserAuthUtil.java +++ b/falsework-sever/src/main/java/com/fx/server/jwt/UserAuthUtil.java @@ -1,7 +1,7 @@ -package com.epri.fx.server.jwt; +package com.fx.server.jwt; -import com.epri.fx.server.config.UserAuthConfig; -import com.epri.fx.server.exception.auth.UserTokenException; +import com.fx.server.config.UserAuthConfig; +import com.fx.server.exception.auth.UserTokenException; import io.jsonwebtoken.ExpiredJwtException; import io.jsonwebtoken.SignatureException; import org.springframework.beans.factory.annotation.Autowired; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/mapper/ElementMapper.java b/falsework-sever/src/main/java/com/fx/server/mapper/ElementMapper.java similarity index 88% rename from falsework-sever/src/main/java/com/epri/fx/server/mapper/ElementMapper.java rename to falsework-sever/src/main/java/com/fx/server/mapper/ElementMapper.java index c417a0d..82a6f50 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/mapper/ElementMapper.java +++ b/falsework-sever/src/main/java/com/fx/server/mapper/ElementMapper.java @@ -1,6 +1,6 @@ -package com.epri.fx.server.mapper; +package com.fx.server.mapper; -import com.epri.fx.server.entity.Element; +import com.fx.server.entity.Element; import org.apache.ibatis.annotations.Param; import java.util.List; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/mapper/GateLogMapper.java b/falsework-sever/src/main/java/com/fx/server/mapper/GateLogMapper.java similarity index 75% rename from falsework-sever/src/main/java/com/epri/fx/server/mapper/GateLogMapper.java rename to falsework-sever/src/main/java/com/fx/server/mapper/GateLogMapper.java index 388cf32..82aced3 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/mapper/GateLogMapper.java +++ b/falsework-sever/src/main/java/com/fx/server/mapper/GateLogMapper.java @@ -1,7 +1,6 @@ -package com.epri.fx.server.mapper; +package com.fx.server.mapper; -import com.epri.fx.server.entity.User; -import com.epri.fx.server.entity.log.GateLog; +import com.fx.server.entity.log.GateLog; import java.util.List; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/mapper/GroupMapper.java b/falsework-sever/src/main/java/com/fx/server/mapper/GroupMapper.java similarity index 91% rename from falsework-sever/src/main/java/com/epri/fx/server/mapper/GroupMapper.java rename to falsework-sever/src/main/java/com/fx/server/mapper/GroupMapper.java index 7393e12..404b2ce 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/mapper/GroupMapper.java +++ b/falsework-sever/src/main/java/com/fx/server/mapper/GroupMapper.java @@ -1,6 +1,6 @@ -package com.epri.fx.server.mapper; +package com.fx.server.mapper; -import com.epri.fx.server.entity.Group; +import com.fx.server.entity.Group; import org.apache.ibatis.annotations.Param; import java.util.List; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/mapper/GroupTypeMapper.java b/falsework-sever/src/main/java/com/fx/server/mapper/GroupTypeMapper.java similarity index 82% rename from falsework-sever/src/main/java/com/epri/fx/server/mapper/GroupTypeMapper.java rename to falsework-sever/src/main/java/com/fx/server/mapper/GroupTypeMapper.java index 216c873..e96c0e8 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/mapper/GroupTypeMapper.java +++ b/falsework-sever/src/main/java/com/fx/server/mapper/GroupTypeMapper.java @@ -1,6 +1,6 @@ -package com.epri.fx.server.mapper; +package com.fx.server.mapper; -import com.epri.fx.server.entity.GroupType; +import com.fx.server.entity.GroupType; import java.util.List; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/mapper/MenuMapper.java b/falsework-sever/src/main/java/com/fx/server/mapper/MenuMapper.java similarity index 89% rename from falsework-sever/src/main/java/com/epri/fx/server/mapper/MenuMapper.java rename to falsework-sever/src/main/java/com/fx/server/mapper/MenuMapper.java index 3ab20cb..1a7c390 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/mapper/MenuMapper.java +++ b/falsework-sever/src/main/java/com/fx/server/mapper/MenuMapper.java @@ -1,7 +1,7 @@ -package com.epri.fx.server.mapper; +package com.fx.server.mapper; -import com.epri.fx.server.entity.Menu; +import com.fx.server.entity.Menu; import org.apache.ibatis.annotations.Param; import java.util.List; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/mapper/ResourceAuthorityMapper.java b/falsework-sever/src/main/java/com/fx/server/mapper/ResourceAuthorityMapper.java similarity index 90% rename from falsework-sever/src/main/java/com/epri/fx/server/mapper/ResourceAuthorityMapper.java rename to falsework-sever/src/main/java/com/fx/server/mapper/ResourceAuthorityMapper.java index 345a46d..28e1df6 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/mapper/ResourceAuthorityMapper.java +++ b/falsework-sever/src/main/java/com/fx/server/mapper/ResourceAuthorityMapper.java @@ -1,6 +1,6 @@ -package com.epri.fx.server.mapper; +package com.fx.server.mapper; -import com.epri.fx.server.entity.ResourceAuthority; +import com.fx.server.entity.ResourceAuthority; import org.apache.ibatis.annotations.Param; import java.util.List; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/mapper/RsaKeyMapper.java b/falsework-sever/src/main/java/com/fx/server/mapper/RsaKeyMapper.java similarity index 78% rename from falsework-sever/src/main/java/com/epri/fx/server/mapper/RsaKeyMapper.java rename to falsework-sever/src/main/java/com/fx/server/mapper/RsaKeyMapper.java index e0ea697..3429379 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/mapper/RsaKeyMapper.java +++ b/falsework-sever/src/main/java/com/fx/server/mapper/RsaKeyMapper.java @@ -1,6 +1,6 @@ -package com.epri.fx.server.mapper; +package com.fx.server.mapper; -import com.epri.fx.server.entity.RsaKey; +import com.fx.server.entity.RsaKey; public interface RsaKeyMapper { int deleteByPrimaryKey(String key); diff --git a/falsework-sever/src/main/java/com/fx/server/mapper/SysJobLogMapper.java b/falsework-sever/src/main/java/com/fx/server/mapper/SysJobLogMapper.java new file mode 100644 index 0000000..aee334d --- /dev/null +++ b/falsework-sever/src/main/java/com/fx/server/mapper/SysJobLogMapper.java @@ -0,0 +1,22 @@ +package com.fx.server.mapper; + +import com.fx.server.entity.log.SysJobLog; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +public interface SysJobLogMapper { + int deleteByPrimaryKey(Long jobLogId); + + int insert(SysJobLog record); + + int insertSelective(SysJobLog record); + + SysJobLog selectByPrimaryKey(Long jobLogId); + + int updateByPrimaryKeySelective(SysJobLog record); + + int updateByPrimaryKey(SysJobLog record); + List selectPage(@Param("params") Map params); +} \ No newline at end of file diff --git a/falsework-sever/src/main/java/com/fx/server/mapper/SysLoginInforMapper.java b/falsework-sever/src/main/java/com/fx/server/mapper/SysLoginInforMapper.java new file mode 100644 index 0000000..3ef594a --- /dev/null +++ b/falsework-sever/src/main/java/com/fx/server/mapper/SysLoginInforMapper.java @@ -0,0 +1,22 @@ +package com.fx.server.mapper; + +import com.fx.server.entity.log.SysLoginInfor; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +public interface SysLoginInforMapper { + int deleteByPrimaryKey(Long infoId); + + int insert(SysLoginInfor record); + + int insertSelective(SysLoginInfor record); + + SysLoginInfor selectByPrimaryKey(Long infoId); + + int updateByPrimaryKeySelective(SysLoginInfor record); + + int updateByPrimaryKey(SysLoginInfor record); + List selectPage(@Param("params")Map params); +} \ No newline at end of file diff --git a/falsework-sever/src/main/java/com/epri/fx/server/mapper/UserMapper.java b/falsework-sever/src/main/java/com/fx/server/mapper/UserMapper.java similarity index 89% rename from falsework-sever/src/main/java/com/epri/fx/server/mapper/UserMapper.java rename to falsework-sever/src/main/java/com/fx/server/mapper/UserMapper.java index ad866f9..c5fc7a8 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/mapper/UserMapper.java +++ b/falsework-sever/src/main/java/com/fx/server/mapper/UserMapper.java @@ -1,6 +1,6 @@ -package com.epri.fx.server.mapper; +package com.fx.server.mapper; -import com.epri.fx.server.entity.User; +import com.fx.server.entity.User; import org.apache.ibatis.annotations.Param; import java.util.List; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/msg/BaseResponse.java b/falsework-sever/src/main/java/com/fx/server/msg/BaseResponse.java similarity index 95% rename from falsework-sever/src/main/java/com/epri/fx/server/msg/BaseResponse.java rename to falsework-sever/src/main/java/com/fx/server/msg/BaseResponse.java index 18642c8..8def288 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/msg/BaseResponse.java +++ b/falsework-sever/src/main/java/com/fx/server/msg/BaseResponse.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.msg; +package com.fx.server.msg; /** * diff --git a/falsework-sever/src/main/java/com/epri/fx/server/msg/ListRestResponse.java b/falsework-sever/src/main/java/com/fx/server/msg/ListRestResponse.java similarity index 96% rename from falsework-sever/src/main/java/com/epri/fx/server/msg/ListRestResponse.java rename to falsework-sever/src/main/java/com/fx/server/msg/ListRestResponse.java index a3e3570..7564ae7 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/msg/ListRestResponse.java +++ b/falsework-sever/src/main/java/com/fx/server/msg/ListRestResponse.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.msg; +package com.fx.server.msg; /** * ${DESCRIPTION} diff --git a/falsework-sever/src/main/java/com/epri/fx/server/msg/ObjectRestResponse.java b/falsework-sever/src/main/java/com/fx/server/msg/ObjectRestResponse.java similarity index 95% rename from falsework-sever/src/main/java/com/epri/fx/server/msg/ObjectRestResponse.java rename to falsework-sever/src/main/java/com/fx/server/msg/ObjectRestResponse.java index 1dbc7e9..08f966d 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/msg/ObjectRestResponse.java +++ b/falsework-sever/src/main/java/com/fx/server/msg/ObjectRestResponse.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.msg; +package com.fx.server.msg; /** * diff --git a/falsework-sever/src/main/java/com/epri/fx/server/msg/TableResultResponse.java b/falsework-sever/src/main/java/com/fx/server/msg/TableResultResponse.java similarity index 95% rename from falsework-sever/src/main/java/com/epri/fx/server/msg/TableResultResponse.java rename to falsework-sever/src/main/java/com/fx/server/msg/TableResultResponse.java index 0a7622b..1fa5f36 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/msg/TableResultResponse.java +++ b/falsework-sever/src/main/java/com/fx/server/msg/TableResultResponse.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.msg; +package com.fx.server.msg; import java.util.List; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/msg/auth/TokenErrorResponse.java b/falsework-sever/src/main/java/com/fx/server/msg/auth/TokenErrorResponse.java similarity index 67% rename from falsework-sever/src/main/java/com/epri/fx/server/msg/auth/TokenErrorResponse.java rename to falsework-sever/src/main/java/com/fx/server/msg/auth/TokenErrorResponse.java index 4197d67..b902441 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/msg/auth/TokenErrorResponse.java +++ b/falsework-sever/src/main/java/com/fx/server/msg/auth/TokenErrorResponse.java @@ -1,8 +1,8 @@ -package com.epri.fx.server.msg.auth; +package com.fx.server.msg.auth; -import com.epri.fx.server.constant.RestCodeConstants; -import com.epri.fx.server.msg.BaseResponse; +import com.fx.server.constant.RestCodeConstants; +import com.fx.server.msg.BaseResponse; /** * diff --git a/falsework-sever/src/main/java/com/epri/fx/server/msg/auth/TokenForbiddenResponse.java b/falsework-sever/src/main/java/com/fx/server/msg/auth/TokenForbiddenResponse.java similarity index 68% rename from falsework-sever/src/main/java/com/epri/fx/server/msg/auth/TokenForbiddenResponse.java rename to falsework-sever/src/main/java/com/fx/server/msg/auth/TokenForbiddenResponse.java index 6b75693..c6739ad 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/msg/auth/TokenForbiddenResponse.java +++ b/falsework-sever/src/main/java/com/fx/server/msg/auth/TokenForbiddenResponse.java @@ -1,8 +1,8 @@ -package com.epri.fx.server.msg.auth; +package com.fx.server.msg.auth; -import com.epri.fx.server.constant.RestCodeConstants; -import com.epri.fx.server.msg.BaseResponse; +import com.fx.server.constant.RestCodeConstants; +import com.fx.server.msg.BaseResponse; /** * diff --git a/falsework-sever/src/main/java/com/epri/fx/server/rest/AuthController.java b/falsework-sever/src/main/java/com/fx/server/rest/AuthController.java similarity index 89% rename from falsework-sever/src/main/java/com/epri/fx/server/rest/AuthController.java rename to falsework-sever/src/main/java/com/fx/server/rest/AuthController.java index 23e62de..e40af19 100755 --- a/falsework-sever/src/main/java/com/epri/fx/server/rest/AuthController.java +++ b/falsework-sever/src/main/java/com/fx/server/rest/AuthController.java @@ -1,8 +1,8 @@ -package com.epri.fx.server.rest; +package com.fx.server.rest; -import com.epri.fx.server.msg.ObjectRestResponse; -import com.epri.fx.server.service.security.auth.AuthService; -import com.epri.fx.server.util.user.JwtAuthenticationRequest; +import com.fx.server.msg.ObjectRestResponse; +import com.fx.server.service.security.auth.AuthService; +import com.fx.server.util.user.JwtAuthenticationRequest; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/rest/ElementController.java b/falsework-sever/src/main/java/com/fx/server/rest/ElementController.java similarity index 85% rename from falsework-sever/src/main/java/com/epri/fx/server/rest/ElementController.java rename to falsework-sever/src/main/java/com/fx/server/rest/ElementController.java index a373ccc..7b14489 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/rest/ElementController.java +++ b/falsework-sever/src/main/java/com/fx/server/rest/ElementController.java @@ -1,8 +1,8 @@ -package com.epri.fx.server.rest; +package com.fx.server.rest; -import com.epri.fx.server.entity.Element; -import com.epri.fx.server.msg.TableResultResponse; -import com.epri.fx.server.service.ElementService; +import com.fx.server.entity.Element; +import com.fx.server.msg.TableResultResponse; +import com.fx.server.service.ElementService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/rest/GroupController.java b/falsework-sever/src/main/java/com/fx/server/rest/GroupController.java similarity index 91% rename from falsework-sever/src/main/java/com/epri/fx/server/rest/GroupController.java rename to falsework-sever/src/main/java/com/fx/server/rest/GroupController.java index 965de89..a8c9cc3 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/rest/GroupController.java +++ b/falsework-sever/src/main/java/com/fx/server/rest/GroupController.java @@ -1,10 +1,10 @@ -package com.epri.fx.server.rest; +package com.fx.server.rest; -import com.epri.fx.server.service.GroupService; -import com.epri.fx.server.vo.GroupUsers; -import com.epri.fx.server.vo.GroupVO; -import com.epri.fx.server.vo.MenuVO; +import com.fx.server.service.GroupService; +import com.fx.server.vo.GroupUsers; +import com.fx.server.vo.GroupVO; +import com.fx.server.vo.MenuVO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/rest/GroupTypeController.java b/falsework-sever/src/main/java/com/fx/server/rest/GroupTypeController.java similarity index 86% rename from falsework-sever/src/main/java/com/epri/fx/server/rest/GroupTypeController.java rename to falsework-sever/src/main/java/com/fx/server/rest/GroupTypeController.java index 3cb2592..fe6add5 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/rest/GroupTypeController.java +++ b/falsework-sever/src/main/java/com/fx/server/rest/GroupTypeController.java @@ -1,10 +1,9 @@ -package com.epri.fx.server.rest; +package com.fx.server.rest; -import com.epri.fx.server.service.GroupTypeService; -import com.epri.fx.server.vo.GroupTypeVO; +import com.fx.server.service.GroupTypeService; +import com.fx.server.vo.GroupTypeVO; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; import java.util.List; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/rest/HelloController.java b/falsework-sever/src/main/java/com/fx/server/rest/HelloController.java similarity index 89% rename from falsework-sever/src/main/java/com/epri/fx/server/rest/HelloController.java rename to falsework-sever/src/main/java/com/fx/server/rest/HelloController.java index de1ac21..b41fa25 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/rest/HelloController.java +++ b/falsework-sever/src/main/java/com/fx/server/rest/HelloController.java @@ -1,6 +1,6 @@ -package com.epri.fx.server.rest; +package com.fx.server.rest; -import com.epri.fx.server.service.MenuService; +import com.fx.server.service.MenuService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/rest/LogController.java b/falsework-sever/src/main/java/com/fx/server/rest/LogController.java similarity index 55% rename from falsework-sever/src/main/java/com/epri/fx/server/rest/LogController.java rename to falsework-sever/src/main/java/com/fx/server/rest/LogController.java index be4e04d..a03b46a 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/rest/LogController.java +++ b/falsework-sever/src/main/java/com/fx/server/rest/LogController.java @@ -1,22 +1,13 @@ -package com.epri.fx.server.rest; +package com.fx.server.rest; -import com.epri.fx.server.entity.User; -import com.epri.fx.server.entity.UserInfo; -import com.epri.fx.server.entity.log.GateLog; -import com.epri.fx.server.entity.log.LogInfo; -import com.epri.fx.server.msg.ObjectRestResponse; -import com.epri.fx.server.msg.TableResultResponse; -import com.epri.fx.server.service.PermissionService; -import com.epri.fx.server.service.UserService; -import com.epri.fx.server.service.log.GateLogService; -import com.epri.fx.server.vo.FrontUser; -import com.epri.fx.server.vo.MenuVO; -import com.epri.fx.server.vo.PermissionInfo; +import com.fx.server.entity.log.GateLog; +import com.fx.server.msg.ObjectRestResponse; +import com.fx.server.msg.TableResultResponse; +import com.fx.server.service.log.GateLogService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; -import java.util.List; import java.util.Map; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/rest/LoginController.java b/falsework-sever/src/main/java/com/fx/server/rest/LoginController.java similarity index 86% rename from falsework-sever/src/main/java/com/epri/fx/server/rest/LoginController.java rename to falsework-sever/src/main/java/com/fx/server/rest/LoginController.java index 2f1ee57..0fc4ea6 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/rest/LoginController.java +++ b/falsework-sever/src/main/java/com/fx/server/rest/LoginController.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.rest; +package com.fx.server.rest; import org.springframework.web.bind.annotation.RestController; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/rest/MenuController.java b/falsework-sever/src/main/java/com/fx/server/rest/MenuController.java similarity index 86% rename from falsework-sever/src/main/java/com/epri/fx/server/rest/MenuController.java rename to falsework-sever/src/main/java/com/fx/server/rest/MenuController.java index 50ef9d4..240574a 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/rest/MenuController.java +++ b/falsework-sever/src/main/java/com/fx/server/rest/MenuController.java @@ -1,9 +1,8 @@ -package com.epri.fx.server.rest; +package com.fx.server.rest; -import com.epri.fx.server.entity.Menu; -import com.epri.fx.server.service.MenuService; -import com.epri.fx.server.vo.MenuVO; +import com.fx.server.service.MenuService; +import com.fx.server.vo.MenuVO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; diff --git a/falsework-sever/src/main/java/com/fx/server/rest/SysJobController.java b/falsework-sever/src/main/java/com/fx/server/rest/SysJobController.java new file mode 100644 index 0000000..bc125d8 --- /dev/null +++ b/falsework-sever/src/main/java/com/fx/server/rest/SysJobController.java @@ -0,0 +1,86 @@ +package com.fx.server.rest; + +import com.fx.server.entity.SysJob; +import com.fx.server.entity.log.SysJobLog; +import com.fx.server.msg.TableResultResponse; +import com.fx.server.service.log.SysJobLogService; +import com.fx.server.service.quartz.SysJobService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.Map; + +/** + * @description: + * @className: QuartzController + * @author: liwen + * @date: 2020/12/25 08:53 + */ +@RestController +@RequestMapping("job") +public class SysJobController { + @Autowired + private SysJobService sysJobService; + @Autowired + private SysJobLogService sysJobLogService; + + @GetMapping("/list") + @ResponseBody + public List getAllJob(String jobName, String jobGroup, String jobStatus) { + SysJob queryJob = new SysJob(); + queryJob.setJobName(jobName); + queryJob.setJobGroupName(jobGroup); + queryJob.setJobStatus(jobStatus); + return sysJobService.queryAllJob(jobName, jobGroup, jobStatus); + } + + @GetMapping("/log/list") + @ResponseBody + public TableResultResponse getAllJob(@RequestParam Map params) { + + return sysJobLogService.getPageList(params); + } + + @PostMapping("") + @ResponseBody + public Integer addJob(@RequestBody SysJob sysJob) { + + return sysJobService.addJob(sysJob); + } + + @PutMapping("") + @ResponseBody + public Integer updateJob(@RequestBody SysJob sysJob) { + + return sysJobService.updateJob(sysJob); + } + + @DeleteMapping("/{jobName}/{jobGroupName}") + @ResponseBody + public Integer deleteJob(@PathVariable("jobName") String jobName, @PathVariable("jobGroupName") String jobGroupName) { + + return sysJobService.deleteJob(jobName, jobGroupName); + } + + @PutMapping("pause/{jobName}/{jobGroupName}") + @ResponseBody + public Integer pauseJob(@PathVariable("jobName") String jobName, @PathVariable("jobGroupName") String jobGroupName) { + + return sysJobService.pauseJob(jobName, jobGroupName); + } + + @PutMapping("resume/{jobName}/{jobGroupName}") + @ResponseBody + public Integer resumeJob(@PathVariable("jobName") String jobName, @PathVariable("jobGroupName") String jobGroupName) { + + return sysJobService.resumeJob(jobName, jobGroupName); + } + + @PutMapping("run/{jobName}/{jobGroupName}") + @ResponseBody + public Integer runAJobNow(@PathVariable("jobName") String jobName, @PathVariable("jobGroupName") String jobGroupName) { + + return sysJobService.runAJobNow(jobName, jobGroupName); + } +} diff --git a/falsework-sever/src/main/java/com/fx/server/rest/SysLoginInfoController.java b/falsework-sever/src/main/java/com/fx/server/rest/SysLoginInfoController.java new file mode 100644 index 0000000..ec71c8b --- /dev/null +++ b/falsework-sever/src/main/java/com/fx/server/rest/SysLoginInfoController.java @@ -0,0 +1,29 @@ +package com.fx.server.rest; + +import com.fx.server.entity.log.SysLoginInfor; +import com.fx.server.msg.TableResultResponse; +import com.fx.server.service.log.SysLoginInfoService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Map; + +/** + * @description: + * @className: SysLoginInfoController + * @author: liwen + * @date: 2021/1/4 13:21 + */ +@RestController() +@RequestMapping("log/login") +public class SysLoginInfoController { + + @Autowired + private SysLoginInfoService sysLoginInfoService; + + @GetMapping("/list") + @ResponseBody + private TableResultResponse getSysloginInforList(@RequestParam Map params) { + return sysLoginInfoService.getPageList(params); + } +} diff --git a/falsework-sever/src/main/java/com/epri/fx/server/rest/UserController.java b/falsework-sever/src/main/java/com/fx/server/rest/UserController.java similarity index 72% rename from falsework-sever/src/main/java/com/epri/fx/server/rest/UserController.java rename to falsework-sever/src/main/java/com/fx/server/rest/UserController.java index 7e33e8f..14abd11 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/rest/UserController.java +++ b/falsework-sever/src/main/java/com/fx/server/rest/UserController.java @@ -1,18 +1,18 @@ -package com.epri.fx.server.rest; +package com.fx.server.rest; -import com.epri.fx.server.entity.User; -import com.epri.fx.server.entity.UserInfo; -import com.epri.fx.server.msg.ObjectRestResponse; -import com.epri.fx.server.msg.TableResultResponse; -import com.epri.fx.server.service.PermissionService; -import com.epri.fx.server.service.UserService; -import com.epri.fx.server.vo.FrontUser; -import com.epri.fx.server.vo.MenuVO; -import com.epri.fx.server.vo.PermissionInfo; -import com.epri.fx.server.vo.UserVO; +import com.fx.server.entity.User; +import com.fx.server.entity.UserInfo; +import com.fx.server.entity.log.SysLoginInfor; +import com.fx.server.msg.ObjectRestResponse; +import com.fx.server.msg.TableResultResponse; +import com.fx.server.service.PermissionService; +import com.fx.server.service.UserService; +import com.fx.server.vo.FrontUser; +import com.fx.server.vo.MenuVO; +import com.fx.server.vo.PermissionInfo; +import com.fx.server.websocket.WebSocketMessageHandler; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; import java.util.List; @@ -20,9 +20,7 @@ import java.util.Map; /** - * * @Description: - * * @param: * @return: * @auther: liwen @@ -36,6 +34,8 @@ public class UserController { @Autowired private PermissionService permissionService; + @Autowired + private WebSocketMessageHandler webSocketMessageHandler; @GetMapping(value = "/page") @ResponseBody @@ -44,12 +44,20 @@ public class UserController { return userService.getPageList(params); } + @GetMapping(value = "/online/list") + @ResponseBody + public List getOnlineUsers() { + + return webSocketMessageHandler.getOnlineUsers(); + } + @PutMapping("/{id}") @ResponseBody public ObjectRestResponse update(@PathVariable int id, @RequestBody User entity) { return userService.update(entity); } + @PutMapping("/password/{id}") @ResponseBody public ObjectRestResponse restPasswrod(@PathVariable Integer id) { @@ -65,6 +73,14 @@ public class UserController { return userService.add(entity); } + @PostMapping("/retreat/{userId}") + @ResponseBody + public ObjectRestResponse retreat(@PathVariable("userId") String userId) { + + + return new ObjectRestResponse().rel(webSocketMessageHandler.retreat(userId)); + } + @DeleteMapping("/{id}") @ResponseBody @@ -107,4 +123,5 @@ public class UserController { return permissionService.getMenusByUsername(token); } + } diff --git a/falsework-sever/src/main/java/com/epri/fx/server/runner/AuthServerRunner.java b/falsework-sever/src/main/java/com/fx/server/runner/AuthServerRunner.java similarity index 86% rename from falsework-sever/src/main/java/com/epri/fx/server/runner/AuthServerRunner.java rename to falsework-sever/src/main/java/com/fx/server/runner/AuthServerRunner.java index 8aa512f..6b2cf7c 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/runner/AuthServerRunner.java +++ b/falsework-sever/src/main/java/com/fx/server/runner/AuthServerRunner.java @@ -1,10 +1,9 @@ -package com.epri.fx.server.runner; +package com.fx.server.runner; -import com.epri.fx.server.config.KeyConfiguration; -import com.epri.fx.server.config.UserAuthConfig; -import com.epri.fx.server.entity.RsaKey; -import com.epri.fx.server.jwt.RsaKeyHelper; -import com.epri.fx.server.service.RsaKeyService; +import com.fx.server.config.KeyConfiguration; +import com.fx.server.config.UserAuthConfig; +import com.fx.server.jwt.RsaKeyHelper; +import com.fx.server.service.RsaKeyService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.CommandLineRunner; import org.springframework.context.annotation.Configuration; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/service/ElementService.java b/falsework-sever/src/main/java/com/fx/server/service/ElementService.java similarity index 85% rename from falsework-sever/src/main/java/com/epri/fx/server/service/ElementService.java rename to falsework-sever/src/main/java/com/fx/server/service/ElementService.java index ff19aef..0f984ed 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/service/ElementService.java +++ b/falsework-sever/src/main/java/com/fx/server/service/ElementService.java @@ -1,9 +1,9 @@ -package com.epri.fx.server.service; +package com.fx.server.service; -import com.epri.fx.server.entity.Element; -import com.epri.fx.server.mapper.ElementMapper; -import com.epri.fx.server.msg.TableResultResponse; -import com.epri.fx.server.util.EntityUtils; +import com.fx.server.entity.Element; +import com.fx.server.mapper.ElementMapper; +import com.fx.server.msg.TableResultResponse; +import com.fx.server.util.EntityUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/service/GroupService.java b/falsework-sever/src/main/java/com/fx/server/service/GroupService.java similarity index 93% rename from falsework-sever/src/main/java/com/epri/fx/server/service/GroupService.java rename to falsework-sever/src/main/java/com/fx/server/service/GroupService.java index 86f2389..37e8522 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/service/GroupService.java +++ b/falsework-sever/src/main/java/com/fx/server/service/GroupService.java @@ -1,16 +1,16 @@ -package com.epri.fx.server.service; +package com.fx.server.service; -import com.epri.fx.server.constant.AdminCommonConstant; -import com.epri.fx.server.entity.Element; -import com.epri.fx.server.entity.Group; -import com.epri.fx.server.entity.Menu; -import com.epri.fx.server.entity.ResourceAuthority; -import com.epri.fx.server.mapper.*; -import com.epri.fx.server.util.EntityUtils; -import com.epri.fx.server.vo.ElementVO; -import com.epri.fx.server.vo.GroupUsers; -import com.epri.fx.server.vo.GroupVO; -import com.epri.fx.server.vo.MenuVO; +import com.fx.server.constant.AdminCommonConstant; +import com.fx.server.entity.Element; +import com.fx.server.entity.Group; +import com.fx.server.entity.Menu; +import com.fx.server.entity.ResourceAuthority; +import com.fx.server.mapper.*; +import com.fx.server.util.EntityUtils; +import com.fx.server.vo.ElementVO; +import com.fx.server.vo.GroupUsers; +import com.fx.server.vo.GroupVO; +import com.fx.server.vo.MenuVO; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -19,7 +19,6 @@ import org.springframework.util.StringUtils; import java.util.ArrayList; import java.util.List; import java.util.Map; -import java.util.Set; import java.util.stream.Collectors; /** diff --git a/falsework-sever/src/main/java/com/epri/fx/server/service/GroupTypeService.java b/falsework-sever/src/main/java/com/fx/server/service/GroupTypeService.java similarity index 88% rename from falsework-sever/src/main/java/com/epri/fx/server/service/GroupTypeService.java rename to falsework-sever/src/main/java/com/fx/server/service/GroupTypeService.java index ea89304..f175c1f 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/service/GroupTypeService.java +++ b/falsework-sever/src/main/java/com/fx/server/service/GroupTypeService.java @@ -1,9 +1,9 @@ -package com.epri.fx.server.service; +package com.fx.server.service; -import com.epri.fx.server.entity.GroupType; -import com.epri.fx.server.mapper.GroupTypeMapper; -import com.epri.fx.server.util.EntityUtils; -import com.epri.fx.server.vo.GroupTypeVO; +import com.fx.server.entity.GroupType; +import com.fx.server.mapper.GroupTypeMapper; +import com.fx.server.util.EntityUtils; +import com.fx.server.vo.GroupTypeVO; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/service/MenuService.java b/falsework-sever/src/main/java/com/fx/server/service/MenuService.java similarity index 80% rename from falsework-sever/src/main/java/com/epri/fx/server/service/MenuService.java rename to falsework-sever/src/main/java/com/fx/server/service/MenuService.java index c14398b..4d0da30 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/service/MenuService.java +++ b/falsework-sever/src/main/java/com/fx/server/service/MenuService.java @@ -1,24 +1,19 @@ -package com.epri.fx.server.service; +package com.fx.server.service; -import com.epri.fx.server.constant.AdminCommonConstant; -import com.epri.fx.server.entity.Element; -import com.epri.fx.server.entity.Menu; -import com.epri.fx.server.entity.ResourceAuthority; -import com.epri.fx.server.mapper.ElementMapper; -import com.epri.fx.server.mapper.MenuMapper; -import com.epri.fx.server.mapper.ResourceAuthorityMapper; -import com.epri.fx.server.util.EntityUtils; -import com.epri.fx.server.vo.ElementVO; -import com.epri.fx.server.vo.GroupVO; -import com.epri.fx.server.vo.MenuVO; +import com.fx.server.constant.AdminCommonConstant; +import com.fx.server.entity.Menu; +import com.fx.server.mapper.ElementMapper; +import com.fx.server.mapper.MenuMapper; +import com.fx.server.mapper.ResourceAuthorityMapper; +import com.fx.server.util.EntityUtils; +import com.fx.server.vo.ElementVO; +import com.fx.server.vo.MenuVO; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; /** * @description: diff --git a/falsework-sever/src/main/java/com/epri/fx/server/service/PermissionService.java b/falsework-sever/src/main/java/com/fx/server/service/PermissionService.java similarity index 91% rename from falsework-sever/src/main/java/com/epri/fx/server/service/PermissionService.java rename to falsework-sever/src/main/java/com/fx/server/service/PermissionService.java index dacd8fc..6422186 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/service/PermissionService.java +++ b/falsework-sever/src/main/java/com/fx/server/service/PermissionService.java @@ -1,17 +1,17 @@ -package com.epri.fx.server.service; +package com.fx.server.service; -import com.epri.fx.server.constant.AdminCommonConstant; -import com.epri.fx.server.constant.CommonConstants; -import com.epri.fx.server.entity.Element; -import com.epri.fx.server.entity.Menu; -import com.epri.fx.server.entity.User; -import com.epri.fx.server.entity.UserInfo; -import com.epri.fx.server.jwt.UserAuthUtil; -import com.epri.fx.server.util.EncryptUtil; -import com.epri.fx.server.vo.FrontUser; -import com.epri.fx.server.vo.GroupVO; -import com.epri.fx.server.vo.MenuVO; -import com.epri.fx.server.vo.PermissionInfo; +import com.fx.server.constant.AdminCommonConstant; +import com.fx.server.constant.CommonConstants; +import com.fx.server.entity.Element; +import com.fx.server.entity.Menu; +import com.fx.server.entity.User; +import com.fx.server.entity.UserInfo; +import com.fx.server.jwt.UserAuthUtil; +import com.fx.server.util.EncryptUtil; +import com.fx.server.vo.FrontUser; +import com.fx.server.vo.GroupVO; +import com.fx.server.vo.MenuVO; +import com.fx.server.vo.PermissionInfo; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/service/RsaKeyService.java b/falsework-sever/src/main/java/com/fx/server/service/RsaKeyService.java similarity index 86% rename from falsework-sever/src/main/java/com/epri/fx/server/service/RsaKeyService.java rename to falsework-sever/src/main/java/com/fx/server/service/RsaKeyService.java index 211042d..13389e4 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/service/RsaKeyService.java +++ b/falsework-sever/src/main/java/com/fx/server/service/RsaKeyService.java @@ -1,7 +1,7 @@ -package com.epri.fx.server.service; +package com.fx.server.service; -import com.epri.fx.server.entity.RsaKey; -import com.epri.fx.server.mapper.RsaKeyMapper; +import com.fx.server.entity.RsaKey; +import com.fx.server.mapper.RsaKeyMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/service/UserService.java b/falsework-sever/src/main/java/com/fx/server/service/UserService.java similarity index 78% rename from falsework-sever/src/main/java/com/epri/fx/server/service/UserService.java rename to falsework-sever/src/main/java/com/fx/server/service/UserService.java index 9d95921..772f968 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/service/UserService.java +++ b/falsework-sever/src/main/java/com/fx/server/service/UserService.java @@ -1,26 +1,20 @@ -package com.epri.fx.server.service; +package com.fx.server.service; import com.alibaba.druid.util.StringUtils; -import com.epri.fx.server.constant.UserConstant; -import com.epri.fx.server.entity.Menu; -import com.epri.fx.server.entity.User; -import com.epri.fx.server.entity.UserInfo; -import com.epri.fx.server.mapper.MenuMapper; -import com.epri.fx.server.mapper.UserMapper; -import com.epri.fx.server.msg.ObjectRestResponse; -import com.epri.fx.server.msg.TableResultResponse; -import com.epri.fx.server.util.EntityUtils; -import com.epri.fx.server.util.Query; -import com.epri.fx.server.util.user.JwtAuthenticationRequest; -import com.epri.fx.server.vo.UserVO; +import com.fx.server.constant.UserConstant; +import com.fx.server.entity.User; +import com.fx.server.entity.UserInfo; +import com.fx.server.mapper.UserMapper; +import com.fx.server.msg.ObjectRestResponse; +import com.fx.server.msg.TableResultResponse; +import com.fx.server.util.EntityUtils; +import com.fx.server.util.Query; +import com.fx.server.util.user.JwtAuthenticationRequest; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; -import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.stereotype.Service; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestParam; import java.util.List; import java.util.Map; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/service/log/GateLogService.java b/falsework-sever/src/main/java/com/fx/server/service/log/GateLogService.java similarity index 82% rename from falsework-sever/src/main/java/com/epri/fx/server/service/log/GateLogService.java rename to falsework-sever/src/main/java/com/fx/server/service/log/GateLogService.java index 408f9a9..db07483 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/service/log/GateLogService.java +++ b/falsework-sever/src/main/java/com/fx/server/service/log/GateLogService.java @@ -1,12 +1,12 @@ -package com.epri.fx.server.service.log; +package com.fx.server.service.log; import com.alibaba.druid.util.StringUtils; -import com.epri.fx.server.entity.log.GateLog; -import com.epri.fx.server.entity.log.LogInfo; -import com.epri.fx.server.mapper.GateLogMapper; -import com.epri.fx.server.msg.ObjectRestResponse; -import com.epri.fx.server.msg.TableResultResponse; -import com.epri.fx.server.util.Query; +import com.fx.server.entity.log.GateLog; +import com.fx.server.entity.log.LogInfo; +import com.fx.server.mapper.GateLogMapper; +import com.fx.server.msg.ObjectRestResponse; +import com.fx.server.msg.TableResultResponse; +import com.fx.server.util.Query; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; import org.springframework.beans.BeanUtils; diff --git a/falsework-sever/src/main/java/com/fx/server/service/log/SysJobLogService.java b/falsework-sever/src/main/java/com/fx/server/service/log/SysJobLogService.java new file mode 100644 index 0000000..363f05e --- /dev/null +++ b/falsework-sever/src/main/java/com/fx/server/service/log/SysJobLogService.java @@ -0,0 +1,38 @@ +package com.fx.server.service.log; + +import com.fx.server.entity.log.SysJobLog; +import com.fx.server.mapper.SysJobLogMapper; +import com.fx.server.msg.TableResultResponse; +import com.fx.server.util.Query; +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; + +/** + * @description: + * @className: SysJobLogServer + * @author: liwen + * @date: 2020/12/28 16:37 + */ +@Service +public class SysJobLogService { + @Autowired + private SysJobLogMapper sysJobLogMapper; + + public void addSysJobLog(SysJobLog sysJobLog) { + sysJobLogMapper.insert(sysJobLog); + } + + public TableResultResponse getPageList(Map params) { + + Query query = new Query(params); + Page page = PageHelper.startPage(query.getPage(), query.getLimit()); + List list = sysJobLogMapper.selectPage(params); + int total = (int) Math.ceil(page.getTotal() / (float) query.getLimit()); + return new TableResultResponse(total == 0 ? 1 : total, list); + } +} diff --git a/falsework-sever/src/main/java/com/fx/server/service/log/SysLoginInfoService.java b/falsework-sever/src/main/java/com/fx/server/service/log/SysLoginInfoService.java new file mode 100644 index 0000000..a026270 --- /dev/null +++ b/falsework-sever/src/main/java/com/fx/server/service/log/SysLoginInfoService.java @@ -0,0 +1,38 @@ +package com.fx.server.service.log; + +import com.fx.server.entity.log.SysLoginInfor; +import com.fx.server.mapper.SysLoginInforMapper; +import com.fx.server.msg.TableResultResponse; +import com.fx.server.util.Query; +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; + +/** + * @description: + * @className: SysJobLogServer + * @author: liwen + * @date: 2020/12/28 16:37 + */ +@Service +public class SysLoginInfoService { + @Autowired + private SysLoginInforMapper sysLoginInforMapper; + + public int addSysJobLog(SysLoginInfor sysLoginInfor) { + return sysLoginInforMapper.insertSelective(sysLoginInfor); + } + + public TableResultResponse getPageList(Map params) { + + Query query = new Query(params); + Page page = PageHelper.startPage(query.getPage(), query.getLimit()); + List list = sysLoginInforMapper.selectPage(params); + int total = (int) Math.ceil(page.getTotal() / (float) query.getLimit()); + return new TableResultResponse(total == 0 ? 1 : total, list); + } +} diff --git a/falsework-sever/src/main/java/com/fx/server/service/quartz/SysJobService.java b/falsework-sever/src/main/java/com/fx/server/service/quartz/SysJobService.java new file mode 100644 index 0000000..8c50b87 --- /dev/null +++ b/falsework-sever/src/main/java/com/fx/server/service/quartz/SysJobService.java @@ -0,0 +1,287 @@ +package com.fx.server.service.quartz; + +import com.fx.server.constant.CommonConstants; +import com.fx.server.entity.SysJob; +import org.apache.commons.lang3.StringUtils; +import org.quartz.*; +import org.quartz.impl.matchers.GroupMatcher; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import javax.annotation.PostConstruct; +import java.util.*; + +@Service +public class SysJobService { + @Autowired + private Scheduler scheduler; + + @PostConstruct + public void startScheduler() { + + try { + scheduler.start(); + } catch (SchedulerException e) { + e.printStackTrace(); + } + } + + /** + * 增加一个job + * + * @param jobClass 任务实现类 + * @param jobName 任务名称 + * @param jobGroupName 任务组名 + * @param jobTime 时间表达式 (这是每隔多少秒为一次任务) + * @param jobTimes 运行的次数 (<0:表示不限次数) + * @param jobData 参数 + */ + public void addJob(Class jobClass, String jobName, String jobGroupName, int jobTime, + int jobTimes, Map jobData) { + try { + // 任务名称和组构成任务key + JobDetail jobDetail = JobBuilder.newJob(jobClass).withIdentity(jobName, jobGroupName) + .build(); + // 设置job参数 + if (jobData != null && jobData.size() > 0) { + jobDetail.getJobDataMap().putAll(jobData); + } + // 使用simpleTrigger规则 + Trigger trigger = null; + if (jobTimes < 0) { + trigger = TriggerBuilder.newTrigger().withIdentity(jobName, jobGroupName) + .withSchedule(SimpleScheduleBuilder.repeatSecondlyForever(1).withIntervalInSeconds(jobTime)) + .startNow().build(); + } else { + trigger = TriggerBuilder + .newTrigger().withIdentity(jobName, jobGroupName).withSchedule(SimpleScheduleBuilder + .repeatSecondlyForever(1).withIntervalInSeconds(jobTime).withRepeatCount(jobTimes)) + .startNow().build(); + } + scheduler.scheduleJob(jobDetail, trigger); + } catch (SchedulerException e) { + e.printStackTrace(); + } + } + + /** + * 增加一个job + */ + public Integer addJob(SysJob sysJob) { + try { + // 创建jobDetail实例,绑定Job实现类 + // 指明job的名称,所在组的名称,以及绑定job类 + // 任务名称和组构成任务key + JobDetail jobDetail = JobBuilder.newJob((Class) Class.forName(sysJob.getJobClass())).withIdentity(sysJob.getJobName(), sysJob.getJobGroupName()) + .build(); + jobDetail.getJobDataMap().put(CommonConstants.TASK_PROPERTIES, sysJob); + + // 设置job参数 + if (StringUtils.isNotBlank(sysJob.getParames())) { + jobDetail.getJobDataMap().put(CommonConstants.TASK_PARAMETERS, sysJob.getParames()); + } + // 定义调度触发规则 + // 使用cornTrigger规则 + // 触发器key + Trigger trigger = TriggerBuilder.newTrigger().withIdentity(sysJob.getJobName(), sysJob.getJobGroupName()).withDescription(sysJob.getDescription()) + .startAt(DateBuilder.futureDate(1, DateBuilder.IntervalUnit.SECOND)) + .withSchedule(CronScheduleBuilder.cronSchedule(sysJob.getJobTime())).startNow().build(); + // 把作业和触发器注册到任务调度中 + scheduler.scheduleJob(jobDetail, trigger); + return 0; + } catch (Exception e) { + e.printStackTrace(); + return -1; + } + } + + /** + * 修改 一个job的 时间表达式 + */ + public Integer updateJob(SysJob sysJob) { + try { + TriggerKey triggerKey = TriggerKey.triggerKey(sysJob.getJobName(), sysJob.getJobGroupName()); + CronTrigger trigger = (CronTrigger) scheduler.getTrigger(triggerKey); + trigger = trigger.getTriggerBuilder().withIdentity(triggerKey) + .withSchedule(CronScheduleBuilder.cronSchedule(sysJob.getJobTime())).withDescription(sysJob.getDescription()).build(); + JobKey jobKey = JobKey.jobKey(sysJob.getJobName(), sysJob.getJobGroupName()); + JobDetail jobDetail = scheduler.getJobDetail(jobKey); + + // 设置job参数 + if (StringUtils.isNotBlank(sysJob.getParames())) { + jobDetail.getJobDataMap().put(CommonConstants.TASK_PARAMETERS, sysJob.getParames()); + } + + // 重启触发器 + scheduler.rescheduleJob(triggerKey, trigger); + + return 0; + } catch (SchedulerException e) { + e.printStackTrace(); + return -1; + } + } + + /** + * 删除任务一个job + * + * @param jobName 任务名称 + * @param jobGroupName 任务组名 + */ + public Integer deleteJob(String jobName, String jobGroupName) { + try { + scheduler.deleteJob(new JobKey(jobName, jobGroupName)); + return 0; + } catch (Exception e) { + e.printStackTrace(); + return -1; + } + } + + /** + * 暂停一个job + * + * @param jobName + * @param jobGroupName + */ + public Integer pauseJob(String jobName, String jobGroupName) { + try { + JobKey jobKey = JobKey.jobKey(jobName, jobGroupName); + scheduler.pauseJob(jobKey); + return 0; + } catch (SchedulerException e) { + e.printStackTrace(); + return -1; + } + } + + /** + * 恢复一个job + * + * @param jobName + * @param jobGroupName + */ + public Integer resumeJob(String jobName, String jobGroupName) { + try { + JobKey jobKey = JobKey.jobKey(jobName, jobGroupName); + scheduler.resumeJob(jobKey); + return 0; + } catch (SchedulerException e) { + e.printStackTrace(); + return -1; + } + } + + /** + * 立即执行一个job + * + * @param jobName + * @param jobGroupName + */ + public Integer runAJobNow(String jobName, String jobGroupName) { + try { + JobKey jobKey = JobKey.jobKey(jobName, jobGroupName); + scheduler.triggerJob(jobKey); + return 0; + } catch (SchedulerException e) { + e.printStackTrace(); + return -1; + } + } + + /** + * 获取所有计划中的任务列表 + * + * @return + */ + public List queryAllJob(String jobName,String jobGroup,String jobStatus) { + List jobList = null; + try { + GroupMatcher matcher = GroupMatcher.anyJobGroup(); + Set jobKeys = scheduler.getJobKeys(matcher); + jobList = new ArrayList<>(); + for (JobKey jobKey : jobKeys) { + List triggers = scheduler.getTriggersOfJob(jobKey); + for (Trigger trigger : triggers) { + + SysJob sysJob = new SysJob(); + sysJob.setJobName(jobKey.getName()); + sysJob.setJobClass(scheduler.getJobDetail(trigger.getJobKey()).getJobClass().getName()); + sysJob.setJobGroupName(jobKey.getGroup()); + sysJob.setDescription(trigger.getDescription()); + sysJob.setParames(scheduler.getJobDetail(trigger.getJobKey()).getJobDataMap().getString(CommonConstants.TASK_PARAMETERS)); + Trigger.TriggerState triggerState = scheduler.getTriggerState(trigger.getKey()); + sysJob.setJobStatus(triggerState.name()); + if (trigger instanceof CronTrigger) { + CronTrigger cronTrigger = (CronTrigger) trigger; + String cronExpression = cronTrigger.getCronExpression(); + sysJob.setJobTime(cronExpression); + } + + boolean a = false; + boolean b = false; + boolean c = false; + if (StringUtils.isBlank(jobName)) { + a = true; + } else { + a = jobKey.getName().toLowerCase().contains(jobName); + } + if (StringUtils.isBlank(jobGroup)) { + b = true; + } else { + b = jobKey.getGroup().equalsIgnoreCase(jobGroup); + } + if (StringUtils.isBlank(jobStatus)) { + c = true; + } else { + c = triggerState.name().equalsIgnoreCase(jobStatus); + } + if (a && b && c) { + jobList.add(sysJob); + + } + } + } + } catch (SchedulerException e) { + e.printStackTrace(); + } + return jobList; + } + + /** + * 获取所有正在运行的job + * + * @return + */ + public List queryRunJob() { + List jobList = null; + try { + List executingJobs = scheduler.getCurrentlyExecutingJobs(); + jobList = new ArrayList<>(executingJobs.size()); + for (JobExecutionContext executingJob : executingJobs) { + SysJob sysJob = new SysJob(); + JobDetail jobDetail = executingJob.getJobDetail(); + JobKey jobKey = jobDetail.getKey(); + Trigger trigger = executingJob.getTrigger(); + sysJob.setJobName(jobKey.getName()); + sysJob.setJobGroupName(jobKey.getGroup()); + sysJob.setDescription("触发器:" + trigger.getKey()); + sysJob.setJobClass(scheduler.getJobDetail(trigger.getJobKey()).getJobClass().toString()); + + sysJob.setParames(scheduler.getJobDetail(trigger.getJobKey()).getJobDataMap().getString(CommonConstants.TASK_PARAMETERS)); + + Trigger.TriggerState triggerState = scheduler.getTriggerState(trigger.getKey()); + sysJob.setJobStatus(triggerState.name()); + if (trigger instanceof CronTrigger) { + CronTrigger cronTrigger = (CronTrigger) trigger; + String cronExpression = cronTrigger.getCronExpression(); + sysJob.setJobTime(cronExpression); + } + jobList.add(sysJob); + } + } catch (SchedulerException e) { + e.printStackTrace(); + } + return jobList; + } +} diff --git a/falsework-sever/src/main/java/com/epri/fx/server/service/security/auth/AuthService.java b/falsework-sever/src/main/java/com/fx/server/service/security/auth/AuthService.java similarity index 66% rename from falsework-sever/src/main/java/com/epri/fx/server/service/security/auth/AuthService.java rename to falsework-sever/src/main/java/com/fx/server/service/security/auth/AuthService.java index 533b2cf..ab6fa71 100755 --- a/falsework-sever/src/main/java/com/epri/fx/server/service/security/auth/AuthService.java +++ b/falsework-sever/src/main/java/com/fx/server/service/security/auth/AuthService.java @@ -1,7 +1,7 @@ -package com.epri.fx.server.service.security.auth; +package com.fx.server.service.security.auth; -import com.epri.fx.server.util.user.JwtAuthenticationRequest; +import com.fx.server.util.user.JwtAuthenticationRequest; public interface AuthService { String login(JwtAuthenticationRequest authenticationRequest) throws Exception; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/service/security/auth/impl/AuthServiceImpl.java b/falsework-sever/src/main/java/com/fx/server/service/security/auth/impl/AuthServiceImpl.java similarity index 74% rename from falsework-sever/src/main/java/com/epri/fx/server/service/security/auth/impl/AuthServiceImpl.java rename to falsework-sever/src/main/java/com/fx/server/service/security/auth/impl/AuthServiceImpl.java index 761e85a..b519ed1 100755 --- a/falsework-sever/src/main/java/com/epri/fx/server/service/security/auth/impl/AuthServiceImpl.java +++ b/falsework-sever/src/main/java/com/fx/server/service/security/auth/impl/AuthServiceImpl.java @@ -1,12 +1,12 @@ -package com.epri.fx.server.service.security.auth.impl; +package com.fx.server.service.security.auth.impl; -import com.epri.fx.server.entity.UserInfo; -import com.epri.fx.server.exception.auth.UserInvalidException; -import com.epri.fx.server.jwt.JWTInfo; -import com.epri.fx.server.service.security.auth.AuthService; -import com.epri.fx.server.service.UserService; -import com.epri.fx.server.util.user.JwtAuthenticationRequest; -import com.epri.fx.server.util.user.JwtTokenUtil; +import com.fx.server.entity.UserInfo; +import com.fx.server.exception.auth.UserInvalidException; +import com.fx.server.jwt.JWTInfo; +import com.fx.server.service.security.auth.AuthService; +import com.fx.server.service.UserService; +import com.fx.server.util.user.JwtAuthenticationRequest; +import com.fx.server.util.user.JwtTokenUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.StringUtils; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/util/ClientUtil.java b/falsework-sever/src/main/java/com/fx/server/util/ClientUtil.java similarity index 94% rename from falsework-sever/src/main/java/com/epri/fx/server/util/ClientUtil.java rename to falsework-sever/src/main/java/com/fx/server/util/ClientUtil.java index 968f504..a4cb1c2 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/util/ClientUtil.java +++ b/falsework-sever/src/main/java/com/fx/server/util/ClientUtil.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.util; +package com.fx.server.util; import javax.servlet.http.HttpServletRequest; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/util/DBLog.java b/falsework-sever/src/main/java/com/fx/server/util/DBLog.java similarity index 94% rename from falsework-sever/src/main/java/com/epri/fx/server/util/DBLog.java rename to falsework-sever/src/main/java/com/fx/server/util/DBLog.java index fd4af93..6a27502 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/util/DBLog.java +++ b/falsework-sever/src/main/java/com/fx/server/util/DBLog.java @@ -1,8 +1,8 @@ -package com.epri.fx.server.util; +package com.fx.server.util; -import com.epri.fx.server.entity.log.LogInfo; -import com.epri.fx.server.service.log.GateLogService; +import com.fx.server.entity.log.LogInfo; +import com.fx.server.service.log.GateLogService; import lombok.extern.slf4j.Slf4j; import java.util.ArrayList; diff --git a/falsework-sever/src/main/java/com/fx/server/util/DateUtils.java b/falsework-sever/src/main/java/com/fx/server/util/DateUtils.java new file mode 100644 index 0000000..7301b09 --- /dev/null +++ b/falsework-sever/src/main/java/com/fx/server/util/DateUtils.java @@ -0,0 +1,514 @@ +package com.fx.server.util; + +import java.text.DecimalFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; + +import org.apache.commons.lang3.time.DateFormatUtils; + +public class DateUtils { + + /** + * 仅显示年月日,例如 2015-08-11. + */ + public static final String DATE_FORMAT = "yyyy-MM-dd"; + /** + * 显示年月日时分秒,例如 2015-08-11 09:51:53. + */ + public static final String DATETIME_FORMAT = "yyyy-MM-dd HH:mm:ss"; + + /** + * 仅显示时分秒,例如 09:51:53. + */ + public static final String TIME_FORMAT = "HH:mm:ss"; + + /** + * 每天的毫秒数 8640000. + */ + public static final long MILLISECONDS_PER_DAY = 86400000L; + + /** + * 每周的天数. + */ + public static final long DAYS_PER_WEEK = 7L; + + /** + * 每小时毫秒数. + */ + public static final long MILLISECONDS_PER_HOUR = 3600000L; + + /** + * 每分钟秒数. + */ + public static final long SECONDS_PER_MINUTE = 60L; + + /** + * 每小时秒数. + */ + public static final long SECONDS_PER_HOUR = 3600L; + + /** + * 每天秒数. + */ + public static final long SECONDS_PER_DAY = 86400L; + + /** + * 每个月秒数,默认每月30天. + */ + public static final long SECONDS_PER_MONTH = 2592000L; + + /** + * 每年秒数,默认每年365天. + */ + public static final long SECONDS_PER_YEAR = 31536000L; + + /** + * 常用的时间格式. + */ + private static String[] parsePatterns = {"yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy/MM/dd", + "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm"}; + + /** + * 得到当前日期字符串. + * + * @return String 日期字符串,例如2015-08-11 + * @since 1.0 + */ + public static String getDate() { + return getDate(DateUtils.DATE_FORMAT); + } + + /** + * 得到当前时间字符串. + * + * @return String 时间字符串,例如 09:51:53 + * @since 1.0 + */ + public static String getTime() { + return formatDate(new Date(), DateUtils.TIME_FORMAT); + } + + /** + * 得到当前日期和时间字符串. + * + * @return String 日期和时间字符串,例如 2015-08-11 09:51:53 + * @since 1.0 + */ + public static String getDateTime() { + return formatDate(new Date(), DateUtils.DATETIME_FORMAT); + } + + /** + * 获取当前时间指定格式下的字符串. + * + * @param pattern 转化后时间展示的格式,例如"yyyy-MM-dd","yyyy-MM-dd HH:mm:ss"等 + * @return String 格式转换之后的时间字符串. + * @since 1.0 + */ + public static String getDate(String pattern) { + return DateFormatUtils.format(new Date(), pattern); + } + + /** + * 获取指定日期的字符串格式. + * + * @param date 需要格式化的时间,不能为空 + * @param pattern 时间格式,例如"yyyy-MM-dd","yyyy-MM-dd HH:mm:ss"等 + * @return String 格式转换之后的时间字符串. + * @since 1.0 + */ + public static String getDate(Date date, String pattern) { + return DateFormatUtils.format(date, pattern); + } + + /** + * 获取日期时间字符串,默认格式为(yyyy-MM-dd). + * + * @param date 需要转化的日期时间 + * @param pattern 时间格式,例如"yyyy-MM-dd" "HH:mm:ss" "E"等 + * @return String 格式转换后的时间字符串 + * @since 1.0 + */ + public static String formatDate(Date date, Object... pattern) { + String formatDate = null; + if (pattern != null && pattern.length > 0) { + formatDate = DateFormatUtils.format(date, pattern[0].toString()); + } else { + formatDate = DateFormatUtils.format(date, DateUtils.DATE_FORMAT); + } + return formatDate; + } + + /** + * 获取当前年份字符串. + * + * @return String 当前年份字符串,例如 2015 + * @since 1.0 + */ + public static String getYear() { + return formatDate(new Date(), "yyyy"); + } + + /** + * 获取当前月份字符串. + * + * @return String 当前月份字符串,例如 08 + * @since 1.0 + */ + public static String getMonth() { + return formatDate(new Date(), "MM"); + } + + /** + * 获取当前天数字符串. + * + * @return String 当前天数字符串,例如 11 + * @since 1.0 + */ + public static String getDay() { + return formatDate(new Date(), "dd"); + } + + /** + * 获取当前星期字符串. + * + * @return String 当前星期字符串,例如星期二 + * @since 1.0 + */ + public static String getWeek() { + return formatDate(new Date(), "E"); + } + + /** + * 将日期型字符串转换为日期格式. + * 支持的日期字符串格式包括"yyyy-MM-dd","yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", + * "yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm" + * + * @param str + * @return Date + * @since 1.0 + */ + public static Date parseDate(Object str) { + if (str == null) { + return null; + } + try { + return org.apache.commons.lang3.time.DateUtils.parseDate(str.toString(), parsePatterns); + } catch (ParseException e) { + return null; + } + } + + /** + * 获取当前日期与指定日期相隔的天数. + * + * @param date 给定的日期 + * @return long 日期间隔天数,正数表示给定日期在当前日期之前,负数表示在当前日期之后 + * @since 1.0 + */ + public static long pastDays(Date date) { + // 将指定日期转换为yyyy-MM-dd格式 + date = DateUtils.parseDate(DateUtils.formatDate(date, DateUtils.DATE_FORMAT)); + // 当前日期转换为yyyy-MM-dd格式 + Date currentDate = DateUtils.parseDate(DateUtils.formatDate(new Date(), DateUtils.DATE_FORMAT)); + long t = 0; + if (date != null && currentDate != null) { + t = (currentDate.getTime() - date.getTime()) / DateUtils.MILLISECONDS_PER_DAY; + } + return t; + } + + /** + * 获取当前日期指定天数之后的日期. + * + * @param num 相隔天数 + * @return Date 日期 + * @since 1.0 + */ + public static Date nextDay(int num) { + Calendar curr = Calendar.getInstance(); + curr.set(Calendar.DAY_OF_MONTH, curr.get(Calendar.DAY_OF_MONTH) + num); + return curr.getTime(); + } + + /** + * 获取当前日期指定月数之后的日期. + * + * @param num 间隔月数 + * @return Date 日期 + * @since 1.0 + */ + public static Date nextMonth(int num) { + Calendar curr = Calendar.getInstance(); + curr.set(Calendar.MONTH, curr.get(Calendar.MONTH) + num); + return curr.getTime(); + } + + /** + * 获取当前日期指定年数之后的日期. + * + * @param num 间隔年数 + * @return Date 日期 + * @since 1.0 + */ + public static Date nextYear(int num) { + Calendar curr = Calendar.getInstance(); + curr.set(Calendar.YEAR, curr.get(Calendar.YEAR) + num); + return curr.getTime(); + } + + /** + * 将 Date 日期转化为 Calendar 类型日期. + * + * @param date 给定的时间,若为null,则默认为当前时间 + * @return Calendar Calendar对象 + * @since 1.0 + */ + public static Calendar getCalendar(Date date) { + Calendar calendar = Calendar.getInstance(); + // calendar.setFirstDayOfWeek(Calendar.SUNDAY);//每周从周日开始 + // calendar.setMinimalDaysInFirstWeek(1); // 设置每周最少为1天 + if (date != null) { + calendar.setTime(date); + } + return calendar; + } + + /** + * 计算两个日期之间相差天数. + * + * @param start 计算开始日期 + * @param end 计算结束日期 + * @return long 相隔天数 + * @since 1.0 + */ + public static long getDaysBetween(Date start, Date end) { + // 将指定日期转换为yyyy-MM-dd格式 + start = DateUtils.parseDate(DateUtils.formatDate(start, DateUtils.DATE_FORMAT)); + // 当前日期转换为yyyy-MM-dd格式 + end = DateUtils.parseDate(DateUtils.formatDate(end, DateUtils.DATE_FORMAT)); + + long diff = 0; + if (start != null && end != null) { + diff = (end.getTime() - start.getTime()) / DateUtils.MILLISECONDS_PER_DAY; + } + return diff; + } + + /** + * 计算两个日期之前相隔多少周. + * + * @param start 计算开始时间 + * @param end 计算结束时间 + * @return long 相隔周数,向下取整 + * @since 1.0 + */ + public static long getWeeksBetween(Date start, Date end) { + return getDaysBetween(start, end) / DateUtils.DAYS_PER_WEEK; + } + + /** + * 获取与指定日期间隔给定天数的日期. + * + * @param specifiedDay 给定的字符串格式日期,支持的日期字符串格式包括"yyyy-MM-dd","yyyy-MM-dd HH:mm:ss", + * "yyyy-MM-dd HH:mm", "yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", + * "yyyy/MM/dd HH:mm" + * @param num 间隔天数 + * @return String 间隔指定天数之后的日期 + * @since 1.0 + */ + public static String getSpecifiedDayAfter(String specifiedDay, int num) { + Date specifiedDate = parseDate(specifiedDay); + Calendar c = Calendar.getInstance(); + c.setTime(specifiedDate); + int day = c.get(Calendar.DATE); + c.set(Calendar.DATE, day + num); + String dayAfter = formatDate(c.getTime(), DateUtils.DATE_FORMAT); + return dayAfter; + } + + /** + * 计算两个日期之前间隔的小时数. + * + * @param date1 结束时间 + * @param date2 开始时间 + * @return String 相差的小时数,保留一位小数 + * @since 1.0 + */ + public static String dateMinus(Date date1, Date date2) { + if (date1 == null || date2 == null) { + return "0"; + } + Long r = date1.getTime() - date2.getTime(); + DecimalFormat df = new DecimalFormat("#.0"); + double result = r * 1.0 / DateUtils.MILLISECONDS_PER_HOUR; + return df.format(result); + } + + /** + * 获取当前季度 . + * + * @return Integer 当前季度数 + * @since 1.0 + */ + public static Integer getCurrentSeason() { + Calendar calendar = Calendar.getInstance(); + Integer month = calendar.get(Calendar.MONTH) + 1; + int season = 0; + if (month >= 1 && month <= 3) { + season = 1; + } else if (month >= 4 && month <= 6) { + season = 2; + } else if (month >= 7 && month <= 9) { + season = 3; + } else if (month >= 10 && month <= 12) { + season = 4; + } + return season; + } + + /** + * 将以秒为单位的时间转换为其他单位. + * + * @param seconds 秒数 + * @return String 例如 16分钟前、2小时前、3天前、4月前、5年前等 + * @since 1.0 + */ + public static String getIntervalBySeconds(long seconds) { + StringBuffer buffer = new StringBuffer(); + if (seconds < SECONDS_PER_MINUTE) { + buffer.append(seconds).append("秒前"); + } else if (seconds < SECONDS_PER_HOUR) { + buffer.append(seconds / SECONDS_PER_MINUTE).append("分钟前"); + } else if (seconds < SECONDS_PER_DAY) { + buffer.append(seconds / SECONDS_PER_HOUR).append("小时前"); + } else if (seconds < SECONDS_PER_MONTH) { + buffer.append(seconds / SECONDS_PER_DAY).append("天前"); + } else if (seconds < SECONDS_PER_YEAR) { + buffer.append(seconds / SECONDS_PER_MONTH).append("月前"); + } else { + buffer.append(seconds / DateUtils.SECONDS_PER_YEAR).append("年前"); + } + return buffer.toString(); + } + + /** + * getNowTimeBefore(记录时间相当于目前多久之前) + * + * @param seconds 秒 + * @return + * @throws @since 1.0 + * @author rlliu + */ + public static String getNowTimeBefore(long seconds) { + StringBuffer buffer = new StringBuffer(); + buffer.append("上传于"); + if (seconds < 3600) { + buffer.append((long) Math.floor(seconds / 60.0)).append("分钟前"); + } else if (seconds < 86400) { + buffer.append((long) Math.floor(seconds / 3600.0)).append("小时前"); + } else if (seconds < 604800) { + buffer.append((long) Math.floor(seconds / 86400.0)).append("天前"); + } else if (seconds < 2592000) { + buffer.append((long) Math.floor(seconds / 604800.0)).append("周前"); + } else if (seconds < 31104000) { + buffer.append((long) Math.floor(seconds / 2592000.0)).append("月前"); + } else { + buffer.append((long) Math.floor(seconds / 31104000.0)).append("年前"); + } + return buffer.toString(); + } + + /** + * getMonthsBetween(查询两个日期相隔的月份) + * + * @param startDate 开始日期1 (格式yyyy-MM-dd) + * @param endDate 截止日期2 (格式yyyy-MM-dd) + * @return + */ + public static int getMonthsBetween(String startDate, String endDate) { + Calendar c1 = Calendar.getInstance(); + Calendar c2 = Calendar.getInstance(); + c1.setTime(DateUtils.parseDate(startDate)); + c2.setTime(DateUtils.parseDate(endDate)); + int year = c2.get(Calendar.YEAR) - c1.get(Calendar.YEAR); + int month = c2.get(Calendar.MONTH) - c1.get(Calendar.MONTH); + return Math.abs(year * 12 + month); + } + + /** + * getDayOfWeek(获取当前日期是星期几) + * + * @param dateStr 日期 + * @return 星期几 + */ + public static String getDayOfWeek(String dateStr) { + String[] weekOfDays = {"星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"}; + Date date = parseDate(dateStr); + Calendar calendar = Calendar.getInstance(); + calendar.setTime(date); + int num = calendar.get(Calendar.DAY_OF_WEEK) - 1; + return weekOfDays[num]; + } + + /** + * sns 格式 如几秒前,几分钟前,几小时前,几天前,几个月前,几年后, ... 精细,类如某个明星几秒钟之前发表了一篇微博 + * + * @param createTime + * @return + */ + public static String snsFormat(long createTime) { + long now = System.currentTimeMillis() / 1000; + long differ = now - createTime / 1000; + String dateStr = ""; + if (differ <= 60) { + dateStr = "刚刚"; + } else if (differ <= 3600) { + dateStr = (differ / 60) + "分钟前"; + } else if (differ <= 3600 * 24) { + dateStr = (differ / 3600) + "小时前"; + } else if (differ <= 3600 * 24 * 30) { + dateStr = (differ / (3600 * 24)) + "天前"; + } else { + Date date = new Date(createTime); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + dateStr = sdf.format(date); + } + return dateStr; + } + + /** + * 得到UTC时间,类型为字符串,格式为"yyyy-MM-dd HH:mm" + * 如果获取失败,返回null + * + * @return + */ + public static String getUTCTimeStr() { + StringBuffer UTCTimeBuffer = new StringBuffer(); + // 1、取得本地时间: + Calendar cal = Calendar.getInstance(); + // 2、取得时间偏移量: + int zoneOffset = cal.get(java.util.Calendar.ZONE_OFFSET); + // 3、取得夏令时差: + int dstOffset = cal.get(java.util.Calendar.DST_OFFSET); + // 4、从本地时间里扣除这些差量,即可以取得UTC时间: + cal.add(java.util.Calendar.MILLISECOND, -(zoneOffset + dstOffset)); + int year = cal.get(Calendar.YEAR); + int month = cal.get(Calendar.MONTH) + 1; + int day = cal.get(Calendar.DAY_OF_MONTH); + int hour = cal.get(Calendar.HOUR_OF_DAY); + int minute = cal.get(Calendar.MINUTE); + UTCTimeBuffer.append(year).append("-").append(month).append("-").append(day); + UTCTimeBuffer.append(" ").append(hour).append(":").append(minute); + try { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); + sdf.parse(UTCTimeBuffer.toString()); + return UTCTimeBuffer.toString(); + } catch (ParseException e) { + e.printStackTrace(); + } + return null; + } +} diff --git a/falsework-sever/src/main/java/com/fx/server/util/DynamicEnumUtils.java b/falsework-sever/src/main/java/com/fx/server/util/DynamicEnumUtils.java new file mode 100644 index 0000000..30fbe94 --- /dev/null +++ b/falsework-sever/src/main/java/com/fx/server/util/DynamicEnumUtils.java @@ -0,0 +1,122 @@ +package com.fx.server.util; + +import java.lang.reflect.AccessibleObject; +import java.lang.reflect.Array; +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import sun.reflect.ConstructorAccessor; +import sun.reflect.FieldAccessor; +import sun.reflect.ReflectionFactory; + +public class DynamicEnumUtils { + + private static ReflectionFactory reflectionFactory = ReflectionFactory.getReflectionFactory(); + + private static void setFailsafeFieldValue(Field field, Object target, Object value) throws NoSuchFieldException, + IllegalAccessException { + + // let's make the field accessible + field.setAccessible(true); + + // next we change the modifier in the Field instance to + // not be final anymore, thus tricking reflection into + // letting us modify the static final field + Field modifiersField = Field.class.getDeclaredField("modifiers"); + modifiersField.setAccessible(true); + int modifiers = modifiersField.getInt(field); + + // blank out the final bit in the modifiers int + modifiers &= ~Modifier.FINAL; + modifiersField.setInt(field, modifiers); + + FieldAccessor fa = reflectionFactory.newFieldAccessor(field, false); + fa.set(target, value); + } + + private static void blankField(Class enumClass, String fieldName) throws NoSuchFieldException, + IllegalAccessException { + for (Field field : Class.class.getDeclaredFields()) { + if (field.getName().contains(fieldName)) { + AccessibleObject.setAccessible(new Field[]{field}, true); + setFailsafeFieldValue(field, enumClass, null); + break; + } + } + } + + private static void cleanEnumCache(Class enumClass) throws NoSuchFieldException, IllegalAccessException { + blankField(enumClass, "enumConstantDirectory"); // Sun (Oracle?!?) JDK 1.5/6 + blankField(enumClass, "enumConstants"); // IBM JDK + } + + private static ConstructorAccessor getConstructorAccessor(Class enumClass, Class[] additionalParameterTypes) + throws NoSuchMethodException { + Class[] parameterTypes = new Class[additionalParameterTypes.length + 2]; + parameterTypes[0] = String.class; + parameterTypes[1] = int.class; + System.arraycopy(additionalParameterTypes, 0, parameterTypes, 2, additionalParameterTypes.length); + return reflectionFactory.newConstructorAccessor(enumClass.getDeclaredConstructor(parameterTypes)); + } + + private static Object makeEnum(Class enumClass, String value, int ordinal, Class[] additionalTypes, + Object[] additionalValues) throws Exception { + Object[] parms = new Object[additionalValues.length + 2]; + parms[0] = value; + parms[1] = Integer.valueOf(ordinal); + System.arraycopy(additionalValues, 0, parms, 2, additionalValues.length); + return enumClass.cast(getConstructorAccessor(enumClass, additionalTypes).newInstance(parms)); + } + + /** + * Add an enum instance to the enum class given as argument + * + * @param the type of the enum (implicit) + * @param enumType the class of the enum to be modified + * @param enumName the name of the new enum instance to be added to the class. + */ + @SuppressWarnings("unchecked") + public static > void addEnum(Class enumType, String enumName, Class[] additionalTypes, Object[] additionalValues) { + + // 0. Sanity checks + if (!Enum.class.isAssignableFrom(enumType)) { + throw new RuntimeException("class " + enumType + " is not an instance of Enum"); + } + + // 1. Lookup "$VALUES" holder in enum class and get previous enum instances + Field valuesField = null; + Field[] fields = enumType.getDeclaredFields(); + for (Field field : fields) { + if (field.getName().contains("$VALUES")) { + valuesField = field; + break; + } + } + AccessibleObject.setAccessible(new Field[]{valuesField}, true); + + try { + + // 2. Copy it + T[] previousValues = (T[]) valuesField.get(enumType); + List values = new ArrayList(Arrays.asList(previousValues)); + + // 3. build new enum + T newValue = (T) makeEnum(enumType, enumName, values.size(), additionalTypes, additionalValues); + + // 4. add new value + values.add(newValue); + + // 5. Set new values field + setFailsafeFieldValue(valuesField, null, values.toArray((T[]) Array.newInstance(enumType, 0))); + + // 6. Clean enum cache + cleanEnumCache(enumType); + + } catch (Exception e) { + throw new RuntimeException(e.getMessage(), e); + } + } +} \ No newline at end of file diff --git a/falsework-sever/src/main/java/com/epri/fx/server/util/EncryptUtil.java b/falsework-sever/src/main/java/com/fx/server/util/EncryptUtil.java similarity index 99% rename from falsework-sever/src/main/java/com/epri/fx/server/util/EncryptUtil.java rename to falsework-sever/src/main/java/com/fx/server/util/EncryptUtil.java index 81a96ae..7498dc5 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/util/EncryptUtil.java +++ b/falsework-sever/src/main/java/com/fx/server/util/EncryptUtil.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.util; +package com.fx.server.util; import com.sun.org.apache.xerces.internal.impl.dv.util.Base64; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/util/EntityUtils.java b/falsework-sever/src/main/java/com/fx/server/util/EntityUtils.java similarity index 98% rename from falsework-sever/src/main/java/com/epri/fx/server/util/EntityUtils.java rename to falsework-sever/src/main/java/com/fx/server/util/EntityUtils.java index 12e65be..59cd4d7 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/util/EntityUtils.java +++ b/falsework-sever/src/main/java/com/fx/server/util/EntityUtils.java @@ -1,6 +1,6 @@ -package com.epri.fx.server.util; +package com.fx.server.util; -import com.epri.fx.server.context.BaseContextHandler; +import com.fx.server.context.BaseContextHandler; import org.apache.commons.lang3.StringUtils; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/util/Query.java b/falsework-sever/src/main/java/com/fx/server/util/Query.java similarity index 96% rename from falsework-sever/src/main/java/com/epri/fx/server/util/Query.java rename to falsework-sever/src/main/java/com/fx/server/util/Query.java index b85f500..fdb10ec 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/util/Query.java +++ b/falsework-sever/src/main/java/com/fx/server/util/Query.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.util; +package com.fx.server.util; import java.util.LinkedHashMap; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/util/ReflectionUtils.java b/falsework-sever/src/main/java/com/fx/server/util/ReflectionUtils.java similarity index 99% rename from falsework-sever/src/main/java/com/epri/fx/server/util/ReflectionUtils.java rename to falsework-sever/src/main/java/com/fx/server/util/ReflectionUtils.java index 4e05d88..cb64e73 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/util/ReflectionUtils.java +++ b/falsework-sever/src/main/java/com/fx/server/util/ReflectionUtils.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.util; +package com.fx.server.util; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.Validate; diff --git a/falsework-sever/src/main/java/com/fx/server/util/SpringUtils.java b/falsework-sever/src/main/java/com/fx/server/util/SpringUtils.java new file mode 100644 index 0000000..d05a556 --- /dev/null +++ b/falsework-sever/src/main/java/com/fx/server/util/SpringUtils.java @@ -0,0 +1,149 @@ +package com.fx.server.util; + +import org.springframework.aop.framework.AopContext; +import org.springframework.beans.BeansException; +import org.springframework.beans.factory.NoSuchBeanDefinitionException; +import org.springframework.beans.factory.config.BeanFactoryPostProcessor; +import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.stereotype.Component; + + /** + * + * @Description:spring工具类 方便在非spring管理环境中获取bean + * + * @param: + * @return: + * @auther: liwen + * @date: 2020/12/28 4:36 下午 + */ +@Component +public final class SpringUtils implements BeanFactoryPostProcessor, ApplicationContextAware +{ + /** Spring应用上下文环境 */ + private static ConfigurableListableBeanFactory beanFactory; + + private static ApplicationContext applicationContext; + + @Override + public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException + { + SpringUtils.beanFactory = beanFactory; + } + + @Override + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException + { + SpringUtils.applicationContext = applicationContext; + } + + /** + * 获取对象 + * + * @param name + * @return Object 一个以所给名字注册的bean的实例 + * @throws org.springframework.beans.BeansException + * + */ + @SuppressWarnings("unchecked") + public static T getBean(String name) throws BeansException + { + return (T) beanFactory.getBean(name); + } + + /** + * 获取类型为requiredType的对象 + * + * @param clz + * @return + * @throws org.springframework.beans.BeansException + * + */ + public static T getBean(Class clz) throws BeansException + { + T result = (T) beanFactory.getBean(clz); + return result; + } + + /** + * 如果BeanFactory包含一个与所给名称匹配的bean定义,则返回true + * + * @param name + * @return boolean + */ + public static boolean containsBean(String name) + { + return beanFactory.containsBean(name); + } + + /** + * 判断以给定名字注册的bean定义是一个singleton还是一个prototype。 如果与给定名字相应的bean定义没有被找到,将会抛出一个异常(NoSuchBeanDefinitionException) + * + * @param name + * @return boolean + * @throws org.springframework.beans.factory.NoSuchBeanDefinitionException + * + */ + public static boolean isSingleton(String name) throws NoSuchBeanDefinitionException + { + return beanFactory.isSingleton(name); + } + + /** + * @param name + * @return Class 注册对象的类型 + * @throws org.springframework.beans.factory.NoSuchBeanDefinitionException + * + */ + public static Class getType(String name) throws NoSuchBeanDefinitionException + { + return beanFactory.getType(name); + } + + /** + * 如果给定的bean名字在bean定义中有别名,则返回这些别名 + * + * @param name + * @return + * @throws org.springframework.beans.factory.NoSuchBeanDefinitionException + * + */ + public static String[] getAliases(String name) throws NoSuchBeanDefinitionException + { + return beanFactory.getAliases(name); + } + + /** + * 获取aop代理对象 + * + * @param invoker + * @return + */ + @SuppressWarnings("unchecked") + public static T getAopProxy(T invoker) + { + return (T) AopContext.currentProxy(); + } + + /** + * 获取当前的环境配置,无配置返回null + * + * @return 当前的环境配置 + */ + public static String[] getActiveProfiles() + { + return applicationContext.getEnvironment().getActiveProfiles(); + } + +// /** +// * 获取当前的环境配置,当有多个环境配置时,只获取第一个 +// * +// * @return 当前的环境配置 +// */ +// public static String getActiveProfile() +// { +// final String[] activeProfiles = getActiveProfiles(); +// return StringUtils.isNotEmpty(activeProfiles) ? activeProfiles[0] : null; +// } +} diff --git a/falsework-sever/src/main/java/com/epri/fx/server/util/StringHelper.java b/falsework-sever/src/main/java/com/fx/server/util/StringHelper.java similarity index 87% rename from falsework-sever/src/main/java/com/epri/fx/server/util/StringHelper.java rename to falsework-sever/src/main/java/com/fx/server/util/StringHelper.java index 82397c7..f3ed620 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/util/StringHelper.java +++ b/falsework-sever/src/main/java/com/fx/server/util/StringHelper.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.util; +package com.fx.server.util; /** * diff --git a/falsework-sever/src/main/java/com/epri/fx/server/util/TreeUtil.java b/falsework-sever/src/main/java/com/fx/server/util/TreeUtil.java similarity index 95% rename from falsework-sever/src/main/java/com/epri/fx/server/util/TreeUtil.java rename to falsework-sever/src/main/java/com/fx/server/util/TreeUtil.java index 29d8dcd..83715db 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/util/TreeUtil.java +++ b/falsework-sever/src/main/java/com/fx/server/util/TreeUtil.java @@ -1,7 +1,7 @@ -package com.epri.fx.server.util; +package com.fx.server.util; -import com.epri.fx.server.vo.TreeNode; +import com.fx.server.vo.TreeNode; import java.util.ArrayList; import java.util.List; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/util/UUIDUtils.java b/falsework-sever/src/main/java/com/fx/server/util/UUIDUtils.java similarity index 96% rename from falsework-sever/src/main/java/com/epri/fx/server/util/UUIDUtils.java rename to falsework-sever/src/main/java/com/fx/server/util/UUIDUtils.java index e514418..4383383 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/util/UUIDUtils.java +++ b/falsework-sever/src/main/java/com/fx/server/util/UUIDUtils.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.util; +package com.fx.server.util; import java.util.UUID; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/util/user/JwtAuthenticationRequest.java b/falsework-sever/src/main/java/com/fx/server/util/user/JwtAuthenticationRequest.java similarity index 95% rename from falsework-sever/src/main/java/com/epri/fx/server/util/user/JwtAuthenticationRequest.java rename to falsework-sever/src/main/java/com/fx/server/util/user/JwtAuthenticationRequest.java index 0d74338..e33a999 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/util/user/JwtAuthenticationRequest.java +++ b/falsework-sever/src/main/java/com/fx/server/util/user/JwtAuthenticationRequest.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.util.user; +package com.fx.server.util.user; import java.io.Serializable; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/util/user/JwtAuthenticationResponse.java b/falsework-sever/src/main/java/com/fx/server/util/user/JwtAuthenticationResponse.java similarity index 90% rename from falsework-sever/src/main/java/com/epri/fx/server/util/user/JwtAuthenticationResponse.java rename to falsework-sever/src/main/java/com/fx/server/util/user/JwtAuthenticationResponse.java index f47c13a..cc65830 100755 --- a/falsework-sever/src/main/java/com/epri/fx/server/util/user/JwtAuthenticationResponse.java +++ b/falsework-sever/src/main/java/com/fx/server/util/user/JwtAuthenticationResponse.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.util.user; +package com.fx.server.util.user; import java.io.Serializable; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/util/user/JwtTokenUtil.java b/falsework-sever/src/main/java/com/fx/server/util/user/JwtTokenUtil.java similarity index 81% rename from falsework-sever/src/main/java/com/epri/fx/server/util/user/JwtTokenUtil.java rename to falsework-sever/src/main/java/com/fx/server/util/user/JwtTokenUtil.java index d00b6be..0c3a78a 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/util/user/JwtTokenUtil.java +++ b/falsework-sever/src/main/java/com/fx/server/util/user/JwtTokenUtil.java @@ -1,8 +1,8 @@ -package com.epri.fx.server.util.user; +package com.fx.server.util.user; -import com.epri.fx.server.config.KeyConfiguration; -import com.epri.fx.server.jwt.IJWTInfo; -import com.epri.fx.server.jwt.JWTHelper; +import com.fx.server.config.KeyConfiguration; +import com.fx.server.jwt.IJWTInfo; +import com.fx.server.jwt.JWTHelper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/vo/ElementVO.java b/falsework-sever/src/main/java/com/fx/server/vo/ElementVO.java similarity index 99% rename from falsework-sever/src/main/java/com/epri/fx/server/vo/ElementVO.java rename to falsework-sever/src/main/java/com/fx/server/vo/ElementVO.java index ace5ab5..e5784ed 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/vo/ElementVO.java +++ b/falsework-sever/src/main/java/com/fx/server/vo/ElementVO.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.vo; +package com.fx.server.vo; import javafx.beans.property.SimpleBooleanProperty; import javafx.beans.property.SimpleIntegerProperty; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/vo/FrontUser.java b/falsework-sever/src/main/java/com/fx/server/vo/FrontUser.java similarity index 98% rename from falsework-sever/src/main/java/com/epri/fx/server/vo/FrontUser.java rename to falsework-sever/src/main/java/com/fx/server/vo/FrontUser.java index 566396c..a2db34f 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/vo/FrontUser.java +++ b/falsework-sever/src/main/java/com/fx/server/vo/FrontUser.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.vo; +package com.fx.server.vo; import java.util.List; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/vo/GroupTree.java b/falsework-sever/src/main/java/com/fx/server/vo/GroupTree.java similarity index 93% rename from falsework-sever/src/main/java/com/epri/fx/server/vo/GroupTree.java rename to falsework-sever/src/main/java/com/fx/server/vo/GroupTree.java index 4df1a65..c6494f2 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/vo/GroupTree.java +++ b/falsework-sever/src/main/java/com/fx/server/vo/GroupTree.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.vo; +package com.fx.server.vo; /** * ${DESCRIPTION} diff --git a/falsework-sever/src/main/java/com/epri/fx/server/vo/GroupTypeVO.java b/falsework-sever/src/main/java/com/fx/server/vo/GroupTypeVO.java similarity index 98% rename from falsework-sever/src/main/java/com/epri/fx/server/vo/GroupTypeVO.java rename to falsework-sever/src/main/java/com/fx/server/vo/GroupTypeVO.java index 5c7b2ca..e030889 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/vo/GroupTypeVO.java +++ b/falsework-sever/src/main/java/com/fx/server/vo/GroupTypeVO.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.vo; +package com.fx.server.vo; import javafx.beans.property.SimpleIntegerProperty; import javafx.beans.property.SimpleObjectProperty; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/vo/GroupUsers.java b/falsework-sever/src/main/java/com/fx/server/vo/GroupUsers.java similarity index 92% rename from falsework-sever/src/main/java/com/epri/fx/server/vo/GroupUsers.java rename to falsework-sever/src/main/java/com/fx/server/vo/GroupUsers.java index d3a36a8..f26ccec 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/vo/GroupUsers.java +++ b/falsework-sever/src/main/java/com/fx/server/vo/GroupUsers.java @@ -1,7 +1,7 @@ -package com.epri.fx.server.vo; +package com.fx.server.vo; -import com.epri.fx.server.entity.User; +import com.fx.server.entity.User; import java.util.List; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/vo/GroupVO.java b/falsework-sever/src/main/java/com/fx/server/vo/GroupVO.java similarity index 96% rename from falsework-sever/src/main/java/com/epri/fx/server/vo/GroupVO.java rename to falsework-sever/src/main/java/com/fx/server/vo/GroupVO.java index 8299a73..5eb727e 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/vo/GroupVO.java +++ b/falsework-sever/src/main/java/com/fx/server/vo/GroupVO.java @@ -1,6 +1,5 @@ -package com.epri.fx.server.vo; +package com.fx.server.vo; -import javafx.beans.property.SimpleBooleanProperty; import javafx.beans.property.SimpleIntegerProperty; import javafx.beans.property.SimpleStringProperty; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/vo/MenuVO.java b/falsework-sever/src/main/java/com/fx/server/vo/MenuVO.java similarity index 97% rename from falsework-sever/src/main/java/com/epri/fx/server/vo/MenuVO.java rename to falsework-sever/src/main/java/com/fx/server/vo/MenuVO.java index 1f09d33..9c8491a 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/vo/MenuVO.java +++ b/falsework-sever/src/main/java/com/fx/server/vo/MenuVO.java @@ -1,8 +1,6 @@ -package com.epri.fx.server.vo; +package com.fx.server.vo; import javafx.beans.property.*; -import javafx.collections.FXCollections; -import javafx.collections.ObservableList; import java.io.Serializable; import java.util.ArrayList; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/vo/PermissionInfo.java b/falsework-sever/src/main/java/com/fx/server/vo/PermissionInfo.java similarity index 97% rename from falsework-sever/src/main/java/com/epri/fx/server/vo/PermissionInfo.java rename to falsework-sever/src/main/java/com/fx/server/vo/PermissionInfo.java index a8990f0..1ec405a 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/vo/PermissionInfo.java +++ b/falsework-sever/src/main/java/com/fx/server/vo/PermissionInfo.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.vo; +package com.fx.server.vo; import java.io.Serializable; diff --git a/falsework-sever/src/main/java/com/fx/server/vo/SysJobVO.java b/falsework-sever/src/main/java/com/fx/server/vo/SysJobVO.java new file mode 100644 index 0000000..015acb8 --- /dev/null +++ b/falsework-sever/src/main/java/com/fx/server/vo/SysJobVO.java @@ -0,0 +1,56 @@ +package com.fx.server.vo; + +import lombok.Data; +import org.springframework.scheduling.quartz.QuartzJobBean; + +import java.io.Serializable; +import java.util.Map; + +/** + * @description: + * @className: SysJob + * @author: liwen + * @date: 2020/12/25 09:06 + */ +@Data +public class SysJobVO implements Serializable { + + /** + * 任务实现类 + */ + private Class jobClass; + /** + * 任务名称(建议唯一) + */ + private String jobName; + /** + * 任务组名 + */ + private String jobGroupName; + /** + * 时间表达式 (如:0/5 * * * * ? ) + */ + private String jobTime; + /** + * 参数 + */ + private Map jobData; + + private String description; + private String jobStatus; + + + + public SysJobVO(Class jobClass, String jobName, String jobGroupName, String jobTime, Map jobData) { + this.jobClass = jobClass; + this.jobName = jobName; + this.jobGroupName = jobGroupName; + this.jobTime = jobTime; + this.jobData = jobData; + } + + public SysJobVO() { + + } + +} diff --git a/falsework-sever/src/main/java/com/epri/fx/server/vo/TreeNode.java b/falsework-sever/src/main/java/com/fx/server/vo/TreeNode.java similarity index 96% rename from falsework-sever/src/main/java/com/epri/fx/server/vo/TreeNode.java rename to falsework-sever/src/main/java/com/fx/server/vo/TreeNode.java index fe0f6ad..2eff4ee 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/vo/TreeNode.java +++ b/falsework-sever/src/main/java/com/fx/server/vo/TreeNode.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.vo; +package com.fx.server.vo; import java.io.Serializable; import java.util.ArrayList; diff --git a/falsework-sever/src/main/java/com/epri/fx/server/vo/UserVO.java b/falsework-sever/src/main/java/com/fx/server/vo/UserVO.java similarity index 98% rename from falsework-sever/src/main/java/com/epri/fx/server/vo/UserVO.java rename to falsework-sever/src/main/java/com/fx/server/vo/UserVO.java index 04da996..8a4f163 100644 --- a/falsework-sever/src/main/java/com/epri/fx/server/vo/UserVO.java +++ b/falsework-sever/src/main/java/com/fx/server/vo/UserVO.java @@ -1,4 +1,4 @@ -package com.epri.fx.server.vo; +package com.fx.server.vo; import javafx.beans.property.SimpleIntegerProperty; import javafx.beans.property.SimpleStringProperty; diff --git a/falsework-sever/src/main/java/com/fx/server/websocket/WebSocketMessageHandler.java b/falsework-sever/src/main/java/com/fx/server/websocket/WebSocketMessageHandler.java new file mode 100644 index 0000000..eae1c97 --- /dev/null +++ b/falsework-sever/src/main/java/com/fx/server/websocket/WebSocketMessageHandler.java @@ -0,0 +1,212 @@ +package com.fx.server.websocket; + +import com.fx.server.constant.CommonConstants; +import com.fx.server.entity.log.SysLoginInfor; +import com.fx.server.exception.auth.UserInvalidException; +import com.fx.server.service.log.SysLoginInfoService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.web.socket.CloseStatus; +import org.springframework.web.socket.TextMessage; +import org.springframework.web.socket.WebSocketSession; +import org.springframework.web.socket.handler.TextWebSocketHandler; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.atomic.AtomicInteger; + +@Slf4j +@Component +public class WebSocketMessageHandler extends TextWebSocketHandler { + + /** + * 用来存储当前在线的客户端(此map线程安全) + */ + private static ConcurrentHashMap WEBSOCKET_MAP = new ConcurrentHashMap<>(); + + //静态变量,用来记录当前在线连接数。应该把它设计成线程安全的。 + private static AtomicInteger onlineNum = new AtomicInteger(); + @Autowired + private SysLoginInfoService sysLoginInfoService; + + /** + * 当和用户成功建立连接的时候会调用此方法,在此方法内部应该保存连接 + */ + @Override + public void afterConnectionEstablished(WebSocketSession session) throws Exception { + log.info("建立连接成功"); + String userId = (String) session.getAttributes().get(CommonConstants.WEB_SOCKET_USER_ID);//将在拦截器中保存的用户的名字取出来,然后作为 key 存到 map 中 + SysLoginInfor sysLoginInfor = (SysLoginInfor) session.getAttributes().get(CommonConstants.WEB_SOCKET_USER_LIST); + + if (userId != null) { + WEBSOCKET_MAP.put(userId, session);//保存当前的连接和用户之间的关系 + // 在线数加1 + addOnlineCount(); + log.info("客户端" + sysLoginInfor.getLoginName() + "加入,当前在线数为:" + onlineNum.get()); + sendMessageToUser(userId, new TextMessage(userId + "WebSocket连接成功")); + } + // 这块会实现自己业务,比如,当用户登录后,会把离线消息推送给用户 + + } + + /** + * 收到消息的时候会触发该方法 + * + * @param session 发送消息的用户的 session + * @param message 发送的内容 + * @throws Exception + */ + @Override + protected void handleTextMessage(WebSocketSession session, TextMessage message) throws Exception { +// //此处请根据自己的具体业务逻辑做处理 +// JSONObject jsonObject = JSONObject.fromObject(new String(message.asBytes()));//将用户发送的消息转换为 json,实际开发中请根据自己的需求处理 +// String toName = jsonObject.getString("toName");//获取数据中的收消息人的名字 +// String content = jsonObject.getString("content");//获取到发送的内容 +// String fromName = (String) session.getAttributes().get(Constants.WEBSOCKET_USERNAME);//获取当前发送消息的人的名字 +// content = "收到来自:" + fromName + "的消息,内容是:" + content; +// //拼接内容转发给接收者,实际开发中请参考自己的需求做处理 +// TextMessage textMessage = new TextMessage(content);//将内容转换为 TextMessage +// sendMessageToUser(toName, textMessage);// 发送给指定的用户 +// //sendMessageToUsers(message);//给所有人发送 +// //super.handleTextMessage(session, message); + } + + /** + * 给某个用户发送消息 + * + * @param userId + * @param message + */ + public void sendMessageToUser(String userId, TextMessage message) { + WebSocketSession webSocketSession = WEBSOCKET_MAP.get(userId);//根据接收方的名字找到对应的连接 + if (webSocketSession != null && webSocketSession.isOpen()) {//如果没有离线,如果离线,请根据实际业务需求来处理,可能会需要保存离线消息 + try { + webSocketSession.sendMessage(message);//发送消息 + } catch (IOException e) { + log.error(e.getMessage(), e); + } + } + } + + /** + * 给所有在线用户发送消息,此处以文本消息为例子 + * + * @param message + */ + public void sendMessageToUsers(TextMessage message) { + for (Map.Entry webSocketSessionEntry : WEBSOCKET_MAP.entrySet()) {//获取所有的连接 + + WebSocketSession session = webSocketSessionEntry.getValue();//找到每个连接 + if (session != null && session.isOpen()) { + try { + session.sendMessage(message); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + } + + /** + * 出现异常的时候 + * + * @param session + * @param exception + * @throws Exception + */ + @Override + public void handleTransportError(WebSocketSession session, Throwable exception) throws Exception { + String userId = (String) session.getAttributes().get(CommonConstants.WEB_SOCKET_USER_ID); + if (session.isOpen()) { + session.close(); + } + + log.error("WebSocket发生错误"); + + WEBSOCKET_MAP.remove(userId);//移除连接 + // 在线数减1 + subOnlineCount(); + + SysLoginInfor sysLoginInfor = (SysLoginInfor) session.getAttributes().get(CommonConstants.WEB_SOCKET_USER_LIST); + sysLoginInfor.setMsg("连接异常"); + sysLoginInfor.setStatus("1"); + sysLoginInfoService.addSysJobLog(sysLoginInfor); + } + + /** + * 连接关闭后 + * + * @param session + * @param closeStatus + * @throws Exception + */ + @Override + public void afterConnectionClosed(WebSocketSession session, CloseStatus closeStatus) throws Exception { + String userId = (String) session.getAttributes().get(CommonConstants.WEB_SOCKET_USER_ID);//找到用户对应的连接 + + // 从map中删除 + WEBSOCKET_MAP.remove(userId); + // 在线数减1 + subOnlineCount(); + SysLoginInfor sysLoginInfor = (SysLoginInfor) session.getAttributes().get(CommonConstants.WEB_SOCKET_USER_LIST); + sysLoginInfor.setStatus("1"); + sysLoginInfor.setMsg("退出登录"); + sysLoginInfoService.addSysJobLog(sysLoginInfor); + log.info("[" + sysLoginInfor.getLoginName() + "]连接关闭,当前在线数为:" + onlineNum.get()); + } + + @Override + public boolean supportsPartialMessages() { + return false; + } + + + /** + * 有人上线时在线人数加一 + */ + private static synchronized void addOnlineCount() { + onlineNum.incrementAndGet(); + } + + /** + * 有人下线时在线人数减一 + */ + private static void subOnlineCount() { + if (onlineNum.get() > 0) { + onlineNum.decrementAndGet(); + + } + } + + + public List getOnlineUsers() { + List onlineUsers = new ArrayList<>(); + for (Map.Entry webSocketSessionEntry : WEBSOCKET_MAP.entrySet()) {//获取所有的连接 + + WebSocketSession session = webSocketSessionEntry.getValue();//找到每个连接 + if (session != null && session.isOpen()) { + SysLoginInfor sysLoginInfor = (SysLoginInfor) session.getAttributes().get(CommonConstants.WEB_SOCKET_USER_LIST); + onlineUsers.add(sysLoginInfor); + } + } + return onlineUsers; + } + + public boolean retreat(String userId) { + WebSocketSession webSocketSession = WEBSOCKET_MAP.get(userId);//根据接收方的名字找到对应的连接 + try { + webSocketSession.close(); + return true; + } catch (IOException e) { + e.printStackTrace(); + throw new UserInvalidException("退出失败"); + + } + } + + +} \ No newline at end of file diff --git a/falsework-sever/src/main/resources/application-dm.yml b/falsework-sever/src/main/resources/application-dm.yml index 14f3014..9804ef9 100644 --- a/falsework-sever/src/main/resources/application-dm.yml +++ b/falsework-sever/src/main/resources/application-dm.yml @@ -6,7 +6,7 @@ spring: type: com.alibaba.druid.pool.DruidDataSource druid: #url: jdbc:dm://10.105.73.121:12345/EMSHIS - url: jdbc:dm://192.168.1.210:12345/EMSHIS + url: jdbc:dm://10.211.55.3:12345/EMSHIS username: IPSM_DBA password: IPSM_DBA driver-class-name: dm.jdbc.driver.DmDriver @@ -34,7 +34,7 @@ spring: connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 mybatis: - basepackage: com.wlkj.ipsm.realtime.mapper + basepackage: com.fx.server.mapper xmlLocation: classpath:mapper/**/*.xml mapper-locations: "classpath*:mapper/*.xml" diff --git a/falsework-sever/src/main/resources/application-mysql.yml b/falsework-sever/src/main/resources/application-mysql.yml index 5be83c8..eb66a25 100644 --- a/falsework-sever/src/main/resources/application-mysql.yml +++ b/falsework-sever/src/main/resources/application-mysql.yml @@ -5,7 +5,7 @@ spring: # 使用druid数据源 type: com.alibaba.druid.pool.DruidDataSource druid: - url: jdbc:mysql://${MYSQL_HOST:10.211.55.3}:${MYSQL_PORT:3306}/ipsm_dba?serverTimezone=Asia/Shanghai + url: jdbc:mysql://${MYSQL_HOST:10.211.55.3}:${MYSQL_PORT:3306}/fx_falsework_db?serverTimezone=Asia/Shanghai username: root password: Root@12345 driver-class-name: com.mysql.cj.jdbc.Driver @@ -31,9 +31,32 @@ spring: filters: stat # 通过connectProperties属性来打开mergeSql功能;慢SQL记录 connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 - + quartz: + job-store-type: jdbc + jdbc: + initialize-schema: always #不初始化表结构 + properties: + org: + quartz: + scheduler: + instanceId: AUTO #默认主机名和时间戳生成实例ID,可以是任何字符串,但对于所有调度程序来说,必须是唯一的 对应qrtz_scheduler_state INSTANCE_NAME字段 + #instanceName: clusteredScheduler #quartzScheduler + jobStore: + class: org.quartz.impl.jdbcjobstore.JobStoreTX #持久化配置 + driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate #我们仅为数据库制作了特定于数据库的代理 + useProperties: false #以指示JDBCJobStore将JobDataMaps中的所有值都作为字符串,因此可以作为名称 - 值对存储而不是在BLOB列中以其序列化形式存储更多复杂的对象。从长远来看,这是更安全的,因为您避免了将非String类序列化为BLOB的类版本问题。 + tablePrefix: qrtz_ #数据库表前缀 + misfireThreshold: 60000 #在被认为“失火”之前,调度程序将“容忍”一个Triggers将其下一个启动时间通过的毫秒数。默认值(如果您在配置中未输入此属性)为60000(60秒)。 + clusterCheckinInterval: 5000 #设置此实例“检入”*与群集的其他实例的频率(以毫秒为单位)。影响检测失败实例的速度。 + isClustered: true #打开群集功能 + threadPool: #连接池 + class: org.quartz.simpl.SimpleThreadPool + threadCount: 10 + threadPriority: 5 + threadsInheritContextClassLoaderOfInitializingThread: true + wait-for-jobs-to-complete-on-shutdown: true mybatis: - basepackage: com.epri.fx.server.mapper + basepackage: com.fx.server.mapper xmlLocation: classpath:mapper/*.xml mapper-locations: "classpath*:mapper/*.xml" diff --git a/falsework-sever/src/main/resources/application.properties b/falsework-sever/src/main/resources/application.properties deleted file mode 100644 index 8b13789..0000000 --- a/falsework-sever/src/main/resources/application.properties +++ /dev/null @@ -1 +0,0 @@ - diff --git a/falsework-sever/src/main/resources/application.yml b/falsework-sever/src/main/resources/application.yml index 912be27..e6f8f0c 100644 --- a/falsework-sever/src/main/resources/application.yml +++ b/falsework-sever/src/main/resources/application.yml @@ -5,7 +5,7 @@ spring: #日志输出 logging: level: - com.epri.fx.server: debug + com.fx.server: debug jwt: token-header: Authorization diff --git a/falsework-sever/src/main/resources/mapper/ElementMapper.xml b/falsework-sever/src/main/resources/mapper/ElementMapper.xml index fa84de5..f416369 100644 --- a/falsework-sever/src/main/resources/mapper/ElementMapper.xml +++ b/falsework-sever/src/main/resources/mapper/ElementMapper.xml @@ -1,7 +1,7 @@ - - + + @@ -39,7 +39,7 @@ delete from base_element where id = #{id,jdbcType=INTEGER} - + insert into base_element (id, code, type, name, uri, menu_id, parent_id, path, method, @@ -57,7 +57,7 @@ #{attr5,jdbcType=VARCHAR}, #{attr6,jdbcType=VARCHAR}, #{attr7,jdbcType=VARCHAR}, #{attr8,jdbcType=VARCHAR}) - + insert into base_element @@ -196,7 +196,7 @@ - + update base_element @@ -265,7 +265,7 @@ where id = #{id,jdbcType=INTEGER} - + update base_element set code = #{code,jdbcType=VARCHAR}, type = #{type,jdbcType=VARCHAR}, diff --git a/falsework-sever/src/main/resources/mapper/GateLogMapper.xml b/falsework-sever/src/main/resources/mapper/GateLogMapper.xml index 7d0a165..77b3617 100644 --- a/falsework-sever/src/main/resources/mapper/GateLogMapper.xml +++ b/falsework-sever/src/main/resources/mapper/GateLogMapper.xml @@ -1,7 +1,7 @@ - - + + @@ -25,7 +25,7 @@ delete from gate_log where id = #{id,jdbcType=INTEGER} - insert into gate_log (menu, opt, uri, crt_time, crt_user, crt_name, @@ -34,7 +34,7 @@ #{crtTime,jdbcType=TIMESTAMP}, #{crtUser,jdbcType=VARCHAR}, #{crtName,jdbcType=VARCHAR}, #{crtHost,jdbcType=VARCHAR}, #{body,jdbcType=VARCHAR}) - insert into gate_log @@ -90,7 +90,7 @@ - + update gate_log @@ -120,7 +120,7 @@ where id = #{id,jdbcType=INTEGER} - + update gate_log set menu = #{menu,jdbcType=VARCHAR}, opt = #{opt,jdbcType=VARCHAR}, @@ -142,6 +142,6 @@ and crt_name like #{keyId,jdbcType=VARCHAR} or crt_host like #{keyId,jdbcType=VARCHAR} - + ORDER BY id DESC \ No newline at end of file diff --git a/falsework-sever/src/main/resources/mapper/GroupMapper.xml b/falsework-sever/src/main/resources/mapper/GroupMapper.xml index 9983d26..0dbba8c 100644 --- a/falsework-sever/src/main/resources/mapper/GroupMapper.xml +++ b/falsework-sever/src/main/resources/mapper/GroupMapper.xml @@ -1,7 +1,7 @@ - - + + @@ -42,7 +42,7 @@ delete from base_group where id = #{id,jdbcType=INTEGER} - + insert into base_group (id, code, name, parent_id, path, type, group_type, description, crt_time, @@ -62,7 +62,7 @@ #{attr6,jdbcType=VARCHAR}, #{attr7,jdbcType=VARCHAR}, #{attr8,jdbcType=VARCHAR} ) - + insert into base_group @@ -213,7 +213,7 @@ - + update base_group @@ -288,7 +288,7 @@ where id = #{id,jdbcType=INTEGER} - + update base_group set code = #{code,jdbcType=VARCHAR}, name = #{name,jdbcType=VARCHAR}, diff --git a/falsework-sever/src/main/resources/mapper/GroupTypeMapper.xml b/falsework-sever/src/main/resources/mapper/GroupTypeMapper.xml index 1f6b20e..2de709b 100644 --- a/falsework-sever/src/main/resources/mapper/GroupTypeMapper.xml +++ b/falsework-sever/src/main/resources/mapper/GroupTypeMapper.xml @@ -1,7 +1,7 @@ - - + + @@ -37,7 +37,7 @@ delete from base_group_type where id = #{id,jdbcType=INTEGER} - + insert into base_group_type (id, code, name, description, crt_time, crt_user, crt_name, crt_host, upd_time, @@ -53,7 +53,7 @@ #{attr4,jdbcType=VARCHAR}, #{attr5,jdbcType=VARCHAR}, #{attr6,jdbcType=VARCHAR}, #{attr7,jdbcType=VARCHAR}, #{attr8,jdbcType=VARCHAR}) - + insert into base_group_type @@ -180,7 +180,7 @@ - + update base_group_type @@ -243,7 +243,7 @@ where id = #{id,jdbcType=INTEGER} - + update base_group_type set code = #{code,jdbcType=VARCHAR}, name = #{name,jdbcType=VARCHAR}, diff --git a/falsework-sever/src/main/resources/mapper/MenuMapper.xml b/falsework-sever/src/main/resources/mapper/MenuMapper.xml index d11915c..f985b92 100644 --- a/falsework-sever/src/main/resources/mapper/MenuMapper.xml +++ b/falsework-sever/src/main/resources/mapper/MenuMapper.xml @@ -1,7 +1,7 @@ - - + + @@ -46,7 +46,7 @@ delete from base_menu where id = #{id,jdbcType=INTEGER} - + insert into base_menu (id, code, title, parent_id, href, icon, type, order_num, description, @@ -68,7 +68,7 @@ #{attr6,jdbcType=VARCHAR}, #{attr7,jdbcType=VARCHAR}, #{attr8,jdbcType=VARCHAR} ) - + insert into base_menu @@ -237,7 +237,7 @@ - + update base_menu @@ -321,7 +321,7 @@ where id = #{id,jdbcType=INTEGER} - + update base_menu set code = #{code,jdbcType=VARCHAR}, title = #{title,jdbcType=VARCHAR}, diff --git a/falsework-sever/src/main/resources/mapper/ResourceAuthorityMapper.xml b/falsework-sever/src/main/resources/mapper/ResourceAuthorityMapper.xml index c53572e..2d1f541 100644 --- a/falsework-sever/src/main/resources/mapper/ResourceAuthorityMapper.xml +++ b/falsework-sever/src/main/resources/mapper/ResourceAuthorityMapper.xml @@ -1,7 +1,7 @@ - - + + @@ -38,7 +38,7 @@ delete from base_resource_authority where id = #{id,jdbcType=INTEGER} - + insert into base_resource_authority (id, authority_id, authority_type, resource_id, resource_type, parent_id, path, description, crt_time, @@ -54,7 +54,7 @@ #{attr4,jdbcType=VARCHAR}, #{attr5,jdbcType=VARCHAR}, #{attr6,jdbcType=VARCHAR}, #{attr7,jdbcType=VARCHAR}, #{attr8,jdbcType=VARCHAR}) - + insert into base_resource_authority @@ -181,7 +181,7 @@ - + update base_resource_authority @@ -244,7 +244,7 @@ where id = #{id,jdbcType=INTEGER} - + update base_resource_authority set authority_id = #{authorityId,jdbcType=VARCHAR}, authority_type = #{authorityType,jdbcType=VARCHAR}, @@ -267,7 +267,7 @@ attr8 = #{attr8,jdbcType=VARCHAR} where id = #{id,jdbcType=INTEGER} - select from base_resource_authority diff --git a/falsework-sever/src/main/resources/mapper/RsaKeyMapper.xml b/falsework-sever/src/main/resources/mapper/RsaKeyMapper.xml index 91a7367..8b527c9 100644 --- a/falsework-sever/src/main/resources/mapper/RsaKeyMapper.xml +++ b/falsework-sever/src/main/resources/mapper/RsaKeyMapper.xml @@ -1,7 +1,7 @@ - - + + @@ -18,11 +18,11 @@ delete from base_rsa_key where RSA_KEY = #{key,jdbcType=VARCHAR} - + insert into base_rsa_key (RSA_KEY, KEY_VALUE) values (#{key,jdbcType=VARCHAR}, #{value,jdbcType=VARCHAR}) - + insert into base_rsa_key @@ -41,7 +41,7 @@ - + update base_rsa_key @@ -50,7 +50,7 @@ where RSA_KEY = #{key,jdbcType=VARCHAR} - + update base_rsa_key set VALUE = #{value,jdbcType=VARCHAR} where RSA_KEY = #{key,jdbcType=VARCHAR} diff --git a/falsework-sever/src/main/resources/mapper/SysJobLogMapper.xml b/falsework-sever/src/main/resources/mapper/SysJobLogMapper.xml new file mode 100644 index 0000000..767fde9 --- /dev/null +++ b/falsework-sever/src/main/resources/mapper/SysJobLogMapper.xml @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + job_log_id + , job_name, job_group, invoke_target, job_message, `status`, exception_info, + create_time + + + + delete + from sys_job_log + where job_log_id = #{jobLogId,jdbcType=BIGINT} + + + insert into sys_job_log (job_name, job_group, invoke_target, + job_message, `status`, exception_info, + create_time) + values (#{jobName,jdbcType=VARCHAR}, #{jobGroup,jdbcType=VARCHAR}, #{invokeTarget,jdbcType=VARCHAR}, + #{jobMessage,jdbcType=VARCHAR}, #{status,jdbcType=CHAR}, #{exceptionInfo,jdbcType=VARCHAR}, + #{createTime,jdbcType=TIMESTAMP}) + + + insert into sys_job_log + + + job_name, + + + job_group, + + + invoke_target, + + + job_message, + + + `status`, + + + exception_info, + + + create_time, + + + + + #{jobName,jdbcType=VARCHAR}, + + + #{jobGroup,jdbcType=VARCHAR}, + + + #{invokeTarget,jdbcType=VARCHAR}, + + + #{jobMessage,jdbcType=VARCHAR}, + + + #{status,jdbcType=CHAR}, + + + #{exceptionInfo,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + + + update sys_job_log + + + job_name = #{jobName,jdbcType=VARCHAR}, + + + job_group = #{jobGroup,jdbcType=VARCHAR}, + + + invoke_target = #{invokeTarget,jdbcType=VARCHAR}, + + + job_message = #{jobMessage,jdbcType=VARCHAR}, + + + `status` = #{status,jdbcType=CHAR}, + + + exception_info = #{exceptionInfo,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + where job_log_id = #{jobLogId,jdbcType=BIGINT} + + + update sys_job_log + set job_name = #{jobName,jdbcType=VARCHAR}, + job_group = #{jobGroup,jdbcType=VARCHAR}, + invoke_target = #{invokeTarget,jdbcType=VARCHAR}, + job_message = #{jobMessage,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=CHAR}, + exception_info = #{exceptionInfo,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP} + where job_log_id = #{jobLogId,jdbcType=BIGINT} + + + + \ No newline at end of file diff --git a/falsework-sever/src/main/resources/mapper/SysLoginInforMapper.xml b/falsework-sever/src/main/resources/mapper/SysLoginInforMapper.xml new file mode 100644 index 0000000..e5ee511 --- /dev/null +++ b/falsework-sever/src/main/resources/mapper/SysLoginInforMapper.xml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + info_id + , login_name, ipaddr, login_location, browser, os, `status`, msg, login_time + + + + delete + from sys_logininfor + where info_id = #{infoId,jdbcType=BIGINT} + + + insert into sys_logininfor (login_name, ipaddr, login_location, + browser, os, `status`, msg, + login_time) + values (#{loginName,jdbcType=VARCHAR}, #{ipaddr,jdbcType=VARCHAR}, #{loginLocation,jdbcType=VARCHAR}, + #{browser,jdbcType=VARCHAR}, #{os,jdbcType=VARCHAR}, #{status,jdbcType=CHAR}, #{msg,jdbcType=VARCHAR}, + #{loginTime,jdbcType=TIMESTAMP}) + + + insert into sys_logininfor + + + login_name, + + + ipaddr, + + + login_location, + + + browser, + + + os, + + + `status`, + + + msg, + + + login_time, + + + + + #{loginName,jdbcType=VARCHAR}, + + + #{ipaddr,jdbcType=VARCHAR}, + + + #{loginLocation,jdbcType=VARCHAR}, + + + #{browser,jdbcType=VARCHAR}, + + + #{os,jdbcType=VARCHAR}, + + + #{status,jdbcType=CHAR}, + + + #{msg,jdbcType=VARCHAR}, + + + #{loginTime,jdbcType=TIMESTAMP}, + + + + + update sys_logininfor + + + login_name = #{loginName,jdbcType=VARCHAR}, + + + ipaddr = #{ipaddr,jdbcType=VARCHAR}, + + + login_location = #{loginLocation,jdbcType=VARCHAR}, + + + browser = #{browser,jdbcType=VARCHAR}, + + + os = #{os,jdbcType=VARCHAR}, + + + `status` = #{status,jdbcType=CHAR}, + + + msg = #{msg,jdbcType=VARCHAR}, + + + login_time = #{loginTime,jdbcType=TIMESTAMP}, + + + where info_id = #{infoId,jdbcType=BIGINT} + + + update sys_logininfor + set login_name = #{loginName,jdbcType=VARCHAR}, + ipaddr = #{ipaddr,jdbcType=VARCHAR}, + login_location = #{loginLocation,jdbcType=VARCHAR}, + browser = #{browser,jdbcType=VARCHAR}, + os = #{os,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=CHAR}, + msg = #{msg,jdbcType=VARCHAR}, + login_time = #{loginTime,jdbcType=TIMESTAMP} + where info_id = #{infoId,jdbcType=BIGINT} + + + + + \ No newline at end of file diff --git a/falsework-sever/src/main/resources/mapper/UserMapper.xml b/falsework-sever/src/main/resources/mapper/UserMapper.xml index 2cbb869..69fb5a0 100644 --- a/falsework-sever/src/main/resources/mapper/UserMapper.xml +++ b/falsework-sever/src/main/resources/mapper/UserMapper.xml @@ -1,7 +1,7 @@ - - + + @@ -47,7 +47,7 @@ delete from base_user where id = #{id,jdbcType=INTEGER} - + insert into base_user (id, username, password, name, birthday, address, mobile_phone, tel_phone, email, @@ -69,7 +69,7 @@ #{attr5,jdbcType=VARCHAR}, #{attr6,jdbcType=VARCHAR}, #{attr7,jdbcType=VARCHAR}, #{attr8,jdbcType=VARCHAR}) - + insert into base_user @@ -250,7 +250,7 @@ - + update base_user @@ -340,7 +340,7 @@ where id = #{id,jdbcType=INTEGER} - + update base_user set username = #{username,jdbcType=VARCHAR}, password = #{password,jdbcType=VARCHAR}, diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..e708b1c Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..be52383 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..4f906e0 --- /dev/null +++ b/gradlew @@ -0,0 +1,185 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=`expr $i + 1` + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=`save "$@"` + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..107acd3 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/pom.xml b/pom.xml index 65b39cf..1e75ed7 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,6 @@ - falseworik-client falsework-client diff --git a/readme/login_log.png b/readme/login_log.png new file mode 100644 index 0000000..354db77 Binary files /dev/null and b/readme/login_log.png differ diff --git a/readme/online_user.png b/readme/online_user.png new file mode 100644 index 0000000..0a59df9 Binary files /dev/null and b/readme/online_user.png differ