🎉 init project

This commit is contained in:
fuhouyin 2024-05-09 13:55:26 +08:00
parent ce5e9f2ba0
commit f5c1da777b
298 changed files with 32721 additions and 1 deletions

125
README.md
View File

@ -1 +1,124 @@
# susanoo
# dillon-boot-fx
javafx权限管理系统UI
## 简介
本项目是一套权限管理系统的用户界面(UI)实现,采用 JavaFX 技术开发。该系统的用户界面参考了若依前端框架基于 RuoYi-Vue 的设计风格,旨在提供一套免费使用的权限管理系统。
以下是本项目使用的技术栈和相关组件:
应用程序结构:采用 mvvmFX 框架,该框架基于 MVVM (Model-View-ViewModel) 架构模式,用于实现数据绑定和视图模型的管理。
主题:使用 atlantafx 主题库,该主题库提供了一套现代化、响应式的用户界面风格,帮助美化系统的外观和用户体验。
组件库:初期采用 MaterialFX 组件库,但目前暂时不使用,因为作者正在进行重构工作。组件库用于提供常见的界面组件和交互元素,以简化开发过程。
图标库:使用 ikonli 图标库,该图标库提供了丰富的矢量图标集合,可用于系统的图标显示和按钮等元素的装饰。
动画库:采用 AnimateFX 动画库,该库提供了多种动画效果,可以为系统的界面元素添加各种动态效果,增强用户体验。
HTTP库使用 OpenFeign HTTP库该库提供了方便的 HTTP 请求和响应处理功能,用于与后端服务器进行通信和数据交互。
本项目的目标是提供一套完整的、易于使用的权限管理系统UI适用于个人用户和企业用户。界面设计参考了若依前端基于 RuoYi-Vue 的设计,以提供现代化、直观的用户界面。同时,使用了多种技术和组件来增强用户体验,包括数据绑定、主题化、图标和动画等方面。
请注意,本项目仅提供用户界面(UI)部分的实现,后端采用了若依/RuoYi-Cloud 框架作为后台支持。如果需要完整的权限管理系统,需要结合后端框架使用。
* 界面参考若依前端(基于 [RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue))
* 后端采用[若依/RuoYi-Cloud](https://gitee.com/y_project/RuoYi-Cloud)
* 前端技术栈:
* 应用程序结构 [mvvmFX](https://github.com/sialcasa/mvvmFX) ([文档](https://github.com/sialcasa/mvvmFX/wiki))
* 主题 [atlantafx](https://github.com/mkpaz/atlantafx) ([文档](https://mkpaz.github.io/atlantafx/))
* 组件库 [MaterialFX](https://github.com/palexdev/MaterialFX)组件都是用原生的暂时不用MaterialFX等待作者重构完成
* 图标库 [ikonli](https://github.com/kordamp/ikonli) ([文档](https://kordamp.org/ikonli/))
* 动画库 [AnimateFX](https://github.com/Typhon0/AnimateFX) ([文档](https://github.com/Typhon0/AnimateFX/wiki))
* http库 [OpenFeign](https://github.com/OpenFeign/feign)
## 启动说明
```agsl
1 在idea右侧栏找到Maven展开并点击Plugins->sass-cli:run会编译出index.css
2 运行主类org.dillon.fx.DillonBootFxApplication即可
```
# showcase:
![Image text](https://gitee.com/lwdillon/dillon-boot-fx/raw/main/readme/show.gif)
# 界面:
### 登录
![Image text](https://gitee.com/lwdillon/dillon-boot-fx/raw/main/readme/login.jpg)
### 主页
![Image text](https://gitee.com/lwdillon/dillon-boot-fx/raw/main/readme/home-dark.jpg)
![Image text](https://gitee.com/lwdillon/dillon-boot-fx/raw/main/readme/home-light.png)
### 用户管理
![Image text](https://gitee.com/lwdillon/dillon-boot-fx/raw/main/readme/user-dark.jpg)
![Image text](https://gitee.com/lwdillon/dillon-boot-fx/raw/main/readme/user-light.jpg)
### 角色管理
![Image text](https://gitee.com/lwdillon/dillon-boot-fx/raw/main/readme/role-dark.jpg)
![Image text](https://gitee.com/lwdillon/dillon-boot-fx/raw/main/readme/role-light.jpg)
### 菜单管理
![Image text](https://gitee.com/lwdillon/dillon-boot-fx/raw/main/readme/menu-dark.jpg)
![Image text](https://gitee.com/lwdillon/dillon-boot-fx/raw/main/readme/menu-light.jpg)
### 部门管理
![Image text](https://gitee.com/lwdillon/dillon-boot-fx/raw/main/readme/dept-dark.jpg)
![Image text](https://gitee.com/lwdillon/dillon-boot-fx/raw/main/readme/dept-light.jpg)
### 岗位管理
![Image text](https://gitee.com/lwdillon/dillon-boot-fx/raw/main/readme/post-dark.jpg)
![Image text](https://gitee.com/lwdillon/dillon-boot-fx/raw/main/readme/post-light.jpg)
### 字典类型
![Image text](https://gitee.com/lwdillon/dillon-boot-fx/raw/main/readme/dict-type-dark.jpg)
![Image text](https://gitee.com/lwdillon/dillon-boot-fx/raw/main/readme/dict-type-light.jpg)
### 字典数据
![Image text](https://gitee.com/lwdillon/dillon-boot-fx/raw/main/readme/dict-data-dark.jpg)
![Image text](https://gitee.com/lwdillon/dillon-boot-fx/raw/main/readme/dict-data-light.jpg)
### 参数管理
![Image text](https://gitee.com/lwdillon/dillon-boot-fx/raw/main/readme/config-dark.jpg)
![Image text](https://gitee.com/lwdillon/dillon-boot-fx/raw/main/readme/config-light.jpg)
### 通知公告
![Image text](https://gitee.com/lwdillon/dillon-boot-fx/raw/main/readme/notice-dark.jpg)
![Image text](https://gitee.com/lwdillon/dillon-boot-fx/raw/main/readme/notice-light.jpg)
### 操作日志
![Image text](https://gitee.com/lwdillon/dillon-boot-fx/raw/main/readme/operlog-dark.jpg)
![Image text](https://gitee.com/lwdillon/dillon-boot-fx/raw/main/readme/operlog-light.jpg)
### 登录日志
![Image text](https://gitee.com/lwdillon/dillon-boot-fx/raw/main/readme/logininfo-dark.jpg)
![Image text](https://gitee.com/lwdillon/dillon-boot-fx/raw/main/readme/logininfo-light.jpg)
### 服务监控
![Image text](https://gitee.com/lwdillon/dillon-boot-fx/raw/main/readme/monit-dark.jpg)
![Image text](https://gitee.com/lwdillon/dillon-boot-fx/raw/main/readme/moint-light.jpg)
## 交流群
## QQ群114697782 QQ2群808309284 QQ群518914410

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

295
pom.xml Normal file
View File

@ -0,0 +1,295 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>susanoo</groupId>
<artifactId>susanoo</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<java.version>17</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<javafx.version>17.0.7</javafx.version>
<mvvmfx-version>1.9.0-SNAPSHOT</mvvmfx-version>
<ikonli-javafx-version>12.3.1</ikonli-javafx-version>
<feign.version>12.1</feign.version>
<datafx.version>8.0.2-SNAPSHOT</datafx.version>
<atlantafx.version>2.0.0</atlantafx.version>
<spring-boot.version>2.7.1</spring-boot.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>${javafx.version}</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>${javafx.version}</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-web</artifactId>
<version>${javafx.version}</version>
</dependency>
<dependency>
<groupId>io.github.mkpaz</groupId>
<artifactId>atlantafx-base</artifactId>
<version>${atlantafx.version}</version>
</dependency>
<dependency>
<groupId>org.controlsfx</groupId>
<artifactId>controlsfx</artifactId>
<version>11.1.0</version>
</dependency>
<dependency>
<groupId>io.github.palexdev</groupId>
<artifactId>materialfx</artifactId>
<version>11.13.5</version>
</dependency>
<dependency>
<groupId>de.saxsys</groupId>
<artifactId>mvvmfx</artifactId>
<version>${mvvmfx-version}</version>
<!-- <scope>system</scope>-->
<!-- <systemPath>${pom.basedir}/libs/mvvmfx-1.9.0-SNAPSHOT.jar</systemPath>-->
</dependency>
<dependency>
<groupId>de.saxsys</groupId>
<artifactId>mvvmfx-validation</artifactId>
<version>${mvvmfx-version}</version>
<!-- <scope>system</scope>-->
<!-- <systemPath>${pom.basedir}/libs/mvvmfx-validation-1.9.0-SNAPSHOT.jar</systemPath>-->
</dependency>
<dependency>
<groupId>fr.brouillard.oss</groupId>
<artifactId>cssfx</artifactId>
<version>11.4.0</version>
</dependency>
<dependency>
<groupId>org.kordamp.ikonli</groupId>
<artifactId>ikonli-javafx</artifactId>
<version>${ikonli-javafx-version}</version>
</dependency>
<dependency>
<groupId>org.kordamp.ikonli</groupId>
<artifactId>ikonli-feather-pack</artifactId>
<version>${ikonli-javafx-version}</version>
</dependency>
<dependency>
<groupId>org.kordamp.ikonli</groupId>
<artifactId>ikonli-material2-pack</artifactId>
<version>${ikonli-javafx-version}</version>
</dependency>
<dependency>
<groupId>com.github.goxr3plus</groupId>
<artifactId>FX-BorderlessScene</artifactId>
<version>4.4.0</version>
<scope>system</scope>
<systemPath>${pom.basedir}/libs/FX-BorderlessScene-4.4.0.jar</systemPath>
</dependency>
<dependency>
<groupId>com.formdev</groupId>
<artifactId>svgSalamander</artifactId>
<version>1.1.3</version>
</dependency>
<dependency>
<groupId>org.kordamp.jipsy</groupId>
<artifactId>jipsy-processor</artifactId>
<version>1.1.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>datafx-core</groupId>
<artifactId>datafx-core</artifactId>
<version>${datafx.version}</version>
<scope>system</scope>
<systemPath>${pom.basedir}/libs/datafx-core-8.0.2-SNAPSHOT.jar</systemPath>
</dependency>
<dependency>
<groupId>io.github.typhon0</groupId>
<artifactId>AnimateFX</artifactId>
<version>1.2.3</version>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.8.4</version>
</dependency>
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-core</artifactId>
<version>${feign.version}</version>
</dependency>
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-slf4j</artifactId>
<version>${feign.version}</version>
</dependency>
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-gson</artifactId>
<version>${feign.version}</version>
</dependency>
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-okhttp</artifactId>
<version>${feign.version}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.26</version>
</dependency>
<dependency>
<groupId>com.netflix.archaius</groupId>
<artifactId>archaius-core</artifactId>
<version>0.7.6</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.datafaker</groupId>
<artifactId>datafaker</artifactId>
<version>1.3.0</version>
</dependency>
<dependency>
<groupId>com.belerweb</groupId>
<artifactId>pinyin4j</artifactId>
<version>2.5.0</version>
</dependency>
<dependency>
<groupId>com.github.haifengl</groupId>
<artifactId>smile-core</artifactId>
<version>2.6.0</version>
</dependency>
<dependency>
<groupId>eu.hansolo</groupId>
<artifactId>tilesfx</artifactId>
<version>17.0.11</version>
<exclusions>
<exclusion>
<groupId>org.openjfx</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<repositories>
<repository>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>17</source>
<target>17</target>
<release>17</release>
</configuration>
</plugin>
<!-- compile SCSS -->
<plugin>
<groupId>us.hebi.sass</groupId>
<artifactId>sass-cli-maven-plugin</artifactId>
<version>1.0.1</version>
<configuration>
<args>
<arg>
${project.basedir}/src/main/resources/styles/scss/index.scss:${project.build.directory}/classes/styles/index.css
</arg>
<arg>--no-source-map</arg>
</args>
</configuration>
<executions>
<execution>
<id>run-sass</id>
<phase>generate-resources</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
<configuration>
<mainClass>com.susanoo.fx.SusanooFxApplication</mainClass>
<includeSystemScope>true</includeSystemScope>
<skip>false</skip>
</configuration>
<executions>
<execution>
<id>repackage</id>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

BIN
readme/config-dark.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 KiB

BIN
readme/config-light.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 548 KiB

BIN
readme/dept-dark.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 KiB

BIN
readme/dept-light.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 643 KiB

BIN
readme/dict-data-dark.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 551 KiB

BIN
readme/dict-data-light.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 605 KiB

BIN
readme/dict-type-dark.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 KiB

BIN
readme/dict-type-light.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 KiB

BIN
readme/home-dark.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

BIN
readme/home-light.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 582 KiB

BIN
readme/home-light.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

BIN
readme/login.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

BIN
readme/logininfo-dark.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 530 KiB

BIN
readme/logininfo-light.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 KiB

BIN
readme/menu-dark.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

BIN
readme/menu-light.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

BIN
readme/moint-light.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 KiB

BIN
readme/monit-dark.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 497 KiB

BIN
readme/notice-dark.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 409 KiB

BIN
readme/notice-light.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 KiB

BIN
readme/operlog-dark.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 593 KiB

BIN
readme/operlog-light.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 648 KiB

BIN
readme/post-dark.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 KiB

BIN
readme/post-light.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 471 KiB

BIN
readme/role-dark.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 KiB

BIN
readme/role-light.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 460 KiB

BIN
readme/show.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 MiB

BIN
readme/user-dark.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 KiB

BIN
readme/user-light.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 475 KiB

View File

@ -0,0 +1,134 @@
package com.susanoo.fx;
import com.goxr3plus.fxborderlessscene.borderless.BorderlessPane;
import com.goxr3plus.fxborderlessscene.borderless.BorderlessScene;
import com.susanoo.fx.theme.ThemeManager;
import com.susanoo.fx.view.window.WindowView;
import com.susanoo.fx.view.window.WindowViewModel;
import de.saxsys.mvvmfx.FluentViewLoader;
import de.saxsys.mvvmfx.ViewTuple;
import fr.brouillard.oss.cssfx.CSSFX;
import fr.brouillard.oss.cssfx.api.URIToPathConverter;
import fr.brouillard.oss.cssfx.impl.log.CSSFXLogger;
import javafx.application.Application;
import javafx.css.PseudoClass;
import javafx.geometry.Insets;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.paint.Color;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URI;
import java.nio.file.Paths;
import java.util.Properties;
import static java.nio.charset.StandardCharsets.UTF_8;
/**
* JavaFX App
*/
public class AppUI extends Application {
public static final boolean IS_DEV_MODE = "DEV".equalsIgnoreCase(
Resources.getPropertyOrEnv("app.profiles.active", "app.profiles.active")
);
@Override
public void start(Stage primaryStage) throws IOException {
Thread.currentThread().setUncaughtExceptionHandler(new DefaultExceptionHandler(primaryStage));
if ("DEV".equalsIgnoreCase(System.getProperty("app.profiles.active"))) {
System.out.println("-------[WARNING] Application is running in development mode.");
}
loadApplicationProperties();
// Application.setUserAgentStylesheet(new NordDark().getUserAgentStylesheet());
ViewTuple<WindowView, WindowViewModel> viewTuple = FluentViewLoader.fxmlView(WindowView.class).load();
Parent mainView = viewTuple.getView();
BorderlessScene scene = new BorderlessScene(primaryStage, StageStyle.TRANSPARENT, mainView, 250, 250);
BorderlessPane rootPane = (BorderlessPane) scene.getRoot();
rootPane.setPadding(new Insets(15, 15, 15, 15));
var tm = ThemeManager.getInstance();
tm.setScene(scene);
tm.setTheme(tm.getDefaultTheme());
if ("DEV".equalsIgnoreCase(System.getProperty("app.profiles.active"))) {
startCssFX(scene);
}
scene.removeDefaultCSS();
scene.setMoveControl(mainView);
scene.setFill(Color.TRANSPARENT);
// viewTuple.getViewModel().setTitle(System.getProperty("app.name"));
primaryStage.setTitle(System.getProperty("app.name"));
scene.getStylesheets().addAll(AppUI.class.getResource("/styles/index.css").toExternalForm());
scene.maximizedProperty().addListener((observableValue, oldVal, newVal) -> {
if (newVal) {
rootPane.setPadding(new Insets(0, 0, 0, 0));
} else {
rootPane.setPadding(new Insets(15, 15, 15, 15));
}
// viewTuple.getViewModel().setMaximized(newVal);
});
PseudoClass CUSTOM_THEME = PseudoClass.getPseudoClass("custom-theme");
scene.getRoot().pseudoClassStateChanged(CUSTOM_THEME, true);
//Show
primaryStage.setScene(scene);
primaryStage.setWidth(900);
primaryStage.setHeight(600);
// primaryStage.titleProperty().bind(viewTuple.getViewModel().titleProperty());
primaryStage.show();
}
private void loadApplicationProperties() {
try {
var properties = new Properties();
properties.load(new InputStreamReader(Resources.getResourceAsStream("application.properties"), UTF_8));
properties.forEach((key, value) -> System.setProperty(
String.valueOf(key),
String.valueOf(value)
));
} catch (IOException e) {
throw new RuntimeException(e);
}
}
private void startCssFX(Scene scene) {
URIToPathConverter fileUrlConverter = uri -> {
try {
if (uri != null && uri.startsWith("file:")) {
return Paths.get(URI.create(uri));
}
} catch (Exception e) {
e.printStackTrace();
}
return null;
};
CSSFX.addConverter(fileUrlConverter).start();
CSSFXLogger.setLoggerFactory(loggerName -> (level, message, args) ->
System.out.println("[CSSFX] " + String.format(message, args))
);
CSSFX.start(scene);
}
public static void main(String[] args) {
launch(args);
}
}

View File

@ -0,0 +1,65 @@
/* SPDX-License-Identifier: MIT */
package com.susanoo.fx;
import javafx.scene.control.Alert;
import javafx.scene.control.Alert.AlertType;
import javafx.scene.control.Label;
import javafx.scene.control.TextArea;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Objects;
import static java.lang.Double.MAX_VALUE;
public class DefaultExceptionHandler implements Thread.UncaughtExceptionHandler {
private final Stage stage;
public DefaultExceptionHandler(Stage stage) {
this.stage = stage;
}
@Override
public void uncaughtException(Thread t, Throwable e) {
e.printStackTrace();
var dialog = createExceptionDialog(e);
if (dialog != null) { dialog.showAndWait(); }
}
private Alert createExceptionDialog(Throwable throwable) {
Objects.requireNonNull(throwable);
var alert = new Alert(AlertType.ERROR);
alert.setTitle("Error");
alert.setHeaderText(null);
alert.setContentText(throwable.getMessage());
try (var sw = new StringWriter(); var printWriter = new PrintWriter(sw)) {
throwable.printStackTrace(printWriter);
var label = new Label("Full stacktrace:");
var textArea = new TextArea(sw.toString());
textArea.setEditable(false);
textArea.setWrapText(false);
textArea.setMaxWidth(MAX_VALUE);
textArea.setMaxHeight(MAX_VALUE);
var content = new VBox(5, label, textArea);
content.setMaxWidth(MAX_VALUE);
alert.getDialogPane().setExpandableContent(content);
alert.initOwner(stage);
return alert;
} catch (IOException e) {
e.printStackTrace();
return null;
}
}
}

View File

@ -0,0 +1,75 @@
/* SPDX-License-Identifier: MIT */
package com.susanoo.fx;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Objects;
public final class FileResource {
private final String location;
private final boolean internal;
private final Class<?> anchor;
private FileResource(String location, boolean internal, Class<?> anchor) {
this.location = location;
this.internal = internal;
this.anchor = anchor;
}
public String location() {
return location;
}
public boolean internal() {
return internal;
}
public boolean exists() {
return internal ? anchor.getResource(location) != null : Files.exists(toPath());
}
public Path toPath() {
return Paths.get(location);
}
public URI toURI() {
// the latter adds "file://" scheme to the URI
return internal ? URI.create(location) : Paths.get(location).toUri();
}
public String getFilename() {
return Paths.get(location).getFileName().toString();
}
public InputStream getInputStream() throws IOException {
if (internal) {
var is = anchor.getResourceAsStream(location);
if (is == null) {
throw new IOException("Resource not found: " + location);
}
return is;
}
return new FileInputStream(toPath().toFile());
}
///////////////////////////////////////////////////////////////////////////
public static FileResource createInternal(String location) {
return createInternal(location, FileResource.class);
}
public static FileResource createInternal(String location, Class<?> anchor) {
return new FileResource(location, true, Objects.requireNonNull(anchor));
}
public static FileResource createExternal(String location) {
return new FileResource(location, false, null);
}
}

View File

@ -0,0 +1,40 @@
/* SPDX-License-Identifier: MIT */
package com.susanoo.fx;
import java.io.InputStream;
import java.net.URI;
import java.net.URL;
import java.util.Objects;
import java.util.prefs.Preferences;
public final class Resources {
public static final String MODULE_DIR = "/";
public static InputStream getResourceAsStream(String resource) {
String path = resolve(resource);
return Objects.requireNonNull(
AppUI.class.getResourceAsStream(resolve(path)),
"Resource not found: " + path
);
}
public static URI getResource(String resource) {
String path = resolve(resource);
URL url = Objects.requireNonNull(AppUI.class.getResource(resolve(path)), "Resource not found: " + path);
return URI.create(url.toExternalForm());
}
public static String resolve(String resource) {
Objects.requireNonNull(resource);
return resource.startsWith("/") ? resource : MODULE_DIR + resource;
}
public static String getPropertyOrEnv(String propertyKey, String envKey) {
return System.getProperty(propertyKey, System.getenv(envKey));
}
public static Preferences getPreferences() {
return Preferences.userRoot().node("atlantafx");
}
}

View File

@ -0,0 +1,18 @@
package com.susanoo.fx;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
@SpringBootApplication
public class SusanooFxApplication {
public SusanooFxApplication() {
AppUI.main(new String[]{});
}
public static void main(String[] args) {
// 初始化Logback
new SpringApplicationBuilder(SusanooFxApplication.class).headless(false).run(args);
}
}

View File

@ -0,0 +1,130 @@
package com.susanoo.fx.constant;
/**
* 通用常量信息
*
* @author ruoyi
*/
public class Constants
{
/**
* UTF-8 字符集
*/
public static final String UTF8 = "UTF-8";
/**
* GBK 字符集
*/
public static final String GBK = "GBK";
/**
* www主域
*/
public static final String WWW = "www.";
/**
* RMI 远程方法调用
*/
public static final String LOOKUP_RMI = "rmi:";
/**
* LDAP 远程方法调用
*/
public static final String LOOKUP_LDAP = "ldap:";
/**
* LDAPS 远程方法调用
*/
public static final String LOOKUP_LDAPS = "ldaps:";
/**
* http请求
*/
public static final String HTTP = "http://";
/**
* https请求
*/
public static final String HTTPS = "https://";
/**
* 成功标记
*/
public static final Integer SUCCESS = 200;
/**
* 失败标记
*/
public static final Integer FAIL = 500;
/**
* 登录成功状态
*/
public static final String LOGIN_SUCCESS_STATUS = "0";
/**
* 登录失败状态
*/
public static final String LOGIN_FAIL_STATUS = "1";
/**
* 登录成功
*/
public static final String LOGIN_SUCCESS = "Success";
/**
* 注销
*/
public static final String LOGOUT = "Logout";
/**
* 注册
*/
public static final String REGISTER = "Register";
/**
* 登录失败
*/
public static final String LOGIN_FAIL = "Error";
/**
* 当前记录起始索引
*/
public static final String PAGE_NUM = "pageNum";
/**
* 每页显示记录数
*/
public static final String PAGE_SIZE = "pageSize";
/**
* 排序列
*/
public static final String ORDER_BY_COLUMN = "orderByColumn";
/**
* 排序的方向 "desc" 或者 "asc".
*/
public static final String IS_ASC = "isAsc";
/**
* 验证码有效期分钟
*/
public static final long CAPTCHA_EXPIRATION = 2;
/**
* 资源映射路径 前缀
*/
public static final String RESOURCE_PREFIX = "/profile";
/**
* 定时任务白名单配置仅允许访问的包名如其他需要可以自行添加
*/
public static final String[] JOB_WHITELIST_STR = { "com.ruoyi" };
/**
* 定时任务违规的字符
*/
public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
"org.springframework", "org.apache", "com.ruoyi.common.core.utils.file" };
}

View File

@ -0,0 +1,94 @@
package com.susanoo.fx.constant;
/**
* 返回状态码
*
* @author ruoyi
*/
public class HttpStatus
{
/**
* 操作成功
*/
public static final int SUCCESS = 200;
/**
* 对象创建成功
*/
public static final int CREATED = 201;
/**
* 请求已经被接受
*/
public static final int ACCEPTED = 202;
/**
* 操作已经执行成功但是没有返回数据
*/
public static final int NO_CONTENT = 204;
/**
* 资源已被移除
*/
public static final int MOVED_PERM = 301;
/**
* 重定向
*/
public static final int SEE_OTHER = 303;
/**
* 资源没有被修改
*/
public static final int NOT_MODIFIED = 304;
/**
* 参数列表错误缺少格式不匹配
*/
public static final int BAD_REQUEST = 400;
/**
* 未授权
*/
public static final int UNAUTHORIZED = 401;
/**
* 访问受限授权过期
*/
public static final int FORBIDDEN = 403;
/**
* 资源服务未找到
*/
public static final int NOT_FOUND = 404;
/**
* 不允许的http方法
*/
public static final int BAD_METHOD = 405;
/**
* 资源冲突或者资源被锁
*/
public static final int CONFLICT = 409;
/**
* 不支持的数据媒体类型
*/
public static final int UNSUPPORTED_TYPE = 415;
/**
* 系统内部错误
*/
public static final int ERROR = 500;
/**
* 接口未实现
*/
public static final int NOT_IMPLEMENTED = 501;
/**
* 系统警告消息
*/
public static final int WARN = 601;
}

View File

@ -0,0 +1,14 @@
package com.susanoo.fx.domain;
import lombok.Data;
@Data
public class ActiveProjects {
private String projectName;
private String projectLead;
private String assignee;
private String status;
private Double progress;
private String dueDate;
}

View File

@ -0,0 +1,208 @@
package com.susanoo.fx.domain;
import cn.hutool.core.util.ObjectUtil;
import com.susanoo.fx.constant.HttpStatus;
import java.util.HashMap;
import java.util.Objects;
/**
* 操作消息提醒
*
* @author ruoyi
*/
public class AjaxResult extends HashMap<String, Object>
{
private static final long serialVersionUID = 1L;
/** 状态码 */
public static final String CODE_TAG = "code";
/** 返回内容 */
public static final String MSG_TAG = "msg";
/** 数据对象 */
public static final String DATA_TAG = "data";
/**
* 初始化一个新创建的 AjaxResult 对象使其表示一个空消息
*/
public AjaxResult()
{
}
/**
* 初始化一个新创建的 AjaxResult 对象
*
* @param code 状态码
* @param msg 返回内容
*/
public AjaxResult(int code, String msg)
{
super.put(CODE_TAG, code);
super.put(MSG_TAG, msg);
}
/**
* 初始化一个新创建的 AjaxResult 对象
*
* @param code 状态码
* @param msg 返回内容
* @param data 数据对象
*/
public AjaxResult(int code, String msg, Object data)
{
super.put(CODE_TAG, code);
super.put(MSG_TAG, msg);
if (ObjectUtil.isNotNull(data))
{
super.put(DATA_TAG, data);
}
}
/**
* 返回成功消息
*
* @return 成功消息
*/
public static AjaxResult success()
{
return AjaxResult.success("操作成功");
}
/**
* 返回成功数据
*
* @return 成功消息
*/
public static AjaxResult success(Object data)
{
return AjaxResult.success("操作成功", data);
}
/**
* 返回成功消息
*
* @param msg 返回内容
* @return 成功消息
*/
public static AjaxResult success(String msg)
{
return AjaxResult.success(msg, null);
}
/**
* 返回成功消息
*
* @param msg 返回内容
* @param data 数据对象
* @return 成功消息
*/
public static AjaxResult success(String msg, Object data)
{
return new AjaxResult(HttpStatus.SUCCESS, msg, data);
}
/**
* 返回警告消息
*
* @param msg 返回内容
* @return 警告消息
*/
public static AjaxResult warn(String msg)
{
return AjaxResult.warn(msg, null);
}
/**
* 返回警告消息
*
* @param msg 返回内容
* @param data 数据对象
* @return 警告消息
*/
public static AjaxResult warn(String msg, Object data)
{
return new AjaxResult(HttpStatus.WARN, msg, data);
}
/**
* 返回错误消息
*
* @return 错误消息
*/
public static AjaxResult error()
{
return AjaxResult.error("操作失败");
}
/**
* 返回错误消息
*
* @param msg 返回内容
* @return 错误消息
*/
public static AjaxResult error(String msg)
{
return AjaxResult.error(msg, null);
}
/**
* 返回错误消息
*
* @param msg 返回内容
* @param data 数据对象
* @return 错误消息
*/
public static AjaxResult error(String msg, Object data)
{
return new AjaxResult(HttpStatus.ERROR, msg, data);
}
/**
* 返回错误消息
*
* @param code 状态码
* @param msg 返回内容
* @return 错误消息
*/
public static AjaxResult error(int code, String msg)
{
return new AjaxResult(code, msg, null);
}
/**
* 是否为成功消息
*
* @return 结果
*/
public boolean isSuccess()
{
return Objects.equals(HttpStatus.SUCCESS, this.get(CODE_TAG));
}
/**
* 是否为错误消息
*
* @return 结果
*/
public boolean isError()
{
return !isSuccess();
}
/**
* 方便链式调用
*
* @param key
* @param value
* @return
*/
@Override
public AjaxResult put(String key, Object value)
{
super.put(key, value);
return this;
}
}

View File

@ -0,0 +1,112 @@
package com.susanoo.fx.domain;
import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
/**
* Entity基类
*
* @author ruoyi
*/
public class BaseEntity implements Serializable
{
private static final long serialVersionUID = 1L;
/** 搜索值 */
private String searchValue;
/** 创建者 */
private String createBy;
/** 创建时间 */
private Date createTime;
/** 更新者 */
private String updateBy;
/** 更新时间 */
private Date updateTime;
/** 备注 */
private String remark;
/** 请求参数 */
private Map<String, Object> params;
public String getSearchValue()
{
return searchValue;
}
public void setSearchValue(String searchValue)
{
this.searchValue = searchValue;
}
public String getCreateBy()
{
return createBy;
}
public void setCreateBy(String createBy)
{
this.createBy = createBy;
}
public Date getCreateTime()
{
return createTime;
}
public void setCreateTime(Date createTime)
{
this.createTime = createTime;
}
public String getUpdateBy()
{
return updateBy;
}
public void setUpdateBy(String updateBy)
{
this.updateBy = updateBy;
}
public Date getUpdateTime()
{
return updateTime;
}
public void setUpdateTime(Date updateTime)
{
this.updateTime = updateTime;
}
public String getRemark()
{
return remark;
}
public void setRemark(String remark)
{
this.remark = remark;
}
public Map<String, Object> getParams()
{
if (params == null)
{
params = new HashMap<>();
}
return params;
}
public void setParams(Map<String, Object> params)
{
this.params = params;
}
}

View File

@ -0,0 +1,149 @@
package com.susanoo.fx.domain;
import java.io.Serializable;
import java.util.Set;
/**
* 用户信息
*
* @author ruoyi
*/
public class LoginUser implements Serializable
{
private static final long serialVersionUID = 1L;
/**
* 用户唯一标识
*/
private String token;
/**
* 用户名id
*/
private Long userid;
/**
* 用户名
*/
private String username;
/**
* 登录时间
*/
private Long loginTime;
/**
* 过期时间
*/
private Long expireTime;
/**
* 登录IP地址
*/
private String ipaddr;
/**
* 权限列表
*/
private Set<String> permissions;
/**
* 角色列表
*/
private Set<String> roles;
/**
* 用户信息
*/
private SysUser sysUser;
public String getToken()
{
return token;
}
public void setToken(String token)
{
this.token = token;
}
public Long getUserid()
{
return userid;
}
public void setUserid(Long userid)
{
this.userid = userid;
}
public String getUsername()
{
return username;
}
public void setUsername(String username)
{
this.username = username;
}
public Long getLoginTime()
{
return loginTime;
}
public void setLoginTime(Long loginTime)
{
this.loginTime = loginTime;
}
public Long getExpireTime()
{
return expireTime;
}
public void setExpireTime(Long expireTime)
{
this.expireTime = expireTime;
}
public String getIpaddr()
{
return ipaddr;
}
public void setIpaddr(String ipaddr)
{
this.ipaddr = ipaddr;
}
public Set<String> getPermissions()
{
return permissions;
}
public void setPermissions(Set<String> permissions)
{
this.permissions = permissions;
}
public Set<String> getRoles()
{
return roles;
}
public void setRoles(Set<String> roles)
{
this.roles = roles;
}
public SysUser getSysUser()
{
return sysUser;
}
public void setSysUser(SysUser sysUser)
{
this.sysUser = sysUser;
}
}

View File

@ -0,0 +1,117 @@
package com.susanoo.fx.domain;
import com.susanoo.fx.constant.Constants;
import java.io.Serializable;
/**
* 响应信息主体
*
* @author ruoyi
*/
public class R<T> implements Serializable
{
private static final long serialVersionUID = 1L;
/** 成功 */
public static final int SUCCESS = Constants.SUCCESS;
/** 失败 */
public static final int FAIL = Constants.FAIL;
private int code;
private String msg;
private T data;
public static <T> R<T> ok()
{
return restResult(null, SUCCESS, null);
}
public static <T> R<T> ok(T data)
{
return restResult(data, SUCCESS, null);
}
public static <T> R<T> ok(T data, String msg)
{
return restResult(data, SUCCESS, msg);
}
public static <T> R<T> fail()
{
return restResult(null, FAIL, null);
}
public static <T> R<T> fail(String msg)
{
return restResult(null, FAIL, msg);
}
public static <T> R<T> fail(T data)
{
return restResult(data, FAIL, null);
}
public static <T> R<T> fail(T data, String msg)
{
return restResult(data, FAIL, msg);
}
public static <T> R<T> fail(int code, String msg)
{
return restResult(null, code, msg);
}
private static <T> R<T> restResult(T data, int code, String msg)
{
R<T> apiResult = new R<>();
apiResult.setCode(code);
apiResult.setData(data);
apiResult.setMsg(msg);
return apiResult;
}
public int getCode()
{
return code;
}
public void setCode(int code)
{
this.code = code;
}
public String getMsg()
{
return msg;
}
public void setMsg(String msg)
{
this.msg = msg;
}
public T getData()
{
return data;
}
public void setData(T data)
{
this.data = data;
}
public static <T> Boolean isError(R<T> ret)
{
return !isSuccess(ret);
}
public static <T> Boolean isSuccess(R<T> ret)
{
return R.SUCCESS == ret.getCode();
}
}

View File

@ -0,0 +1,13 @@
package com.susanoo.fx.domain;
import lombok.Data;
@Data
public class Roects {
private String no;
private String projectName;
private String startDate;
private String dueDate;
private String status;
private String clients;
}

View File

@ -0,0 +1,140 @@
package com.susanoo.fx.domain;
import com.susanoo.fx.domain.server.*;
import java.net.UnknownHostException;
import java.util.LinkedList;
import java.util.List;
import java.util.Properties;
/**
* 服务器相关信息
*
* @author ruoyi
*/
public class Server
{
private static final int OSHI_WAIT_SECOND = 1000;
/**
* CPU相关信息
*/
private Cpu cpu = new Cpu();
/**
* 內存相关信息
*/
private Mem mem = new Mem();
/**
* JVM相关信息
*/
private Jvm jvm = new Jvm();
/**
* 服务器相关信息
*/
private Sys sys = new Sys();
/**
* 磁盘相关信息
*/
private List<SysFile> sysFiles = new LinkedList<SysFile>();
public Cpu getCpu()
{
return cpu;
}
public void setCpu(Cpu cpu)
{
this.cpu = cpu;
}
public Mem getMem()
{
return mem;
}
public void setMem(Mem mem)
{
this.mem = mem;
}
public Jvm getJvm()
{
return jvm;
}
public void setJvm(Jvm jvm)
{
this.jvm = jvm;
}
public Sys getSys()
{
return sys;
}
public void setSys(Sys sys)
{
this.sys = sys;
}
public List<SysFile> getSysFiles()
{
return sysFiles;
}
public void setSysFiles(List<SysFile> sysFiles)
{
this.sysFiles = sysFiles;
}
/**
* 设置Java虚拟机
*/
private void setJvmInfo() throws UnknownHostException
{
Properties props = System.getProperties();
jvm.setTotal(Runtime.getRuntime().totalMemory());
jvm.setMax(Runtime.getRuntime().maxMemory());
jvm.setFree(Runtime.getRuntime().freeMemory());
jvm.setVersion(props.getProperty("java.version"));
jvm.setHome(props.getProperty("java.home"));
}
/**
* 字节转换
*
* @param size 字节大小
* @return 转换后值
*/
public String convertFileSize(long size)
{
long kb = 1024;
long mb = kb * 1024;
long gb = mb * 1024;
if (size >= gb)
{
return String.format("%.1f GB", (float) size / gb);
}
else if (size >= mb)
{
float f = (float) size / mb;
return String.format(f > 100 ? "%.0f MB" : "%.1f MB", f);
}
else if (size >= kb)
{
float f = (float) size / kb;
return String.format(f > 100 ? "%.0f KB" : "%.1f KB", f);
}
else
{
return String.format("%d B", size);
}
}
}

View File

@ -0,0 +1,96 @@
package com.susanoo.fx.domain;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
/**
* 参数配置表 sys_config
*
* @author ruoyi
*/
public class SysConfig extends BaseEntity
{
private static final long serialVersionUID = 1L;
private final BooleanProperty select = new SimpleBooleanProperty(false);
/** 参数主键 */
private Long configId;
/** 参数名称 */
private String configName;
/** 参数键名 */
private String configKey;
/** 参数键值 */
private String configValue;
/** 系统内置Y是 N否 */
private String configType;
public Long getConfigId()
{
return configId;
}
public void setConfigId(Long configId)
{
this.configId = configId;
}
public String getConfigName()
{
return configName;
}
public void setConfigName(String configName)
{
this.configName = configName;
}
public String getConfigKey()
{
return configKey;
}
public void setConfigKey(String configKey)
{
this.configKey = configKey;
}
public String getConfigValue()
{
return configValue;
}
public void setConfigValue(String configValue)
{
this.configValue = configValue;
}
public String getConfigType()
{
return configType;
}
public void setConfigType(String configType)
{
this.configType = configType;
}
public boolean isSelect() {
return select.get();
}
public BooleanProperty selectProperty() {
return select;
}
public void setSelect(boolean select) {
this.select.set(select);
}
}

View File

@ -0,0 +1,172 @@
package com.susanoo.fx.domain;
import java.util.ArrayList;
import java.util.List;
/**
* 部门表 sys_dept
*
* @author ruoyi
*/
public class SysDept extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 部门ID */
private Long deptId;
/** 父部门ID */
private Long parentId;
/** 祖级列表 */
private String ancestors;
/** 部门名称 */
private String deptName;
/** 显示顺序 */
private Integer orderNum;
/** 负责人 */
private String leader;
/** 联系电话 */
private String phone;
/** 邮箱 */
private String email;
/** 部门状态:0正常,1停用 */
private String status;
/** 删除标志0代表存在 2代表删除 */
private String delFlag;
/** 父部门名称 */
private String parentName;
/** 子部门 */
private List<SysDept> children = new ArrayList<SysDept>();
public Long getDeptId()
{
return deptId;
}
public void setDeptId(Long deptId)
{
this.deptId = deptId;
}
public Long getParentId()
{
return parentId;
}
public void setParentId(Long parentId)
{
this.parentId = parentId;
}
public String getAncestors()
{
return ancestors;
}
public void setAncestors(String ancestors)
{
this.ancestors = ancestors;
}
public String getDeptName()
{
return deptName;
}
public void setDeptName(String deptName)
{
this.deptName = deptName;
}
public Integer getOrderNum()
{
return orderNum;
}
public void setOrderNum(Integer orderNum)
{
this.orderNum = orderNum;
}
public String getLeader()
{
return leader;
}
public void setLeader(String leader)
{
this.leader = leader;
}
public String getPhone()
{
return phone;
}
public void setPhone(String phone)
{
this.phone = phone;
}
public String getEmail()
{
return email;
}
public void setEmail(String email)
{
this.email = email;
}
public String getStatus()
{
return status;
}
public void setStatus(String status)
{
this.status = status;
}
public String getDelFlag()
{
return delFlag;
}
public void setDelFlag(String delFlag)
{
this.delFlag = delFlag;
}
public String getParentName()
{
return parentName;
}
public void setParentName(String parentName)
{
this.parentName = parentName;
}
public List<SysDept> getChildren()
{
return children;
}
public void setChildren(List<SysDept> children)
{
this.children = children;
}
}

View File

@ -0,0 +1,159 @@
package com.susanoo.fx.domain;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javax.validation.constraints.Size;
/**
* 字典数据表 sys_dict_data
*
* @author ruoyi
*/
public class SysDictData extends BaseEntity {
private static final long serialVersionUID = 1L;
private final BooleanProperty select = new SimpleBooleanProperty(false);
/**
* 字典编码
*/
private Long dictCode;
/**
* 字典排序
*/
private Long dictSort;
/**
* 字典标签
*/
private String dictLabel;
/**
* 字典键值
*/
private String dictValue;
/**
* 字典类型
*/
private String dictType;
/**
* 样式属性其他样式扩展
*/
private String cssClass;
/**
* 表格字典样式
*/
private String listClass;
/**
* 是否默认Y是 N否
*/
private String isDefault;
/**
* 状态0正常 1停用
*/
private String status;
public Long getDictCode() {
return dictCode;
}
public void setDictCode(Long dictCode) {
this.dictCode = dictCode;
}
public Long getDictSort() {
return dictSort;
}
public void setDictSort(Long dictSort) {
this.dictSort = dictSort;
}
@Size(min = 0, max = 100, message = "字典标签长度不能超过100个字符")
public String getDictLabel() {
return dictLabel;
}
public void setDictLabel(String dictLabel) {
this.dictLabel = dictLabel;
}
@Size(min = 0, max = 100, message = "字典键值长度不能超过100个字符")
public String getDictValue() {
return dictValue;
}
public void setDictValue(String dictValue) {
this.dictValue = dictValue;
}
@Size(min = 0, max = 100, message = "字典类型长度不能超过100个字符")
public String getDictType() {
return dictType;
}
public void setDictType(String dictType) {
this.dictType = dictType;
}
@Size(min = 0, max = 100, message = "样式属性长度不能超过100个字符")
public String getCssClass() {
return cssClass;
}
public void setCssClass(String cssClass) {
this.cssClass = cssClass;
}
public String getListClass() {
return listClass;
}
public void setListClass(String listClass) {
this.listClass = listClass;
}
public boolean getDefault() {
return "Y".equals(this.isDefault);
}
public String getIsDefault() {
return isDefault;
}
public void setIsDefault(String isDefault) {
this.isDefault = isDefault;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public boolean isSelect() {
return select.get();
}
public BooleanProperty selectProperty() {
return select;
}
public void setSelect(boolean select) {
this.select.set(select);
}
@Override
public String toString() {
return dictLabel;
}
}

View File

@ -0,0 +1,93 @@
package com.susanoo.fx.domain;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
/**
* 字典类型表 sys_dict_type
*
* @author ruoyi
*/
public class SysDictType extends BaseEntity
{
private static final long serialVersionUID = 1L;
private final BooleanProperty select = new SimpleBooleanProperty(false);
/** 字典主键 */
private Long dictId;
/** 字典名称 */
private String dictName;
/** 字典类型 */
private String dictType;
/** 状态0正常 1停用 */
private String status;
public Long getDictId()
{
return dictId;
}
public void setDictId(Long dictId)
{
this.dictId = dictId;
}
@Size(min = 0, max = 100, message = "字典类型名称长度不能超过100个字符")
public String getDictName()
{
return dictName;
}
public void setDictName(String dictName)
{
this.dictName = dictName;
}
@Size(min = 0, max = 100, message = "字典类型类型长度不能超过100个字符")
@Pattern(regexp = "^[a-z][a-z0-9_]*$", message = "字典类型必须以字母开头,且只能为(小写字母,数字,下滑线)")
public String getDictType()
{
return dictType;
}
public void setDictType(String dictType)
{
this.dictType = dictType;
}
public String getStatus()
{
return status;
}
public void setStatus(String status)
{
this.status = status;
}
public boolean isSelect() {
return select.get();
}
public BooleanProperty selectProperty() {
return select;
}
public void setSelect(boolean select) {
this.select.set(select);
}
@Override
public String toString() {
return dictName;
}
}

View File

@ -0,0 +1,109 @@
package com.susanoo.fx.domain;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import java.util.Date;
/**
* 系统访问记录表 sys_logininfor
*
* @author ruoyi
*/
public class SysLogininfor extends BaseEntity
{
private static final long serialVersionUID = 1L;
private final BooleanProperty select = new SimpleBooleanProperty(false);
/** ID */
private Long infoId;
/** 用户账号 */
private String userName;
/** 状态 0成功 1失败 */
private String status;
/** 地址 */
private String ipaddr;
/** 描述 */
private String msg;
/** 访问时间 */
private Date accessTime;
public Long getInfoId()
{
return infoId;
}
public void setInfoId(Long infoId)
{
this.infoId = infoId;
}
public String getUserName()
{
return userName;
}
public void setUserName(String userName)
{
this.userName = userName;
}
public String getStatus()
{
return status;
}
public void setStatus(String status)
{
this.status = status;
}
public String getIpaddr()
{
return ipaddr;
}
public void setIpaddr(String ipaddr)
{
this.ipaddr = ipaddr;
}
public String getMsg()
{
return msg;
}
public void setMsg(String msg)
{
this.msg = msg;
}
public Date getAccessTime()
{
return accessTime;
}
public void setAccessTime(Date accessTime)
{
this.accessTime = accessTime;
}
public boolean isSelect() {
return select.get();
}
public BooleanProperty selectProperty() {
return select;
}
public void setSelect(boolean select) {
this.select.set(select);
}
}

View File

@ -0,0 +1,224 @@
package com.susanoo.fx.domain;
import java.util.ArrayList;
import java.util.List;
/**
* 菜单权限表 sys_menu
*
* @author ruoyi
*/
public class SysMenu extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 菜单ID */
private Long menuId;
/** 菜单名称 */
private String menuName;
/** 父菜单名称 */
private String parentName;
/** 父菜单ID */
private Long parentId;
/** 显示顺序 */
private Integer orderNum;
/** 路由地址 */
private String path;
/** 组件路径 */
private String component;
/** 路由参数 */
private String query;
/** 是否为外链0是 1否 */
private String isFrame;
/** 是否缓存0缓存 1不缓存 */
private String isCache;
/** 类型M目录 C菜单 F按钮 */
private String menuType;
/** 显示状态0显示 1隐藏 */
private String visible;
/** 菜单状态0正常 1停用 */
private String status;
/** 权限字符串 */
private String perms;
/** 菜单图标 */
private String icon;
/** 子菜单 */
private List<SysMenu> children = new ArrayList<SysMenu>();
public Long getMenuId()
{
return menuId;
}
public void setMenuId(Long menuId)
{
this.menuId = menuId;
}
public String getMenuName()
{
return menuName;
}
public void setMenuName(String menuName)
{
this.menuName = menuName;
}
public String getParentName()
{
return parentName;
}
public void setParentName(String parentName)
{
this.parentName = parentName;
}
public Long getParentId()
{
return parentId;
}
public void setParentId(Long parentId)
{
this.parentId = parentId;
}
public Integer getOrderNum()
{
return orderNum;
}
public void setOrderNum(Integer orderNum)
{
this.orderNum = orderNum;
}
public String getPath()
{
return path;
}
public void setPath(String path)
{
this.path = path;
}
public String getComponent()
{
return component;
}
public void setComponent(String component)
{
this.component = component;
}
public String getQuery()
{
return query;
}
public void setQuery(String query)
{
this.query = query;
}
public String getIsFrame()
{
return isFrame;
}
public void setIsFrame(String isFrame)
{
this.isFrame = isFrame;
}
public String getIsCache()
{
return isCache;
}
public void setIsCache(String isCache)
{
this.isCache = isCache;
}
public String getMenuType()
{
return menuType;
}
public void setMenuType(String menuType)
{
this.menuType = menuType;
}
public String getVisible()
{
return visible;
}
public void setVisible(String visible)
{
this.visible = visible;
}
public String getStatus()
{
return status;
}
public void setStatus(String status)
{
this.status = status;
}
public String getPerms()
{
return perms;
}
public void setPerms(String perms)
{
this.perms = perms;
}
public String getIcon()
{
return icon;
}
public void setIcon(String icon)
{
this.icon = icon;
}
public List<SysMenu> getChildren()
{
return children;
}
public void setChildren(List<SysMenu> children)
{
this.children = children;
}
}

View File

@ -0,0 +1,94 @@
package com.susanoo.fx.domain;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
/**
* 通知公告表 sys_notice
*
* @author ruoyi
*/
public class SysNotice extends BaseEntity
{
private static final long serialVersionUID = 1L;
private final BooleanProperty select = new SimpleBooleanProperty(false);
/** 公告ID */
private Long noticeId;
/** 公告标题 */
private String noticeTitle;
/** 公告类型1通知 2公告 */
private String noticeType;
/** 公告内容 */
private String noticeContent;
/** 公告状态0正常 1关闭 */
private String status;
public Long getNoticeId()
{
return noticeId;
}
public void setNoticeId(Long noticeId)
{
this.noticeId = noticeId;
}
public void setNoticeTitle(String noticeTitle)
{
this.noticeTitle = noticeTitle;
}
public String getNoticeTitle()
{
return noticeTitle;
}
public void setNoticeType(String noticeType)
{
this.noticeType = noticeType;
}
public String getNoticeType()
{
return noticeType;
}
public void setNoticeContent(String noticeContent)
{
this.noticeContent = noticeContent;
}
public String getNoticeContent()
{
return noticeContent;
}
public void setStatus(String status)
{
this.status = status;
}
public String getStatus()
{
return status;
}
public boolean isSelect() {
return select.get();
}
public BooleanProperty selectProperty() {
return select;
}
public void setSelect(boolean select) {
this.select.set(select);
}
}

View File

@ -0,0 +1,252 @@
package com.susanoo.fx.domain;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import java.util.Date;
/**
* 操作日志记录表 oper_log
*
* @author ruoyi
*/
public class SysOperLog extends BaseEntity
{
private static final long serialVersionUID = 1L;
private final BooleanProperty select = new SimpleBooleanProperty(false);
/** 日志主键 */
private Long operId;
/** 操作模块 */
private String title;
/** 业务类型0其它 1新增 2修改 3删除 */
private Integer businessType;
/** 业务类型数组 */
private Integer[] businessTypes;
/** 请求方法 */
private String method;
/** 请求方式 */
private String requestMethod;
/** 操作类别0其它 1后台用户 2手机端用户 */
private Integer operatorType;
/** 操作人员 */
private String operName;
/** 部门名称 */
private String deptName;
/** 请求url */
private String operUrl;
/** 操作地址 */
private String operIp;
/** 请求参数 */
private String operParam;
/** 返回参数 */
private String jsonResult;
/** 操作状态0正常 1异常 */
private Integer status;
/** 错误消息 */
private String errorMsg;
/** 操作时间 */
private Date operTime;
/** 消耗时间 */
private Long costTime;
public Long getOperId()
{
return operId;
}
public void setOperId(Long operId)
{
this.operId = operId;
}
public String getTitle()
{
return title;
}
public void setTitle(String title)
{
this.title = title;
}
public Integer getBusinessType()
{
return businessType;
}
public void setBusinessType(Integer businessType)
{
this.businessType = businessType;
}
public Integer[] getBusinessTypes()
{
return businessTypes;
}
public void setBusinessTypes(Integer[] businessTypes)
{
this.businessTypes = businessTypes;
}
public String getMethod()
{
return method;
}
public void setMethod(String method)
{
this.method = method;
}
public String getRequestMethod()
{
return requestMethod;
}
public void setRequestMethod(String requestMethod)
{
this.requestMethod = requestMethod;
}
public Integer getOperatorType()
{
return operatorType;
}
public void setOperatorType(Integer operatorType)
{
this.operatorType = operatorType;
}
public String getOperName()
{
return operName;
}
public void setOperName(String operName)
{
this.operName = operName;
}
public String getDeptName()
{
return deptName;
}
public void setDeptName(String deptName)
{
this.deptName = deptName;
}
public String getOperUrl()
{
return operUrl;
}
public void setOperUrl(String operUrl)
{
this.operUrl = operUrl;
}
public String getOperIp()
{
return operIp;
}
public void setOperIp(String operIp)
{
this.operIp = operIp;
}
public String getOperParam()
{
return operParam;
}
public void setOperParam(String operParam)
{
this.operParam = operParam;
}
public String getJsonResult()
{
return jsonResult;
}
public void setJsonResult(String jsonResult)
{
this.jsonResult = jsonResult;
}
public Integer getStatus()
{
return status;
}
public void setStatus(Integer status)
{
this.status = status;
}
public String getErrorMsg()
{
return errorMsg;
}
public void setErrorMsg(String errorMsg)
{
this.errorMsg = errorMsg;
}
public Date getOperTime()
{
return operTime;
}
public void setOperTime(Date operTime)
{
this.operTime = operTime;
}
public Long getCostTime()
{
return costTime;
}
public void setCostTime(Long costTime)
{
this.costTime = costTime;
}
public boolean isSelect() {
return select.get();
}
public BooleanProperty selectProperty() {
return select;
}
public void setSelect(boolean select) {
this.select.set(select);
}
}

View File

@ -0,0 +1,107 @@
package com.susanoo.fx.domain;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
/**
* 岗位表 sys_post
*
* @author ruoyi
*/
public class SysPost extends BaseEntity {
private static final long serialVersionUID = 1L;
private final BooleanProperty select = new SimpleBooleanProperty(false);
/**
* 岗位序号
*/
private Long postId;
/**
* 岗位编码
*/
private String postCode;
/**
* 岗位名称
*/
private String postName;
/**
* 岗位排序
*/
private Integer postSort;
/**
* 状态0正常 1停用
*/
private String status;
/**
* 用户是否存在此岗位标识 默认不存在
*/
private boolean flag = false;
public Long getPostId() {
return postId;
}
public void setPostId(Long postId) {
this.postId = postId;
}
public String getPostCode() {
return postCode;
}
public void setPostCode(String postCode) {
this.postCode = postCode;
}
public String getPostName() {
return postName;
}
public void setPostName(String postName) {
this.postName = postName;
}
public Integer getPostSort() {
return postSort;
}
public void setPostSort(Integer postSort) {
this.postSort = postSort;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public boolean isFlag() {
return flag;
}
public void setFlag(boolean flag) {
this.flag = flag;
}
public boolean isSelect() {
return select.get();
}
public BooleanProperty selectProperty() {
return select;
}
public void setSelect(boolean select) {
this.select.set(select);
}
}

View File

@ -0,0 +1,223 @@
package com.susanoo.fx.domain;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import java.util.Set;
/**
* 角色表 sys_role
*
* @author ruoyi
*/
public class SysRole extends BaseEntity
{
private static final long serialVersionUID = 1L;
private final BooleanProperty select = new SimpleBooleanProperty(false);
/** 角色ID */
private Long roleId;
/** 角色名称 */
private String roleName;
/** 角色权限 */
private String roleKey;
/** 角色排序 */
private Integer roleSort;
/** 数据范围1所有数据权限2自定义数据权限3本部门数据权限4本部门及以下数据权限5仅本人数据权限 */
private String dataScope;
/** 菜单树选择项是否关联显示( 0父子不互相关联显示 1父子互相关联显示 */
private boolean menuCheckStrictly;
/** 部门树选择项是否关联显示0父子不互相关联显示 1父子互相关联显示 */
private boolean deptCheckStrictly;
/** 角色状态0正常 1停用 */
private String status;
/** 删除标志0代表存在 2代表删除 */
private String delFlag;
/** 用户是否存在此角色标识 默认不存在 */
private boolean flag = false;
/** 菜单组 */
private Long[] menuIds;
/** 部门组(数据权限) */
private Long[] deptIds;
/** 角色菜单权限 */
private Set<String> permissions;
public SysRole()
{
}
public SysRole(Long roleId)
{
this.roleId = roleId;
}
public Long getRoleId()
{
return roleId;
}
public void setRoleId(Long roleId)
{
this.roleId = roleId;
}
public boolean isAdmin()
{
return isAdmin(this.roleId);
}
public static boolean isAdmin(Long roleId)
{
return roleId != null && 1L == roleId;
}
public String getRoleName()
{
return roleName;
}
public void setRoleName(String roleName)
{
this.roleName = roleName;
}
public String getRoleKey()
{
return roleKey;
}
public void setRoleKey(String roleKey)
{
this.roleKey = roleKey;
}
public Integer getRoleSort()
{
return roleSort;
}
public void setRoleSort(Integer roleSort)
{
this.roleSort = roleSort;
}
public String getDataScope()
{
return dataScope;
}
public void setDataScope(String dataScope)
{
this.dataScope = dataScope;
}
public boolean isMenuCheckStrictly()
{
return menuCheckStrictly;
}
public void setMenuCheckStrictly(boolean menuCheckStrictly)
{
this.menuCheckStrictly = menuCheckStrictly;
}
public boolean isDeptCheckStrictly()
{
return deptCheckStrictly;
}
public void setDeptCheckStrictly(boolean deptCheckStrictly)
{
this.deptCheckStrictly = deptCheckStrictly;
}
public String getStatus()
{
return status;
}
public void setStatus(String status)
{
this.status = status;
}
public String getDelFlag()
{
return delFlag;
}
public void setDelFlag(String delFlag)
{
this.delFlag = delFlag;
}
public boolean isFlag()
{
return flag;
}
public void setFlag(boolean flag)
{
this.flag = flag;
this.setSelect(flag);
}
public Long[] getMenuIds()
{
return menuIds;
}
public void setMenuIds(Long[] menuIds)
{
this.menuIds = menuIds;
}
public Long[] getDeptIds()
{
return deptIds;
}
public void setDeptIds(Long[] deptIds)
{
this.deptIds = deptIds;
}
public Set<String> getPermissions()
{
return permissions;
}
public void setPermissions(Set<String> permissions)
{
this.permissions = permissions;
}
public boolean isSelect() {
return select.get();
}
public BooleanProperty selectProperty() {
return select;
}
public void setSelect(boolean select) {
this.select.set(select);
}
}

View File

@ -0,0 +1,37 @@
package com.susanoo.fx.domain;
/**
* 角色和部门关联 sys_role_dept
*
* @author ruoyi
*/
public class SysRoleDept
{
/** 角色ID */
private Long roleId;
/** 部门ID */
private Long deptId;
public Long getRoleId()
{
return roleId;
}
public void setRoleId(Long roleId)
{
this.roleId = roleId;
}
public Long getDeptId()
{
return deptId;
}
public void setDeptId(Long deptId)
{
this.deptId = deptId;
}
}

View File

@ -0,0 +1,38 @@
package com.susanoo.fx.domain;
/**
* 角色和菜单关联 sys_role_menu
*
* @author ruoyi
*/
public class SysRoleMenu
{
/** 角色ID */
private Long roleId;
/** 菜单ID */
private Long menuId;
public Long getRoleId()
{
return roleId;
}
public void setRoleId(Long roleId)
{
this.roleId = roleId;
}
public Long getMenuId()
{
return menuId;
}
public void setMenuId(Long menuId)
{
this.menuId = menuId;
}
}

View File

@ -0,0 +1,279 @@
package com.susanoo.fx.domain;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import java.util.Date;
import java.util.List;
/**
* 用户对象 sys_user
*
* @author ruoyi
*/
public class SysUser extends BaseEntity {
private static final long serialVersionUID = 1L;
private final BooleanProperty select = new SimpleBooleanProperty(false);
/**
* 用户ID
*/
private Long userId;
/**
* 部门ID
*/
private Long deptId;
/**
* 用户账号
*/
private String userName;
/**
* 用户昵称
*/
private String nickName;
/**
* 用户邮箱
*/
private String email;
/**
* 手机号码
*/
private String phonenumber;
/**
* 用户性别
*/
private String sex;
/**
* 用户头像
*/
private String avatar;
/**
* 密码
*/
private String password;
/**
* 帐号状态0正常 1停用
*/
private String status;
/**
* 删除标志0代表存在 2代表删除
*/
private String delFlag;
/**
* 最后登录IP
*/
private String loginIp;
/**
* 最后登录时间
*/
private Date loginDate;
/**
* 部门对象
*/
private SysDept dept;
/**
* 角色对象
*/
private List<SysRole> roles;
/**
* 角色组
*/
private Long[] roleIds;
/**
* 岗位组
*/
private Long[] postIds;
/**
* 角色ID
*/
private Long roleId;
public SysUser() {
}
public SysUser(Long userId) {
this.userId = userId;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public boolean isAdmin() {
return isAdmin(this.userId);
}
public static boolean isAdmin(Long userId) {
return userId != null && 1L == userId;
}
public Long getDeptId() {
return deptId;
}
public void setDeptId(Long deptId) {
this.deptId = deptId;
}
public String getNickName() {
return nickName;
}
public void setNickName(String nickName) {
this.nickName = nickName;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPhonenumber() {
return phonenumber;
}
public void setPhonenumber(String phonenumber) {
this.phonenumber = phonenumber;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public String getAvatar() {
return avatar;
}
public void setAvatar(String avatar) {
this.avatar = avatar;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public String getLoginIp() {
return loginIp;
}
public void setLoginIp(String loginIp) {
this.loginIp = loginIp;
}
public Date getLoginDate() {
return loginDate;
}
public void setLoginDate(Date loginDate) {
this.loginDate = loginDate;
}
public SysDept getDept() {
return dept;
}
public void setDept(SysDept dept) {
this.dept = dept;
}
public List<SysRole> getRoles() {
return roles;
}
public void setRoles(List<SysRole> roles) {
this.roles = roles;
}
public Long[] getRoleIds() {
return roleIds;
}
public void setRoleIds(Long[] roleIds) {
this.roleIds = roleIds;
}
public Long[] getPostIds() {
return postIds;
}
public void setPostIds(Long[] postIds) {
this.postIds = postIds;
}
public Long getRoleId() {
return roleId;
}
public void setRoleId(Long roleId) {
this.roleId = roleId;
}
public boolean isSelect() {
return select.get();
}
public BooleanProperty selectProperty() {
return select;
}
public void setSelect(boolean select) {
this.select.set(select);
}
}

View File

@ -0,0 +1,100 @@
package com.susanoo.fx.domain;
/**
* 当前在线会话
*
* @author ruoyi
*/
public class SysUserOnline
{
/** 会话编号 */
private String tokenId;
/** 用户名称 */
private String userName;
/** 登录IP地址 */
private String ipaddr;
/** 登录地址 */
private String loginLocation;
/** 浏览器类型 */
private String browser;
/** 操作系统 */
private String os;
/** 登录时间 */
private Long loginTime;
public String getTokenId()
{
return tokenId;
}
public void setTokenId(String tokenId)
{
this.tokenId = tokenId;
}
public String getUserName()
{
return userName;
}
public void setUserName(String userName)
{
this.userName = userName;
}
public String getIpaddr()
{
return ipaddr;
}
public void setIpaddr(String ipaddr)
{
this.ipaddr = ipaddr;
}
public String getLoginLocation()
{
return loginLocation;
}
public void setLoginLocation(String loginLocation)
{
this.loginLocation = loginLocation;
}
public String getBrowser()
{
return browser;
}
public void setBrowser(String browser)
{
this.browser = browser;
}
public String getOs()
{
return os;
}
public void setOs(String os)
{
this.os = os;
}
public Long getLoginTime()
{
return loginTime;
}
public void setLoginTime(Long loginTime)
{
this.loginTime = loginTime;
}
}

View File

@ -0,0 +1,38 @@
package com.susanoo.fx.domain;
/**
* 用户和岗位关联 sys_user_post
*
* @author ruoyi
*/
public class SysUserPost
{
/** 用户ID */
private Long userId;
/** 岗位ID */
private Long postId;
public Long getUserId()
{
return userId;
}
public void setUserId(Long userId)
{
this.userId = userId;
}
public Long getPostId()
{
return postId;
}
public void setPostId(Long postId)
{
this.postId = postId;
}
}

View File

@ -0,0 +1,38 @@
package com.susanoo.fx.domain;
/**
* 用户和角色关联 sys_user_role
*
* @author ruoyi
*/
public class SysUserRole
{
/** 用户ID */
private Long userId;
/** 角色ID */
private Long roleId;
public Long getUserId()
{
return userId;
}
public void setUserId(Long userId)
{
this.userId = userId;
}
public Long getRoleId()
{
return roleId;
}
public void setRoleId(Long roleId)
{
this.roleId = roleId;
}
}

View File

@ -0,0 +1,79 @@
package com.susanoo.fx.domain;
import java.util.ArrayList;
import java.util.List;
/**
* Tree基类
*
* @author ruoyi
*/
public class TreeEntity extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 父菜单名称 */
private String parentName;
/** 父菜单ID */
private Long parentId;
/** 显示顺序 */
private Integer orderNum;
/** 祖级列表 */
private String ancestors;
/** 子部门 */
private List<?> children = new ArrayList<>();
public String getParentName()
{
return parentName;
}
public void setParentName(String parentName)
{
this.parentName = parentName;
}
public Long getParentId()
{
return parentId;
}
public void setParentId(Long parentId)
{
this.parentId = parentId;
}
public Integer getOrderNum()
{
return orderNum;
}
public void setOrderNum(Integer orderNum)
{
this.orderNum = orderNum;
}
public String getAncestors()
{
return ancestors;
}
public void setAncestors(String ancestors)
{
this.ancestors = ancestors;
}
public List<?> getChildren()
{
return children;
}
public void setChildren(List<?> children)
{
this.children = children;
}
}

View File

@ -0,0 +1,103 @@
package com.susanoo.fx.domain.page;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
/**
* 分页数据
*
* @author ruoyi
*/
public class PageDomain
{
/** 当前记录起始索引 */
private Integer pageNum;
/** 每页显示记录数 */
private Integer pageSize;
/** 排序列 */
private String orderByColumn;
/** 排序的方向desc或者asc */
private String isAsc = "asc";
/** 分页参数合理化 */
private Boolean reasonable = true;
public String getOrderBy()
{
if (ObjectUtil.isEmpty(orderByColumn))
{
return "";
}
return StrUtil.toUnderlineCase(orderByColumn) + " " + isAsc;
}
public Integer getPageNum()
{
return pageNum;
}
public void setPageNum(Integer pageNum)
{
this.pageNum = pageNum;
}
public Integer getPageSize()
{
return pageSize;
}
public void setPageSize(Integer pageSize)
{
this.pageSize = pageSize;
}
public String getOrderByColumn()
{
return orderByColumn;
}
public void setOrderByColumn(String orderByColumn)
{
this.orderByColumn = orderByColumn;
}
public String getIsAsc()
{
return isAsc;
}
public void setIsAsc(String isAsc)
{
if (ObjectUtil.isNotEmpty(isAsc))
{
// 兼容前端排序类型
if ("ascending".equals(isAsc))
{
isAsc = "asc";
}
else if ("descending".equals(isAsc))
{
isAsc = "desc";
}
this.isAsc = isAsc;
}
}
public Boolean getReasonable()
{
if (ObjectUtil.isNull(reasonable))
{
return Boolean.TRUE;
}
return reasonable;
}
public void setReasonable(Boolean reasonable)
{
this.reasonable = reasonable;
}
}

View File

@ -0,0 +1,85 @@
package com.susanoo.fx.domain.page;
import java.io.Serializable;
import java.util.List;
/**
* 表格分页数据对象
*
* @author ruoyi
*/
public class TableDataInfo implements Serializable
{
private static final long serialVersionUID = 1L;
/** 总记录数 */
private long total;
/** 列表数据 */
private List<?> rows;
/** 消息状态码 */
private int code;
/** 消息内容 */
private String msg;
/**
* 表格数据对象
*/
public TableDataInfo()
{
}
/**
* 分页
*
* @param list 列表数据
* @param total 总记录数
*/
public TableDataInfo(List<?> list, int total)
{
this.rows = list;
this.total = total;
}
public long getTotal()
{
return total;
}
public void setTotal(long total)
{
this.total = total;
}
public List<?> getRows()
{
return rows;
}
public void setRows(List<?> rows)
{
this.rows = rows;
}
public int getCode()
{
return code;
}
public void setCode(int code)
{
this.code = code;
}
public String getMsg()
{
return msg;
}
public void setMsg(String msg)
{
this.msg = msg;
}
}

View File

@ -0,0 +1,47 @@
package com.susanoo.fx.domain.server;
import lombok.Data;
/**
* CPU相关信息
*
* @author ruoyi
*/
@Data
public class Cpu
{
/**
* 核心数
*/
private int cpuNum;
/**
* CPU总的使用率
*/
private double total;
/**
* CPU系统使用率
*/
private double sys;
/**
* CPU用户使用率
*/
private double used;
/**
* CPU当前等待率
*/
private double wait;
/**
* CPU当前空闲率
*/
private double free;
}

View File

@ -0,0 +1,41 @@
package com.susanoo.fx.domain.server;
import lombok.Data;
import java.lang.management.ManagementFactory;
/**
* JVM相关信息
*
* @author ruoyi
*/
@Data
public class Jvm
{
/**
* 当前JVM占用的内存总数(M)
*/
private double total;
/**
* JVM最大可用内存总数(M)
*/
private double max;
/**
* JVM空闲内存(M)
*/
private double free;
/**
* JDK版本
*/
private String version;
/**
* JDK路径
*/
private String home;
}

View File

@ -0,0 +1,30 @@
package com.susanoo.fx.domain.server;
import lombok.Data;
/**
* 內存相关信息
*
* @author ruoyi
*/
@Data
public class Mem
{
/**
* 内存总量
*/
private double total;
/**
* 已用内存
*/
private double used;
/**
* 剩余内存
*/
private double free;
}

View File

@ -0,0 +1,84 @@
package com.susanoo.fx.domain.server;
/**
* 系统相关信息
*
* @author ruoyi
*/
public class Sys
{
/**
* 服务器名称
*/
private String computerName;
/**
* 服务器Ip
*/
private String computerIp;
/**
* 项目路径
*/
private String userDir;
/**
* 操作系统
*/
private String osName;
/**
* 系统架构
*/
private String osArch;
public String getComputerName()
{
return computerName;
}
public void setComputerName(String computerName)
{
this.computerName = computerName;
}
public String getComputerIp()
{
return computerIp;
}
public void setComputerIp(String computerIp)
{
this.computerIp = computerIp;
}
public String getUserDir()
{
return userDir;
}
public void setUserDir(String userDir)
{
this.userDir = userDir;
}
public String getOsName()
{
return osName;
}
public void setOsName(String osName)
{
this.osName = osName;
}
public String getOsArch()
{
return osArch;
}
public void setOsArch(String osArch)
{
this.osArch = osArch;
}
}

View File

@ -0,0 +1,114 @@
package com.susanoo.fx.domain.server;
/**
* 系统文件相关信息
*
* @author ruoyi
*/
public class SysFile
{
/**
* 盘符路径
*/
private String dirName;
/**
* 盘符类型
*/
private String sysTypeName;
/**
* 文件类型
*/
private String typeName;
/**
* 总大小
*/
private String total;
/**
* 剩余大小
*/
private String free;
/**
* 已经使用量
*/
private String used;
/**
* 资源的使用率
*/
private double usage;
public String getDirName()
{
return dirName;
}
public void setDirName(String dirName)
{
this.dirName = dirName;
}
public String getSysTypeName()
{
return sysTypeName;
}
public void setSysTypeName(String sysTypeName)
{
this.sysTypeName = sysTypeName;
}
public String getTypeName()
{
return typeName;
}
public void setTypeName(String typeName)
{
this.typeName = typeName;
}
public String getTotal()
{
return total;
}
public void setTotal(String total)
{
this.total = total;
}
public String getFree()
{
return free;
}
public void setFree(String free)
{
this.free = free;
}
public String getUsed()
{
return used;
}
public void setUsed(String used)
{
this.used = used;
}
public double getUsage()
{
return usage;
}
public void setUsage(double usage)
{
this.usage = usage;
}
}

View File

@ -0,0 +1,103 @@
package com.susanoo.fx.domain.vo;
/**
* 路由显示信息
*
* @author ruoyi
*/
public class MetaVo
{
/**
* 设置该路由在侧边栏和面包屑中展示的名字
*/
private String title;
/**
* 设置该路由的图标对应路径src/assets/icons/svg
*/
private String icon;
/**
* 设置为true则不会被 <keep-alive>缓存
*/
private boolean noCache;
/**
* 内链地址http(s)://开头
*/
private String link;
public MetaVo()
{
}
public MetaVo(String title, String icon)
{
this.title = title;
this.icon = icon;
}
public MetaVo(String title, String icon, boolean noCache)
{
this.title = title;
this.icon = icon;
this.noCache = noCache;
}
public MetaVo(String title, String icon, String link)
{
this.title = title;
this.icon = icon;
this.link = link;
}
public MetaVo(String title, String icon, boolean noCache, String link)
{
this.title = title;
this.icon = icon;
this.noCache = noCache;
this.link = link;
}
public boolean isNoCache()
{
return noCache;
}
public void setNoCache(boolean noCache)
{
this.noCache = noCache;
}
public String getTitle()
{
return title;
}
public void setTitle(String title)
{
this.title = title;
}
public String getIcon()
{
return icon;
}
public void setIcon(String icon)
{
this.icon = icon;
}
public String getLink()
{
return link;
}
public void setLink(String link)
{
this.link = link;
}
}

View File

@ -0,0 +1,147 @@
package com.susanoo.fx.domain.vo;
import java.util.List;
/**
* 路由配置信息
*
* @author ruoyi
*/
public class RouterVo
{
/**
* 路由名字
*/
private String name;
/**
* 路由地址
*/
private String path;
/**
* 是否隐藏路由当设置 true 的时候该路由不会再侧边栏出现
*/
private boolean hidden;
/**
* 重定向地址当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
*/
private String redirect;
/**
* 组件地址
*/
private String component;
/**
* 路由参数 {"id": 1, "name": "ry"}
*/
private String query;
/**
* 当你一个路由下面的 children 声明的路由大于1个时自动会变成嵌套的模式--如组件页面
*/
private Boolean alwaysShow;
/**
* 其他元素
*/
private MetaVo meta;
/**
* 子路由
*/
private List<RouterVo> children;
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
public String getPath()
{
return path;
}
public void setPath(String path)
{
this.path = path;
}
public boolean getHidden()
{
return hidden;
}
public void setHidden(boolean hidden)
{
this.hidden = hidden;
}
public String getRedirect()
{
return redirect;
}
public void setRedirect(String redirect)
{
this.redirect = redirect;
}
public String getComponent()
{
return component;
}
public void setComponent(String component)
{
this.component = component;
}
public String getQuery()
{
return query;
}
public void setQuery(String query)
{
this.query = query;
}
public Boolean getAlwaysShow()
{
return alwaysShow;
}
public void setAlwaysShow(Boolean alwaysShow)
{
this.alwaysShow = alwaysShow;
}
public MetaVo getMeta()
{
return meta;
}
public void setMeta(MetaVo meta)
{
this.meta = meta;
}
public List<RouterVo> getChildren()
{
return children;
}
public void setChildren(List<RouterVo> children)
{
this.children = children;
}
}

View File

@ -0,0 +1,77 @@
package com.susanoo.fx.domain.vo;
import com.susanoo.fx.domain.SysDept;
import com.susanoo.fx.domain.SysMenu;
import java.io.Serializable;
import java.util.List;
import java.util.stream.Collectors;
/**
* Treeselect树结构实体类
*
* @author ruoyi
*/
public class TreeSelect implements Serializable
{
private static final long serialVersionUID = 1L;
/** 节点ID */
private Long id;
/** 节点名称 */
private String label;
/** 子节点 */
private List<TreeSelect> children;
public TreeSelect()
{
}
public TreeSelect(SysDept dept)
{
this.id = dept.getDeptId();
this.label = dept.getDeptName();
this.children = dept.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
}
public TreeSelect(SysMenu menu)
{
this.id = menu.getMenuId();
this.label = menu.getMenuName();
this.children = menu.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
}
public Long getId()
{
return id;
}
public void setId(Long id)
{
this.id = id;
}
public String getLabel()
{
return label;
}
public void setLabel(String label)
{
this.label = label;
}
public List<TreeSelect> getChildren()
{
return children;
}
public void setChildren(List<TreeSelect> children)
{
this.children = children;
}
}

View File

@ -0,0 +1,24 @@
/* SPDX-License-Identifier: MIT */
package com.susanoo.fx.event;
import java.net.URI;
public class BrowseEvent extends Event {
private final URI uri;
public BrowseEvent(URI uri) {
this.uri = uri;
}
public URI getUri() {
return uri;
}
@Override
public String toString() {
return "BrowseEvent{" +
"uri=" + uri +
"} " + super.toString();
}
}

View File

@ -0,0 +1,94 @@
/* SPDX-License-Identifier: MIT */
package com.susanoo.fx.event;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArraySet;
import java.util.function.Consumer;
/**
* Simple event bus implementation.
*
* <p>Subscribe and publish events. Events are published in channels distinguished by event type.
* Channels can be grouped using an event type hierarchy.
*
* <p>You can use the default event bus instance {@link #getInstance}, which is a singleton,
* or you can create one or multiple instances of {@link DefaultEventBus}.
*/
@SuppressWarnings({"unchecked", "rawtypes"})
public final class DefaultEventBus implements EventBus {
public DefaultEventBus() {
}
private final Map<Class<?>, Set<Consumer>> subscribers = new ConcurrentHashMap<>();
@Override
public <E extends Event> void subscribe(Class<? extends E> eventType, Consumer<E> subscriber) {
Objects.requireNonNull(eventType);
Objects.requireNonNull(subscriber);
Set<Consumer> eventSubscribers = getOrCreateSubscribers(eventType);
eventSubscribers.add(subscriber);
}
private <E> Set<Consumer> getOrCreateSubscribers(Class<E> eventType) {
Set<Consumer> eventSubscribers = subscribers.get(eventType);
if (eventSubscribers == null) {
eventSubscribers = new CopyOnWriteArraySet<>();
subscribers.put(eventType, eventSubscribers);
}
return eventSubscribers;
}
@Override
public <E extends Event> void unsubscribe(Consumer<E> subscriber) {
Objects.requireNonNull(subscriber);
subscribers.values().forEach(eventSubscribers -> eventSubscribers.remove(subscriber));
}
@Override
public <E extends Event> void unsubscribe(Class<? extends E> eventType, Consumer<E> subscriber) {
Objects.requireNonNull(eventType);
Objects.requireNonNull(subscriber);
subscribers.keySet().stream()
.filter(eventType::isAssignableFrom)
.map(subscribers::get)
.forEach(eventSubscribers -> eventSubscribers.remove(subscriber));
}
@Override
public <E extends Event> void publish(E event) {
Objects.requireNonNull(event);
Class<?> eventType = event.getClass();
subscribers.keySet().stream()
.filter(type -> type.isAssignableFrom(eventType))
.flatMap(type -> subscribers.get(type).stream())
.forEach(subscriber -> publish(event, subscriber));
}
private <E extends Event> void publish(E event, Consumer<E> subscriber) {
try {
subscriber.accept(event);
} catch (Exception e) {
Thread.currentThread().getUncaughtExceptionHandler().uncaughtException(Thread.currentThread(), e);
}
}
///////////////////////////////////////////////////////////////////////////
private static class InstanceHolder {
private static final DefaultEventBus INSTANCE = new DefaultEventBus();
}
public static DefaultEventBus getInstance() {
return InstanceHolder.INSTANCE;
}
}

View File

@ -0,0 +1,35 @@
/* SPDX-License-Identifier: MIT */
package com.susanoo.fx.event;
import java.util.UUID;
public abstract class Event {
protected final UUID id = UUID.randomUUID();
protected Event() { }
public UUID getId() {
return id;
}
@Override
public boolean equals(Object o) {
if (this == o) { return true; }
if (o == null || getClass() != o.getClass()) { return false; }
Event event = (Event) o;
return id.equals(event.id);
}
@Override
public int hashCode() {
return id.hashCode();
}
@Override
public String toString() {
return "Event{" +
"id=" + id +
'}';
}
}

View File

@ -0,0 +1,44 @@
/* SPDX-License-Identifier: MIT */
package com.susanoo.fx.event;
import java.util.function.Consumer;
public interface EventBus {
/**
* Subscribe to an event type.
*
* @param eventType the event type, can be a super class of all events to subscribe.
* @param subscriber the subscriber which will consume the events.
* @param <T> the event type class.
*/
<T extends Event> void subscribe(Class<? extends T> eventType, Consumer<T> subscriber);
/**
* Unsubscribe from all event types.
*
* @param subscriber the subscriber to unsubscribe.
*/
<T extends Event> void unsubscribe(Consumer<T> subscriber);
/**
* Unsubscribe from an event type.
*
* @param eventType the event type, can be a super class of all events to unsubscribe.
* @param subscriber the subscriber to unsubscribe.
* @param <T> the event type class.
*/
<T extends Event> void unsubscribe(Class<? extends T> eventType, Consumer<T> subscriber);
/**
* Publish an event to all subscribers.
*
* <p>The event type is the class of <code>event</code>. The event is published to all consumers which subscribed to
* this event type or any super class.
*
* @param event the event.
*/
<T extends Event> void publish(T event);
}

View File

@ -0,0 +1,24 @@
/* SPDX-License-Identifier: MIT */
package com.susanoo.fx.event;
import javafx.scene.input.KeyCodeCombination;
public class HotkeyEvent extends Event {
private final KeyCodeCombination keys;
public HotkeyEvent(KeyCodeCombination keys) {
this.keys = keys;
}
public KeyCodeCombination getKeys() {
return keys;
}
@Override
public String toString() {
return "HotkeyEvent{" +
"keys=" + keys +
"} " + super.toString();
}
}

View File

@ -0,0 +1,8 @@
/* SPDX-License-Identifier: MIT */
package com.susanoo.fx.event;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
@Target(ElementType.METHOD)
public @interface Listener {}

View File

@ -0,0 +1,35 @@
/* SPDX-License-Identifier: MIT */
package com.susanoo.fx.event;
public final class ThemeEvent extends Event {
public enum EventType {
// theme can change both, base font size and colors
THEME_CHANGE,
// font size or family only change
FONT_CHANGE,
// colors only change
COLOR_CHANGE,
// new theme added or removed
THEME_ADD,
THEME_REMOVE
}
private final EventType eventType;
public ThemeEvent(EventType eventType) {
this.eventType = eventType;
}
public EventType getEventType() {
return eventType;
}
@Override
public String toString() {
return "ThemeEvent{"
+ "eventType=" + eventType
+ "} " + super.toString();
}
}

View File

@ -0,0 +1,57 @@
package com.susanoo.fx.icon;
import org.kordamp.ikonli.Ikon;
public enum WIcon implements Ikon {
TOOL("lw-tool", '\ue911'),
MONITOR("lw-monitor", '\ue906'),
SYSTEM_COPY("lw-system", '\ue908'),
MESSAGE("lw-message", '\ue90e'),
LOG("lw-log", '\ue909'),
EDIT("lw-edit", '\ue90c'),
DICT("lw-dict", '\ue90b'),
POST("lw-post", '\ue902'),
TREE("lw-tree", '\ue90f'),
PEOPLES("lw-peoples", '\ue90d'),
USER("lw-user", '\ue907'),
TREE_TABLE("lw-tree-table", '\ue900'),
YUANDIAN("lw-form", '\ue903'),
HOME("lw-home", '\ue916');
public static WIcon findByDescription(String description) {
for (WIcon font : values()) {
if (font.getDescription().equals(description)) {
return font;
}
}
return YUANDIAN;
// throw new IllegalArgumentException("Icon description '" + description + "' is invalid!");
}
private String description;
private int code;
WIcon(String description, int code) {
this.description = description;
this.code = code;
}
@Override
public String getDescription() {
return description;
}
@Override
public int getCode() {
return code;
}
}

View File

@ -0,0 +1,38 @@
package com.susanoo.fx.icon;
import org.kordamp.ikonli.AbstractIkonHandler;
import org.kordamp.ikonli.Ikon;
import org.kordamp.ikonli.IkonHandler;
import org.kordamp.jipsy.annotations.ServiceProviderFor;
import java.io.InputStream;
import java.net.URL;
@ServiceProviderFor(IkonHandler.class)
public class WIconIkonHandler extends AbstractIkonHandler {
private static final String FONT_RESOURCE = "/fonts/wiconfont.ttf";
@Override
public boolean supports(String description) {
return description != null && description.startsWith("lw-");
}
@Override
public Ikon resolve(String description) {
return WIcon.findByDescription(description);
}
@Override
public URL getFontResource() {
return getClass().getResource(FONT_RESOURCE);
}
@Override
public InputStream getFontResourceAsStream() {
return getClass().getResourceAsStream(FONT_RESOURCE);
}
@Override
public String getFontFamily() {
return "wiconfont";
}
}

View File

@ -0,0 +1,12 @@
package com.susanoo.fx.icon;
import org.kordamp.ikonli.IkonProvider;
import org.kordamp.jipsy.annotations.ServiceProviderFor;
@ServiceProviderFor(IkonProvider.class)
public class WIconIkonProvider implements IkonProvider<WIcon> {
@Override
public Class<WIcon> getIkon() {
return WIcon.class;
}
}

View File

@ -0,0 +1,88 @@
package com.susanoo.fx.request;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.susanoo.fx.request.feign.FeignAPI;
import com.susanoo.fx.request.feign.decoder.FeignErrorDecoder;
import com.susanoo.fx.request.feign.interceptor.ForwardedForInterceptor;
import com.susanoo.fx.request.feign.interceptor.OkHttpInterceptor;
import feign.Feign;
import feign.Logger;
import feign.gson.GsonDecoder;
import feign.gson.GsonEncoder;
import feign.okhttp.OkHttpClient;
import feign.querymap.BeanQueryMapEncoder;
import feign.slf4j.Slf4jLogger;
import okhttp3.ConnectionPool;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
public class Request {
private static final Map<String, FeignAPI> CONNECTORS = new ConcurrentHashMap<>();
private static String API_URL = System.getProperty("app.server.url");
private final static int CONNECT_TIME_OUT_MILLIS = 3000;
private final static int READ_TIME_OUT_MILLIS = 90000;
private static GsonDecoder gsonDecoder;
private static GsonEncoder gsonEncoder;
/**
* @Description:
* @param: [connectorClass, readTimeOut->设置超时时间]
* @return: T
* @auther: liwen
* @date: 2019-06-05 14:33
*/
public static <T extends FeignAPI> T connector(Class<T> connectorClass, int readTimeOut) {
final String commandConfigKey = connectorClass.getSimpleName() + readTimeOut;
return (T) CONNECTORS.computeIfAbsent(commandConfigKey, k -> {
return Feign.builder() .queryMapEncoder(new BeanQueryMapEncoder())
.client(new OkHttpClient(createOkHttpClient()))
.decoder(getGsonDecoder())
.encoder(getGsonEncoder())
.errorDecoder(new FeignErrorDecoder(new GsonDecoder()))
.requestInterceptor(new ForwardedForInterceptor())
.logger(new Slf4jLogger())
.logLevel(Logger.Level.BASIC)
.target(connectorClass, API_URL);
});
}
public static <T extends FeignAPI> T connector(Class<T> connectorClass) {
return connector(connectorClass, READ_TIME_OUT_MILLIS);
}
private static okhttp3.OkHttpClient createOkHttpClient() {
return new okhttp3.OkHttpClient.Builder().connectionPool(new ConnectionPool())
.addInterceptor(new OkHttpInterceptor())
.build();
}
public static GsonDecoder getGsonDecoder() {
if (gsonDecoder == null) {
Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd HH:mm:ss").create();
gsonDecoder = new GsonDecoder(gson);
}
return gsonDecoder;
}
public static GsonEncoder getGsonEncoder() {
if (gsonEncoder == null) {
Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd HH:mm:ss").create();
gsonEncoder = new GsonEncoder(gson);
}
return gsonEncoder;
}
}

View File

@ -0,0 +1,9 @@
package com.susanoo.fx.request.feign;
import feign.Headers;
@Headers("Content-Type: application/json")
public interface FeignAPI {
}

View File

@ -0,0 +1,25 @@
package com.susanoo.fx.request.feign.client;
import com.google.gson.JsonObject;
import feign.Param;
import feign.RequestLine;
import com.susanoo.fx.domain.R;
import com.susanoo.fx.request.feign.FeignAPI;
public interface LoginFeign extends FeignAPI {
// @RequestLine("GET /code")
@RequestLine("GET /captchaImage")
JsonObject getCode();
// @RequestLine("POST /auth/login")
@RequestLine("POST /login")
JsonObject login(@Param("username") String userName, @Param("password") String password, @Param("code") String code, @Param("uuid") String uuid);
@RequestLine("DELETE /auth/logout")
R<?> logout();
}

View File

@ -0,0 +1,64 @@
package com.susanoo.fx.request.feign.client;
import com.google.gson.JsonObject;
import feign.Param;
import feign.QueryMap;
import feign.RequestLine;
import com.susanoo.fx.domain.SysConfig;
import com.susanoo.fx.domain.page.TableDataInfo;
import com.susanoo.fx.request.feign.FeignAPI;
import java.util.Map;
/**
* 参数配置 信息操作处理
*
* @author ruoyi
*/
public interface SysConfigFeign extends FeignAPI {
/**
* 获取参数配置列表
*/
@RequestLine("GET /system/config/list")
TableDataInfo list(@QueryMap Map<String, Object> map);
@RequestLine("GET /system/config/export")
void export(SysConfig config);
/**
* 根据参数编号获取详细信息
*/
@RequestLine("GET /system/config/{configId}")
JsonObject getInfo(@Param("configId") Long configId);
/**
* 根据参数键名查询参数值
*/
@RequestLine("GET /system/config/configKey/{configKey}")
JsonObject getConfigKey(@Param("configKey") String configKey);
/**
* 新增参数配置
*/
@RequestLine("POST /system/config")
JsonObject add(SysConfig config);
/**
* 修改参数配置
*/
@RequestLine("PUT /system/config")
JsonObject edit(SysConfig config);
/**
* 删除参数配置
*/
@RequestLine("DELETE /system/config/{configIds}")
JsonObject remove(@Param("configIds") String configIds);
/**
* 刷新参数缓存
*/
@RequestLine("DELETE /system/config/refreshCache")
JsonObject refreshCache();
}

View File

@ -0,0 +1,55 @@
package com.susanoo.fx.request.feign.client;
import com.google.gson.JsonObject;
import feign.Param;
import feign.QueryMap;
import feign.RequestLine;
import com.susanoo.fx.domain.SysDept;
import com.susanoo.fx.request.feign.FeignAPI;
import java.util.Map;
/**
* 部门信息
*
* @author ruoyi
*/
public interface SysDeptFeign extends FeignAPI {
/**
* 获取部门列表
*/
@RequestLine("GET /system/dept/list")
JsonObject list(@QueryMap Map<String,Object> map);
/**
* 查询部门列表排除节点
*/
@RequestLine("GET /system/dept/list/exclude/{deptId}")
JsonObject excludeChild(@Param("deptId") Long deptId);
/**
* 根据部门编号获取详细信息
*/
@RequestLine("GET /system/dept/{deptId}")
JsonObject getInfo(@Param("deptId") Long deptId);
/**
* 新增部门
*/
@RequestLine("POST /system/dept")
JsonObject add(SysDept dept);
/**
* 修改部门
*/
@RequestLine("PUT /system/dept")
JsonObject edit(SysDept dept);
/**
* 删除部门
*/
@RequestLine("DELETE /system/dept/{deptId}")
JsonObject remove(@Param("deptId") Long deptId);
}

View File

@ -0,0 +1,54 @@
package com.susanoo.fx.request.feign.client;
import com.google.gson.JsonObject;
import feign.Param;
import feign.QueryMap;
import feign.RequestLine;
import com.susanoo.fx.domain.SysDictData;
import com.susanoo.fx.domain.page.TableDataInfo;
import com.susanoo.fx.request.feign.FeignAPI;
import java.util.Map;
/**
* 数据字典信息
*
* @author ruoyi
*/
public interface SysDictDataFeign extends FeignAPI {
@RequestLine("GET /system/dict/data/list")
TableDataInfo list(@QueryMap Map<String, Object> query);
@RequestLine("POST /system/dict/data/export")
void export(SysDictData dictData);
/**
* 查询字典数据详细
*/
@RequestLine("GET /system/dict/data/{dictCode}")
JsonObject getInfo(@Param("dictCode") Long dictCode);
/**
* 根据字典类型查询字典数据信息
*/
@RequestLine("GET /system/dict/data/type/{dictType}")
JsonObject dictType(@Param("dictType") String dictType);
/**
* 新增字典类型
*/
@RequestLine("POST /system/dict/data")
JsonObject add(SysDictData dict);
/**
* 修改保存字典类型
*/
@RequestLine("PUT /system/dict/data")
JsonObject edit(SysDictData dict);
/**
* 删除字典类型
*/
@RequestLine("DELETE /system/dict/data/{dictCodes}")
JsonObject remove(@Param("dictCodes") String dictCodes);
}

View File

@ -0,0 +1,61 @@
package com.susanoo.fx.request.feign.client;
import com.google.gson.JsonObject;
import feign.Param;
import feign.QueryMap;
import feign.RequestLine;
import com.susanoo.fx.domain.SysDictType;
import com.susanoo.fx.domain.page.TableDataInfo;
import com.susanoo.fx.request.feign.FeignAPI;
import java.util.Map;
/**
* 数据字典信息
*
* @author ruoyi
*/
public interface SysDictTypeFeign extends FeignAPI {
@RequestLine("GET /system/dict/type/list")
TableDataInfo list(@QueryMap Map<String, Object> query);
@RequestLine("GET /system/dict/type/export")
void export( SysDictType dictType);
/**
* 查询字典类型详细
*/
@RequestLine("GET /system/dict/type/{dictId}")
JsonObject getInfo(@Param("dictId") Long dictId);
/**
* 新增字典类型
*/
@RequestLine("POST /system/dict/type")
JsonObject add(SysDictType dict);
/**
* 修改字典类型
*/
@RequestLine("PUT /system/dict/type")
JsonObject edit(SysDictType dict);
/**
* 删除字典类型
*/
@RequestLine("DELETE /system/dict/type/{dictIds}")
JsonObject remove(@Param("dictIds") String dictIds);
/**
* 刷新字典缓存
*/
@RequestLine("DELETE /system/dict/type/refreshCache")
JsonObject refreshCache();
/**
* 获取字典选择框列表
*/
@RequestLine("GET /system/dict/type/optionselect")
JsonObject optionselect();
}

View File

@ -0,0 +1,36 @@
package com.susanoo.fx.request.feign.client;
import com.google.gson.JsonObject;
import feign.Param;
import feign.QueryMap;
import feign.RequestLine;
import com.susanoo.fx.domain.SysLogininfor;
import com.susanoo.fx.domain.page.TableDataInfo;
import com.susanoo.fx.request.feign.FeignAPI;
import java.util.Map;
/**
* 系统访问记录
*
* @author ruoyi
*/
public interface SysLogininforFeign extends FeignAPI {
@RequestLine("GET /monitor/logininfor/list")
TableDataInfo list(@QueryMap Map<String, Object> query);
@RequestLine("POST /system/logininfor/export")
void export( SysLogininfor logininfor);
@RequestLine("DELETE /system/logininfor/{infoIds}")
JsonObject remove(@Param("infoIds") String infoIds);
@RequestLine("DELETE /system/logininfor/clean")
JsonObject clean();
@RequestLine("GET /system/logininfor/unlock/{userName}")
JsonObject unlock(@Param("userName") String userName);
@RequestLine("POST /system/logininfor")
JsonObject add( SysLogininfor logininfor);
}

View File

@ -0,0 +1,59 @@
package com.susanoo.fx.request.feign.client;
import com.google.gson.JsonObject;
import feign.Param;
import feign.QueryMap;
import feign.RequestLine;
import com.susanoo.fx.domain.SysMenu;
import com.susanoo.fx.request.feign.FeignAPI;
import java.util.Map;
public interface SysMenuFeign extends FeignAPI {
/**
* 获取路由信息
*
* @return 路由信息
*/
// @RequestLine("GET /system/menu/getRouters")
@RequestLine("GET /getRouters")
JsonObject getRouters();
/**
* 获取菜单列表
*/
@RequestLine("GET /system/menu/list")
JsonObject list(@QueryMap Map<String, Object> query);
/**
* 获取菜单列表
*/
@RequestLine("POST /system/menu")
JsonObject add(SysMenu sysMenu);
/**
* 删除菜单
*/
@RequestLine("DELETE /system/menu/{menuId}")
JsonObject remove(@Param("menuId") Long menuId);
/**
* 修改菜单
*/
@RequestLine("PUT /system/menu")
JsonObject edit(SysMenu menu);
/**
* 获取菜单下拉树列表
*/
@RequestLine("GET /system/menu/treeselect")
JsonObject treeselect(@QueryMap Map<String, Object> query);
@RequestLine("GET /system/menu/roleMenuTreeselect/{roleId}")
JsonObject roleMenuTreeselect(@Param("roleId") Long roleId);
}

View File

@ -0,0 +1,49 @@
package com.susanoo.fx.request.feign.client;
import com.google.gson.JsonObject;
import feign.Param;
import feign.QueryMap;
import feign.RequestLine;
import com.susanoo.fx.domain.SysNotice;
import com.susanoo.fx.domain.page.TableDataInfo;
import com.susanoo.fx.request.feign.FeignAPI;
import java.util.Map;
/**
* 公告 信息操作处理
*
* @author ruoyi
*/
public interface SysNoticeFeign extends FeignAPI {
/**
* 获取通知公告列表
*/
@RequestLine("GET /system/notice/list")
TableDataInfo list(@QueryMap Map<String, Object> map);
/**
* 根据通知公告编号获取详细信息
*/
@RequestLine("GET /system/notice/{noticeId}")
JsonObject getInfo(@Param("noticeId") Long noticeId);
/**
* 新增通知公告
*/
@RequestLine("POST /system/notice")
JsonObject add(SysNotice notice);
/**
* 修改通知公告
*/
@RequestLine("PUT /system/notice")
JsonObject edit(SysNotice notice);
/**
* 删除通知公告
*/
@RequestLine("DELETE /system/notice/{noticeIds}")
JsonObject remove(@Param("noticeIds") String noticeIds);
}

View File

@ -0,0 +1,34 @@
package com.susanoo.fx.request.feign.client;
import com.google.gson.JsonObject;
import feign.Param;
import feign.QueryMap;
import feign.RequestLine;
import com.susanoo.fx.domain.SysOperLog;
import com.susanoo.fx.domain.page.TableDataInfo;
import com.susanoo.fx.request.feign.FeignAPI;
import java.util.Map;
/**
* 操作日志记录
*
* @author ruoyi
*/
public interface SysOperlogFeign extends FeignAPI {
// @RequestLine("GET /system/operlog/list")
@RequestLine("GET /monitor/operlog/list")
TableDataInfo list(@QueryMap Map<String,Object> map);
@RequestLine("POST /system/operlog/export")
void export(SysOperLog operLog);
@RequestLine("DELETE /system/operlog/{operIds}")
JsonObject remove(@Param("operIds") String operIds);
@RequestLine("DELETE /system/operlog/clean")
JsonObject clean();
@RequestLine("POST /system/operlog")
JsonObject add(SysOperLog operLog);
}

View File

@ -0,0 +1,58 @@
package com.susanoo.fx.request.feign.client;
import com.google.gson.JsonObject;
import feign.Param;
import feign.QueryMap;
import feign.RequestLine;
import com.susanoo.fx.domain.SysPost;
import com.susanoo.fx.domain.page.TableDataInfo;
import com.susanoo.fx.request.feign.FeignAPI;
import java.util.Map;
/**
* 岗位信息操作处理
*
* @author ruoyi
*/
public interface SysPostFeign extends FeignAPI {
/**
* 获取岗位列表
*/
@RequestLine("GET /system/post/list")
TableDataInfo list(@QueryMap Map<String, Object> query);
/**
* 根据岗位编号获取详细信息
*/
@RequestLine("GET /system/post/{postId}")
JsonObject getInfo(@Param("postId") Long postId);
/**
* 新增岗位
*/
@RequestLine("POST /system/post")
JsonObject add(SysPost post);
/**
* 修改岗位
*/
@RequestLine("PUT /system/post")
JsonObject edit(SysPost post);
/**
* 删除岗位
*/
@RequestLine("DELETE /system/post/{postIds}")
JsonObject remove(@Param("postIds") String postIds);
/**
* 获取岗位选择框列表
*/
@RequestLine("GET /system/post/optionselect")
JsonObject optionselect();
}

Some files were not shown because too many files have changed in this diff Show More