mirror of
https://gitee.com/EMF/solon-manager.git
synced 2025-12-06 08:48:33 +08:00
mod:去除 lombok . 添加插件开发目录。
This commit is contained in:
parent
ced523116f
commit
2454d3dc34
32
logs/demo-app.log
Normal file
32
logs/demo-app.log
Normal file
@ -0,0 +1,32 @@
|
||||
INFO 2025-03-24 21:04:11.629 [-main][*][o.noear.solon.Solon]:
|
||||
App: Start loading
|
||||
INFO 2025-03-24 21:04:11.675 [-main][*][o.noear.solon.Solon]:
|
||||
App: Plugin starting
|
||||
INFO 2025-03-24 21:04:11.768 [-main][*][o.noear.solon.Solon]:
|
||||
Render mapping: @json=StringSerializerRender#snack3-json
|
||||
INFO 2025-03-24 21:04:11.770 [-main][*][o.noear.solon.Solon]:
|
||||
Render mapping: @type_json=StringSerializerRender#snack3-json
|
||||
INFO 2025-03-24 21:04:11.772 [-main][*][o.noear.solon.Solon]:
|
||||
Session: Local session state plugin is loaded
|
||||
INFO 2025-03-24 21:04:12.098 [-main][*][o.noear.solon.Solon]:
|
||||
Render mapping: @json=StringSerializerRender#jackson-json
|
||||
INFO 2025-03-24 21:04:12.112 [-main][*][o.noear.solon.Solon]:
|
||||
Render mapping: @type_json=StringSerializerRender#jackson-json
|
||||
INFO 2025-03-24 21:04:12.151 [-main][*][o.noear.solon.Solon]:
|
||||
View: load: ThymeleafRender
|
||||
INFO 2025-03-24 21:04:12.151 [-main][*][o.noear.solon.Solon]:
|
||||
View: load: org.noear.solon.view.thymeleaf.ThymeleafRender
|
||||
INFO 2025-03-24 21:04:12.151 [-main][*][o.noear.solon.Solon]:
|
||||
Render mapping: .html=ThymeleafRender
|
||||
INFO 2025-03-24 21:04:12.192 [-main][*][o.noear.solon.Solon]:
|
||||
App: Bean scanning
|
||||
INFO 2025-03-24 21:04:12.557 [-main][*][o.noear.solon.Solon]:
|
||||
solon.connector:main: smarthttp: Started ServerConnector@{HTTP/1.1,[http/1.1]}{http://localhost:8080}
|
||||
INFO 2025-03-24 21:04:12.558 [-main][*][o.noear.solon.Solon]:
|
||||
Server:main: smarthttp: Started (smart http 2.5/3.1.0) @340ms
|
||||
INFO 2025-03-24 21:04:12.561 [-main][*][o.noear.solon.Solon]:
|
||||
App: End loading elapsed=1267ms pid=20956 v=3.1.0
|
||||
INFO 2025-03-24 21:04:16.945 [-Thread-1][*][o.noear.solon.Solon]:
|
||||
Server:main: smarthttp: Has Stopped (smart http 2.5/3.1.0)
|
||||
INFO 2025-03-24 21:04:16.948 [-Thread-1][*][o.noear.solon.Solon]:
|
||||
App: Stopped
|
||||
86
plugins/cms/pom.xml
Normal file
86
plugins/cms/pom.xml
Normal file
@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>vip.fuck.sm.plugins</groupId>
|
||||
<artifactId>plugins</artifactId>
|
||||
<version>1.0</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<groupId>vip.fuck.sm.plugins.cms</groupId>
|
||||
<artifactId>cms</artifactId>
|
||||
<version>1.0</version>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<description>Demo project for Solon</description>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.noear</groupId>
|
||||
<artifactId>solon-lib</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.noear</groupId>
|
||||
<artifactId>solon-logging-logback</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.noear</groupId>
|
||||
<artifactId>solon-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
|
||||
<plugins>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<configuration>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<appendAssemblyId>false</appendAssemblyId>
|
||||
<descriptorRefs>
|
||||
<descriptorRef>jar-with-dependencies</descriptorRef>
|
||||
</descriptorRefs>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>make-assembly</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
</build>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>tencent</id>
|
||||
<url>https://mirrors.cloud.tencent.com/nexus/repository/maven-public/</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
</project>
|
||||
11
plugins/cms/src/main/java/vip/fuck/sm/plugins/cms/App.java
Normal file
11
plugins/cms/src/main/java/vip/fuck/sm/plugins/cms/App.java
Normal file
@ -0,0 +1,11 @@
|
||||
package vip.fuck.sm.plugins.cms;
|
||||
|
||||
import org.noear.solon.Solon;
|
||||
import org.noear.solon.annotation.SolonMain;
|
||||
|
||||
//@SolonMain
|
||||
public class App {
|
||||
public static void main(String[] args) {
|
||||
Solon.start(App.class, args);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
package vip.fuck.sm.plugins.cms;
|
||||
|
||||
import org.noear.solon.core.AppContext;
|
||||
import org.noear.solon.core.Plugin;
|
||||
|
||||
public class CmsPlugin implements Plugin {
|
||||
@Override
|
||||
public void start(AppContext context) throws Throwable {
|
||||
System.out.println("cms.test.plugins");
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,2 @@
|
||||
solon.plugin=vip.fuck.sm.plugins.cms.CmsPlugin
|
||||
solon.plugin.priority=999
|
||||
12
plugins/cms/src/main/resources/apps.yml
Normal file
12
plugins/cms/src/main/resources/apps.yml
Normal file
@ -0,0 +1,12 @@
|
||||
server.port: 8080
|
||||
|
||||
solon.app:
|
||||
name: 'demo-app'
|
||||
group: 'demo'
|
||||
|
||||
solon.logging:
|
||||
appender:
|
||||
console:
|
||||
level: INFO
|
||||
file:
|
||||
level: INFO
|
||||
6
plugins/cms/src/main/resources/plugin-info.properties
Normal file
6
plugins/cms/src/main/resources/plugin-info.properties
Normal file
@ -0,0 +1,6 @@
|
||||
plugin.author: xian.zi.ming@qq.com
|
||||
plugin.description: content manager system
|
||||
plugin.version: 1.0
|
||||
plugin.qualified: fuckcms
|
||||
plugin.siteUrl: http://fuck.vip
|
||||
plugin.docUrl: http://fuck.vip
|
||||
29
plugins/pom.xml
Normal file
29
plugins/pom.xml
Normal file
@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>vip.fuck.sm</groupId>
|
||||
<artifactId>solon-manager</artifactId>
|
||||
<version>1.0</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<groupId>vip.fuck.sm.plugins</groupId>
|
||||
<artifactId>plugins</artifactId>
|
||||
<version>1.0</version>
|
||||
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<description>Demo project for Solon</description>
|
||||
<modules>
|
||||
<module>cms</module>
|
||||
</modules>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</project>
|
||||
52
pom.xml
52
pom.xml
@ -10,9 +10,10 @@
|
||||
</parent>
|
||||
<groupId>vip.fuck.sm</groupId>
|
||||
<artifactId>solon-manager</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0</version>
|
||||
<name>solon-manager</name>
|
||||
<description>Demo project for Solon</description>
|
||||
<packaging>pom</packaging>
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<mybatis-plus.version>3.4.0</mybatis-plus.version>
|
||||
@ -30,25 +31,30 @@
|
||||
<knife4j.version>2.0.2</knife4j.version>
|
||||
<easy-captcha.version>1.6.2</easy-captcha.version>
|
||||
</properties>
|
||||
<modules>
|
||||
<module>solon-system</module>
|
||||
<module>plugins</module>
|
||||
</modules>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.noear</groupId>
|
||||
<artifactId>solon-web</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.noear</groupId>
|
||||
<artifactId>solon-hotplug</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara.autotable</groupId>
|
||||
<artifactId>auto-table-solon-plugin</artifactId>
|
||||
<version>2.3.1</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@ -61,30 +67,29 @@
|
||||
<groupId>org.dromara.autotable</groupId>
|
||||
<artifactId>auto-table-core</artifactId>
|
||||
<version>2.3.1</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.noear</groupId>
|
||||
<artifactId>solon-view-thymeleaf</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.noear</groupId>
|
||||
<artifactId>solon-logging-logback</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.noear</groupId>
|
||||
<artifactId>solon-serialization-jackson</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.noear</groupId>
|
||||
<artifactId>solon-security-validation</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@ -99,13 +104,7 @@
|
||||
<version>3.5.9</version>
|
||||
</dependency>
|
||||
|
||||
<!--lombok-->
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.34</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
@ -134,6 +133,7 @@
|
||||
<dependency>
|
||||
<groupId>org.noear</groupId>
|
||||
<artifactId>solon-openapi2-knife4j</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-lang</groupId>
|
||||
@ -170,6 +170,7 @@
|
||||
<dependency>
|
||||
<groupId>org.noear</groupId>
|
||||
<artifactId>sa-token-solon-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@ -178,6 +179,7 @@
|
||||
<!-- 或者用 (如果不需要 CacheService,直接用它)
|
||||
<artifactId>redisx</artifactId>
|
||||
-->
|
||||
<version>3.1.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@ -187,11 +189,11 @@
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
</dependencies>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<build>
|
||||
<finalName>manager</finalName>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.noear</groupId>
|
||||
|
||||
190
solon-system/pom.xml
Normal file
190
solon-system/pom.xml
Normal file
@ -0,0 +1,190 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>vip.fuck.sm</groupId>
|
||||
<artifactId>solon-manager</artifactId>
|
||||
<version>1.0</version>
|
||||
<relativePath >../pom.xml</relativePath>
|
||||
</parent>
|
||||
<artifactId>solon-system</artifactId>
|
||||
<version>1.0</version>
|
||||
<name>solon-system</name>
|
||||
<description>Demo project for Solon</description>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.noear</groupId>
|
||||
<artifactId>solon-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.noear</groupId>
|
||||
<artifactId>solon-hotplug</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara.autotable</groupId>
|
||||
<artifactId>auto-table-solon-plugin</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara.autotable</groupId>
|
||||
<artifactId>auto-table-annotation</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara.autotable</groupId>
|
||||
<artifactId>auto-table-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.noear</groupId>
|
||||
<artifactId>solon-view-thymeleaf</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.noear</groupId>
|
||||
<artifactId>solon-logging-logback</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.noear</groupId>
|
||||
<artifactId>solon-serialization-jackson</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.noear</groupId>
|
||||
<artifactId>solon-security-validation</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-solon-plugin</artifactId>
|
||||
<version>3.5.10.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-jsqlparser-4.9</artifactId>
|
||||
<version>3.5.9</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zaxxer</groupId>
|
||||
<artifactId>HikariCP</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.oracle</groupId>
|
||||
<artifactId>ojdbc6</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.microsoft.sqlserver</groupId>
|
||||
<artifactId>sqljdbc4</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.noear</groupId>
|
||||
<artifactId>solon-openapi2-knife4j</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-configuration</groupId>
|
||||
<artifactId>commons-configuration</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>velocity</artifactId>
|
||||
<groupId>org.apache.velocity</groupId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.whvcse</groupId>
|
||||
<artifactId>easy-captcha</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Sa-Token 权限认证,在线文档:https://sa-token.cc -->
|
||||
<dependency>
|
||||
<groupId>org.noear</groupId>
|
||||
<artifactId>sa-token-solon-plugin</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.noear</groupId>
|
||||
<artifactId>solon-cache-jedis</artifactId>
|
||||
<!-- 或者用 (如果不需要 CacheService,直接用它)
|
||||
<artifactId>redisx</artifactId>
|
||||
-->
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>vip.fuck.sm.plugins.cms</groupId>
|
||||
<artifactId>cms</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.noear</groupId>
|
||||
<artifactId>solon-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<configuration>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<appendAssemblyId>false</appendAssemblyId>
|
||||
<descriptorRefs>
|
||||
<descriptorRef>jar-with-dependencies</descriptorRef>
|
||||
</descriptorRefs>
|
||||
<archive>
|
||||
<manifest>
|
||||
<mainClass>vip.fuck.sm.SolonManagerApplication</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>make-assembly</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
|
||||
|
||||
</project>
|
||||
@ -1,6 +1,6 @@
|
||||
package vip.fuck.sm;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.dromara.autotable.solon.annotation.EnableAutoTable;
|
||||
import org.noear.solon.Solon;
|
||||
import org.noear.solon.annotation.Inject;
|
||||
@ -12,12 +12,13 @@ import org.noear.solon.web.staticfiles.repository.ClassPathStaticRepository;
|
||||
import org.noear.solon.web.staticfiles.repository.FileStaticRepository;
|
||||
import vip.fuck.sm.common.utils.FileConfig;
|
||||
|
||||
|
||||
/**
|
||||
* 启动类
|
||||
*
|
||||
* @author xian.zi.ming@qq.com fuck.vip
|
||||
*/
|
||||
@Slf4j
|
||||
|
||||
@SolonMain
|
||||
@EnableAutoTable
|
||||
public class SolonManagerApplication {
|
||||
@ -10,7 +10,7 @@ import vip.fuck.sm.common.aop.annotation.LogAnnotation;
|
||||
import vip.fuck.sm.entity.SysLog;
|
||||
import vip.fuck.sm.entity.SysUser;
|
||||
import vip.fuck.sm.mapper.SysLogMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.apache.ibatis.solon.annotation.Db;
|
||||
import org.noear.solon.annotation.Component;
|
||||
import org.noear.solon.core.handle.Action;
|
||||
@ -25,9 +25,9 @@ import java.lang.reflect.Parameter;
|
||||
import static org.noear.solon.validation.annotation.HttpPart.params;
|
||||
|
||||
@Component(index = -99)
|
||||
@Slf4j
|
||||
public class LoggingRouterInterceptor implements RouterInterceptor {
|
||||
|
||||
|
||||
@Db
|
||||
private SysLogMapper sysLogMapper;
|
||||
|
||||
@ -82,7 +82,7 @@ public class LoggingRouterInterceptor implements RouterInterceptor {
|
||||
|
||||
sysLog.setUserId(userId);
|
||||
sysLog.setTime((int) timespan);
|
||||
log.info(sysLog.toString());
|
||||
// log.info(sysLog.toString());
|
||||
sysLogMapper.insert(sysLog);
|
||||
|
||||
}
|
||||
@ -1,7 +1,6 @@
|
||||
package vip.fuck.sm.common.exception;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import vip.fuck.sm.common.exception.code.BaseResponseCode;
|
||||
import vip.fuck.sm.common.exception.code.ResponseCodeInterface;
|
||||
|
||||
@ -12,8 +11,7 @@ import vip.fuck.sm.common.exception.code.ResponseCodeInterface;
|
||||
* @version V1.0
|
||||
* @date 2020年3月18日
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
|
||||
public class BusinessException extends RuntimeException {
|
||||
/**
|
||||
* 异常编号
|
||||
@ -55,5 +53,19 @@ public class BusinessException extends RuntimeException {
|
||||
this(code.getCode(), code.getMsg());
|
||||
}
|
||||
|
||||
public int getMessageCode() {
|
||||
return messageCode;
|
||||
}
|
||||
|
||||
public String getDetailMessage() {
|
||||
return detailMessage;
|
||||
}
|
||||
|
||||
public Throwable getThrowable() {
|
||||
return throwable;
|
||||
}
|
||||
|
||||
public void setThrowable(Throwable throwable) {
|
||||
this.throwable = throwable;
|
||||
}
|
||||
}
|
||||
@ -6,7 +6,7 @@ import org.apache.ibatis.exceptions.PersistenceException;
|
||||
import vip.fuck.sm.common.exception.BusinessException;
|
||||
import vip.fuck.sm.common.exception.code.BaseResponseCode;
|
||||
import vip.fuck.sm.common.utils.DataResult;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.noear.solon.annotation.Component;
|
||||
import org.noear.solon.core.exception.StatusException;
|
||||
import org.noear.solon.core.handle.*;
|
||||
@ -16,7 +16,6 @@ import org.thymeleaf.exceptions.TemplateEngineException;
|
||||
import java.sql.SQLIntegrityConstraintViolationException;
|
||||
|
||||
@Component(index = 0) //index 为顺序位(不加,则默认为0)
|
||||
@Slf4j
|
||||
public class AppFilter implements Filter {
|
||||
@Override
|
||||
public void doFilter(Context ctx, FilterChain chain) throws Throwable {
|
||||
@ -45,20 +44,20 @@ public class AppFilter implements Filter {
|
||||
StatusException se = (StatusException) e;
|
||||
ctx.status(se.getCode());
|
||||
if (se.getCode() == 400){
|
||||
log.error("400:{}",pathNew);
|
||||
// log.error("400:{}",pathNew);
|
||||
ctx.status(200);
|
||||
ctx.render(new DataResult(BaseResponseCode.DATA_ERROR.getCode(), "参数错误", null,null));
|
||||
return;
|
||||
}else if (se.getCode() == 404){
|
||||
log.error("404:{}",pathNew);
|
||||
// log.error("404:{}",pathNew);
|
||||
ctx.redirect("/index/404");
|
||||
return;
|
||||
} else if (se.getCode() == 403){
|
||||
log.error("403:{}",pathNew);
|
||||
// log.error("403:{}",pathNew);
|
||||
ctx.redirect("/index/404");
|
||||
return;
|
||||
} else if(se.getCode() == 500){
|
||||
log.error("500:{}",pathNew);
|
||||
// log.error("500:{}",pathNew);
|
||||
ctx.redirect("/index/500");
|
||||
return;
|
||||
}
|
||||
@ -69,7 +68,8 @@ public class AppFilter implements Filter {
|
||||
return;
|
||||
}
|
||||
}
|
||||
log.error(e.getMessage(),e);
|
||||
// log.error(e.getMessage(),e);
|
||||
e.printStackTrace();
|
||||
ctx.status(500);
|
||||
ctx.render(DataResult.getResult(BaseResponseCode.SYSTEM_BUSY));
|
||||
}
|
||||
@ -1,9 +1,10 @@
|
||||
package vip.fuck.sm.common.utils;
|
||||
|
||||
|
||||
import vip.fuck.sm.common.exception.code.BaseResponseCode;
|
||||
import vip.fuck.sm.common.exception.code.ResponseCodeInterface;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 返回值DataResult
|
||||
@ -12,7 +13,7 @@ import lombok.Data;
|
||||
* @version V1.0
|
||||
* @date 2020年3月18日
|
||||
*/
|
||||
@Data
|
||||
|
||||
public class DataResult {
|
||||
|
||||
/**
|
||||
@ -118,5 +119,35 @@ public class DataResult {
|
||||
return new DataResult(responseCode);
|
||||
}
|
||||
|
||||
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 Object getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(Object data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public String getDevErrorMsg() {
|
||||
return devErrorMsg;
|
||||
}
|
||||
|
||||
public void setDevErrorMsg(String devErrorMsg) {
|
||||
this.devErrorMsg = devErrorMsg;
|
||||
}
|
||||
}
|
||||
@ -2,8 +2,8 @@ package vip.fuck.sm.common.utils;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import vip.fuck.sm.common.exception.BusinessException;
|
||||
import vip.fuck.sm.entity.ColumnEntity;
|
||||
import vip.fuck.sm.entity.TableEntity;
|
||||
import vip.fuck.sm.gen.ColumnEntity;
|
||||
import vip.fuck.sm.gen.TableEntity;
|
||||
import org.apache.commons.configuration.Configuration;
|
||||
import org.apache.commons.configuration.ConfigurationException;
|
||||
import org.apache.commons.configuration.PropertiesConfiguration;
|
||||
@ -96,7 +96,10 @@ public class RoleController {
|
||||
}
|
||||
sysRoleDeptService.saveBatch(list);
|
||||
}
|
||||
roleService.updateById(new SysRole().setId(vo.getId()).setDataScope(vo.getDataScope()));
|
||||
SysRole sysRole = new SysRole();
|
||||
sysRole.setId(vo.getId());
|
||||
sysRole.setDataScope(vo.getDataScope());
|
||||
roleService.updateById(sysRole);
|
||||
}
|
||||
|
||||
@Get
|
||||
@ -42,7 +42,7 @@ public class SysFilesController {
|
||||
@Post
|
||||
@Mapping("/upload")
|
||||
@SaCheckPermission(value = {"sysFiles:add", "sysContent:update", "sysContent:add"}, mode = SaMode.OR)
|
||||
public SysFilesEntity add(UploadedFile file) {
|
||||
public SysFilesEntity add(@Param("file") UploadedFile file) {
|
||||
//判断文件是否空
|
||||
if (file == null || file.getName() == null || "".equalsIgnoreCase(file.getName().trim())) {
|
||||
throw new BusinessException("文件为空");
|
||||
@ -6,7 +6,7 @@ import vip.fuck.sm.entity.SysGenerator;
|
||||
import vip.fuck.sm.service.ISysGeneratorService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.noear.solon.annotation.Controller;
|
||||
import org.noear.solon.annotation.Get;
|
||||
@ -25,7 +25,6 @@ import java.io.IOException;
|
||||
* @date 2020年3月18日
|
||||
*/
|
||||
@Api(tags = "系统模块-代码生成")
|
||||
@Slf4j
|
||||
@Controller
|
||||
@Mapping("/sysGenerator")
|
||||
@Valid
|
||||
@ -17,6 +17,7 @@ import java.util.List;
|
||||
import org.noear.solon.core.handle.ModelAndView;
|
||||
import org.noear.solon.core.handle.UploadedFile;
|
||||
import org.smartboot.http.server.HttpRequest;
|
||||
import vip.fuck.sm.common.aop.annotation.LogAnnotation;
|
||||
import vip.fuck.sm.common.exception.BusinessException;
|
||||
import vip.fuck.sm.common.utils.DataResult;
|
||||
|
||||
@ -49,14 +50,25 @@ public class SysPlugsController {
|
||||
return new ModelAndView("sysplugs/list.html");
|
||||
}
|
||||
|
||||
@ApiOperation(value = "新增")
|
||||
@ApiOperation(value = "上传插件")
|
||||
@Post
|
||||
@Mapping("sysPlugs/upload")
|
||||
@LogAnnotation(action = "上传插件")
|
||||
// @SaCheckPermission(value = {"sysFiles:add", "sysContent:update", "sysContent:add"}, mode = SaMode.OR)
|
||||
public SysPlugsEntity add(UploadedFile file) throws Exception {
|
||||
public SysPlugsEntity upload(@Param("file") UploadedFile file) throws Exception {
|
||||
return sysPlugsService.uploadJar(file);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "启动插件")
|
||||
@Get
|
||||
@Mapping("sysPlugs/startPlugin/{qn}")
|
||||
@LogAnnotation(action = "启动插件")
|
||||
// @SaCheckPermission(value = {"sysFiles:add", "sysContent:update", "sysContent:add"}, mode = SaMode.OR)
|
||||
public DataResult startPlugin(@Path("qn") String qn) throws Exception {
|
||||
sysPlugsService.startPlugin(qn);
|
||||
return DataResult.success();
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "查询分页数据")
|
||||
@Post @Mapping ("sysPlugs/listByPage")
|
||||
@ -26,7 +26,7 @@ import com.wf.captcha.utils.CaptchaUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.noear.solon.annotation.*;
|
||||
import org.noear.solon.boot.smarthttp.http.SmHttpContext;
|
||||
import org.noear.solon.core.handle.Context;
|
||||
@ -49,7 +49,6 @@ import java.util.List;
|
||||
@Controller
|
||||
@Api(tags = "组织模块-用户管理")
|
||||
@Mapping("/sys")
|
||||
@Slf4j
|
||||
@Valid
|
||||
public class UserController {
|
||||
@Inject
|
||||
@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import org.dromara.autotable.annotation.Ignore;
|
||||
|
||||
/**
|
||||
@ -15,7 +15,6 @@ import org.dromara.autotable.annotation.Ignore;
|
||||
* @version V1.0
|
||||
* @date 2020年3月18日
|
||||
*/
|
||||
@Data
|
||||
@JsonIgnoreProperties(value = { "getQueryPage"})
|
||||
public class BasePageEntity {
|
||||
@TableField(exist = false)
|
||||
@ -38,4 +37,20 @@ public class BasePageEntity {
|
||||
public <T> Page getQueryPage() {
|
||||
return new Page<T>(page == null ? 1 : page, limit == null ? 10 : limit);
|
||||
}
|
||||
|
||||
public Integer getPage() {
|
||||
return page;
|
||||
}
|
||||
|
||||
public void setPage(Integer page) {
|
||||
this.page = page;
|
||||
}
|
||||
|
||||
public Integer getLimit() {
|
||||
return limit;
|
||||
}
|
||||
|
||||
public void setLimit(Integer limit) {
|
||||
this.limit = limit;
|
||||
}
|
||||
}
|
||||
@ -1,8 +1,7 @@
|
||||
package vip.fuck.sm.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import org.dromara.autotable.annotation.AutoTable;
|
||||
import org.dromara.autotable.annotation.PrimaryKey;
|
||||
|
||||
@ -16,8 +15,6 @@ import java.util.Date;
|
||||
* @version V1.0
|
||||
* @date 2020年3月18日
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@TableName("sys_content")
|
||||
@AutoTable(value = "sys_content",comment = "内容管理")
|
||||
public class SysContentEntity extends BasePageEntity implements Serializable {
|
||||
@ -75,5 +72,75 @@ public class SysContentEntity extends BasePageEntity implements Serializable {
|
||||
@TableField(value = "create_time", fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getOneImg() {
|
||||
return oneImg;
|
||||
}
|
||||
|
||||
public void setOneImg(String oneImg) {
|
||||
this.oneImg = oneImg;
|
||||
}
|
||||
|
||||
public String getMultipleImg() {
|
||||
return multipleImg;
|
||||
}
|
||||
|
||||
public void setMultipleImg(String multipleImg) {
|
||||
this.multipleImg = multipleImg;
|
||||
}
|
||||
|
||||
public String getKeywords() {
|
||||
return keywords;
|
||||
}
|
||||
|
||||
public void setKeywords(String keywords) {
|
||||
this.keywords = keywords;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Long getCreateId() {
|
||||
return createId;
|
||||
}
|
||||
|
||||
public void setCreateId(Long createId) {
|
||||
this.createId = createId;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
}
|
||||
160
solon-system/src/main/java/vip/fuck/sm/entity/SysDept.java
Normal file
160
solon-system/src/main/java/vip/fuck/sm/entity/SysDept.java
Normal file
@ -0,0 +1,160 @@
|
||||
package vip.fuck.sm.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
|
||||
import org.dromara.autotable.annotation.*;
|
||||
import org.noear.solon.validation.annotation.NotBlank;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 部门
|
||||
*
|
||||
* @author xian.zi.ming@qq.com fuck.vip
|
||||
* @version V1.0
|
||||
* @date 2020年3月18日
|
||||
*/
|
||||
@TableName("sys_dept")
|
||||
@AutoTable(value = "sys_dept",comment = "部门")
|
||||
public class SysDept implements Serializable {
|
||||
@TableId(type = IdType.AUTO)
|
||||
@PrimaryKey(autoIncrement = true)
|
||||
private Long id;
|
||||
|
||||
private String deptNo;
|
||||
|
||||
@NotBlank(message = "机构名称不能为空")
|
||||
private String name;
|
||||
|
||||
@NotBlank(message = "父级不能为空")
|
||||
private Long pid;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Ignore
|
||||
private String pidName;
|
||||
|
||||
private Integer status;
|
||||
|
||||
private String relationCode;
|
||||
|
||||
private String deptManagerId;
|
||||
|
||||
private String managerName;
|
||||
|
||||
private String phone;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date updateTime;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@ColumnDefault(value = "0")
|
||||
private Integer deleted;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getDeptNo() {
|
||||
return deptNo;
|
||||
}
|
||||
|
||||
public void setDeptNo(String deptNo) {
|
||||
this.deptNo = deptNo;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Long getPid() {
|
||||
return pid;
|
||||
}
|
||||
|
||||
public void setPid(Long pid) {
|
||||
this.pid = pid;
|
||||
}
|
||||
|
||||
public String getPidName() {
|
||||
return pidName;
|
||||
}
|
||||
|
||||
public void setPidName(String pidName) {
|
||||
this.pidName = pidName;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getRelationCode() {
|
||||
return relationCode;
|
||||
}
|
||||
|
||||
public void setRelationCode(String relationCode) {
|
||||
this.relationCode = relationCode;
|
||||
}
|
||||
|
||||
public String getDeptManagerId() {
|
||||
return deptManagerId;
|
||||
}
|
||||
|
||||
public void setDeptManagerId(String deptManagerId) {
|
||||
this.deptManagerId = deptManagerId;
|
||||
}
|
||||
|
||||
public String getManagerName() {
|
||||
return managerName;
|
||||
}
|
||||
|
||||
public void setManagerName(String managerName) {
|
||||
this.managerName = managerName;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public Integer getDeleted() {
|
||||
return deleted;
|
||||
}
|
||||
|
||||
public void setDeleted(Integer deleted) {
|
||||
this.deleted = deleted;
|
||||
}
|
||||
}
|
||||
@ -1,8 +1,7 @@
|
||||
package vip.fuck.sm.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import org.dromara.autotable.annotation.AutoTable;
|
||||
import org.dromara.autotable.annotation.Ignore;
|
||||
import org.dromara.autotable.annotation.PrimaryKey;
|
||||
@ -17,8 +16,6 @@ import java.util.Date;
|
||||
* @version V1.0
|
||||
* @date 2020年3月18日
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@TableName("sys_dict_detail")
|
||||
@AutoTable(value = "sys_dict_detail",comment = "字典明细")
|
||||
public class SysDictDetailEntity extends BasePageEntity implements Serializable {
|
||||
@ -68,4 +65,59 @@ public class SysDictDetailEntity extends BasePageEntity implements Serializable
|
||||
@Ignore
|
||||
private String dictName;
|
||||
|
||||
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 String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public Integer getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setSort(Integer sort) {
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
public Long getDictId() {
|
||||
return dictId;
|
||||
}
|
||||
|
||||
public void setDictId(Long dictId) {
|
||||
this.dictId = dictId;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getDictName() {
|
||||
return dictName;
|
||||
}
|
||||
|
||||
public void setDictName(String dictName) {
|
||||
this.dictName = dictName;
|
||||
}
|
||||
}
|
||||
@ -4,8 +4,7 @@ import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import org.dromara.autotable.annotation.AutoTable;
|
||||
import org.dromara.autotable.annotation.PrimaryKey;
|
||||
|
||||
@ -19,8 +18,6 @@ import java.util.Date;
|
||||
* @version V1.0
|
||||
* @date 2020年3月18日
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@TableName("sys_dict")
|
||||
@AutoTable(value = "sys_dict",comment = "字典管理")
|
||||
public class SysDictEntity extends BasePageEntity implements Serializable {
|
||||
@ -51,5 +48,35 @@ public class SysDictEntity extends BasePageEntity implements Serializable {
|
||||
@TableField(value = "create_time", fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
}
|
||||
@ -1,8 +1,7 @@
|
||||
package vip.fuck.sm.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import org.dromara.autotable.annotation.AutoTable;
|
||||
import org.dromara.autotable.annotation.PrimaryKey;
|
||||
|
||||
@ -16,8 +15,6 @@ import java.util.Date;
|
||||
* @version V1.0
|
||||
* @date 2020年3月18日
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@TableName("sys_files")
|
||||
@AutoTable(value = "sys_files",comment = "文件上传")
|
||||
public class SysFilesEntity extends BasePageEntity implements Serializable {
|
||||
@ -51,5 +48,51 @@ public class SysFilesEntity extends BasePageEntity implements Serializable {
|
||||
@TableField("file_path")
|
||||
private String filePath;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public Long getFileSize() {
|
||||
return fileSize;
|
||||
}
|
||||
|
||||
public void setFileSize(Long fileSize) {
|
||||
this.fileSize = fileSize;
|
||||
}
|
||||
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
public String getFileName() {
|
||||
return fileName;
|
||||
}
|
||||
|
||||
public void setFileName(String fileName) {
|
||||
this.fileName = fileName;
|
||||
}
|
||||
|
||||
public String getFilePath() {
|
||||
return filePath;
|
||||
}
|
||||
|
||||
public void setFilePath(String filePath) {
|
||||
this.filePath = filePath;
|
||||
}
|
||||
}
|
||||
@ -1,9 +1,7 @@
|
||||
package vip.fuck.sm.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import org.dromara.autotable.annotation.AutoTable;
|
||||
|
||||
import java.io.Serializable;
|
||||
@ -16,9 +14,6 @@ import java.util.Date;
|
||||
* @version V1.0
|
||||
* @date 2020年3月18日
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("sys_generator")
|
||||
@AutoTable(value = "sys_generator",comment = "代码生成")
|
||||
public class SysGenerator extends BasePageEntity implements Serializable {
|
||||
@ -31,4 +26,27 @@ public class SysGenerator extends BasePageEntity implements Serializable {
|
||||
|
||||
private String tableComment;
|
||||
|
||||
public String getTableName() {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
public void setTableName(String tableName) {
|
||||
this.tableName = tableName;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getTableComment() {
|
||||
return tableComment;
|
||||
}
|
||||
|
||||
public void setTableComment(String tableComment) {
|
||||
this.tableComment = tableComment;
|
||||
}
|
||||
}
|
||||
138
solon-system/src/main/java/vip/fuck/sm/entity/SysLog.java
Normal file
138
solon-system/src/main/java/vip/fuck/sm/entity/SysLog.java
Normal file
@ -0,0 +1,138 @@
|
||||
package vip.fuck.sm.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
|
||||
import org.dromara.autotable.annotation.AutoTable;
|
||||
import org.dromara.autotable.annotation.Ignore;
|
||||
import org.dromara.autotable.annotation.PrimaryKey;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 操作日志
|
||||
*
|
||||
* @author xian.zi.ming@qq.com fuck.vip
|
||||
* @version V1.0
|
||||
* @date 2020年3月18日
|
||||
*/
|
||||
@TableName("sys_log")
|
||||
@AutoTable(value = "sys_log",comment = "操作日志")
|
||||
public class SysLog extends BasePageEntity implements Serializable {
|
||||
@TableId(type = IdType.AUTO)
|
||||
@PrimaryKey(autoIncrement = true)
|
||||
private Long id;
|
||||
|
||||
private Long userId;
|
||||
|
||||
private String username;
|
||||
|
||||
private String operation;
|
||||
|
||||
private Integer time;
|
||||
|
||||
private String method;
|
||||
|
||||
private String params;
|
||||
|
||||
private String ip;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Ignore
|
||||
private String startTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Ignore
|
||||
private String endTime;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
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 String getOperation() {
|
||||
return operation;
|
||||
}
|
||||
|
||||
public void setOperation(String operation) {
|
||||
this.operation = operation;
|
||||
}
|
||||
|
||||
public Integer getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public void setTime(Integer time) {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
public String getMethod() {
|
||||
return method;
|
||||
}
|
||||
|
||||
public void setMethod(String method) {
|
||||
this.method = method;
|
||||
}
|
||||
|
||||
public String getParams() {
|
||||
return params;
|
||||
}
|
||||
|
||||
public void setParams(String params) {
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
public String getIp() {
|
||||
return ip;
|
||||
}
|
||||
|
||||
public void setIp(String ip) {
|
||||
this.ip = ip;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(String startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public String getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(String endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
}
|
||||
180
solon-system/src/main/java/vip/fuck/sm/entity/SysPermission.java
Normal file
180
solon-system/src/main/java/vip/fuck/sm/entity/SysPermission.java
Normal file
@ -0,0 +1,180 @@
|
||||
package vip.fuck.sm.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
|
||||
import org.dromara.autotable.annotation.AutoTable;
|
||||
import org.dromara.autotable.annotation.ColumnDefault;
|
||||
import org.dromara.autotable.annotation.Ignore;
|
||||
import org.dromara.autotable.annotation.PrimaryKey;
|
||||
import org.noear.solon.validation.annotation.NotBlank;
|
||||
import org.noear.solon.validation.annotation.NotNull;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 权限菜单
|
||||
*
|
||||
* @author xian.zi.ming@qq.com fuck.vip
|
||||
* @version V1.0
|
||||
* @date 2020年3月18日
|
||||
*/
|
||||
@TableName("sys_permission")
|
||||
@AutoTable(value = "sys_permission",comment = "权限菜单")
|
||||
public class SysPermission implements Serializable {
|
||||
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
@PrimaryKey(autoIncrement = true)
|
||||
private Long id;
|
||||
|
||||
@NotBlank(message = "菜单权限名称不能为空")
|
||||
private String name;
|
||||
|
||||
private String perms;
|
||||
|
||||
private String url;
|
||||
|
||||
private String icon;
|
||||
|
||||
private String target;
|
||||
|
||||
@NotNull(message = "所属菜单不能为空")
|
||||
private Long pid;
|
||||
|
||||
private Integer orderNum;
|
||||
|
||||
@NotNull(message = "菜单权限类型不能为空")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 1正常 2禁用
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date updateTime;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@ColumnDefault(value = "0")
|
||||
private Integer deleted;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Ignore
|
||||
private String pidName;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getPerms() {
|
||||
return perms;
|
||||
}
|
||||
|
||||
public void setPerms(String perms) {
|
||||
this.perms = perms;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public String getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
public void setIcon(String icon) {
|
||||
this.icon = icon;
|
||||
}
|
||||
|
||||
public String getTarget() {
|
||||
return target;
|
||||
}
|
||||
|
||||
public void setTarget(String target) {
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
public Long getPid() {
|
||||
return pid;
|
||||
}
|
||||
|
||||
public void setPid(Long pid) {
|
||||
this.pid = pid;
|
||||
}
|
||||
|
||||
public Integer getOrderNum() {
|
||||
return orderNum;
|
||||
}
|
||||
|
||||
public void setOrderNum(Integer orderNum) {
|
||||
this.orderNum = orderNum;
|
||||
}
|
||||
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(Integer type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public Integer getDeleted() {
|
||||
return deleted;
|
||||
}
|
||||
|
||||
public void setDeleted(Integer deleted) {
|
||||
this.deleted = deleted;
|
||||
}
|
||||
|
||||
public String getPidName() {
|
||||
return pidName;
|
||||
}
|
||||
|
||||
public void setPidName(String pidName) {
|
||||
this.pidName = pidName;
|
||||
}
|
||||
}
|
||||
@ -1,15 +1,14 @@
|
||||
package vip.fuck.sm.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import org.dromara.autotable.annotation.AutoTable;
|
||||
import org.dromara.autotable.annotation.PrimaryKey;
|
||||
import vip.fuck.sm.entity.BasePageEntity;
|
||||
|
||||
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 系统插件
|
||||
@ -18,8 +17,6 @@ import lombok.Data;
|
||||
* @email xian.zi.ming@qq.com
|
||||
* @date 2025-03-22 20:59:06
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@TableName("sys_plugs")
|
||||
@AutoTable(value = "sys_plugs",comment = "系统插件")
|
||||
public class SysPlugsEntity extends BasePageEntity implements Serializable {
|
||||
@ -86,5 +83,83 @@ public class SysPlugsEntity extends BasePageEntity implements Serializable {
|
||||
@TableField("upload_time")
|
||||
private Date uploadTime;
|
||||
|
||||
public String getQualifiedVersion() {
|
||||
return qualifiedVersion;
|
||||
}
|
||||
|
||||
public void setQualifiedVersion(String qualifiedVersion) {
|
||||
this.qualifiedVersion = qualifiedVersion;
|
||||
}
|
||||
|
||||
public String getAuthor() {
|
||||
return author;
|
||||
}
|
||||
|
||||
public void setAuthor(String author) {
|
||||
this.author = author;
|
||||
}
|
||||
|
||||
public String getSiteUrl() {
|
||||
return siteUrl;
|
||||
}
|
||||
|
||||
public void setSiteUrl(String siteUrl) {
|
||||
this.siteUrl = siteUrl;
|
||||
}
|
||||
|
||||
public String getDocUrl() {
|
||||
return docUrl;
|
||||
}
|
||||
|
||||
public void setDocUrl(String docUrl) {
|
||||
this.docUrl = docUrl;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public String getJarPath() {
|
||||
return jarPath;
|
||||
}
|
||||
|
||||
public void setJarPath(String jarPath) {
|
||||
this.jarPath = jarPath;
|
||||
}
|
||||
|
||||
public Long getJarSize() {
|
||||
return jarSize;
|
||||
}
|
||||
|
||||
public void setJarSize(Long jarSize) {
|
||||
this.jarSize = jarSize;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Date getUploadTime() {
|
||||
return uploadTime;
|
||||
}
|
||||
|
||||
public void setUploadTime(Date uploadTime) {
|
||||
this.uploadTime = uploadTime;
|
||||
}
|
||||
}
|
||||
182
solon-system/src/main/java/vip/fuck/sm/entity/SysRole.java
Normal file
182
solon-system/src/main/java/vip/fuck/sm/entity/SysRole.java
Normal file
@ -0,0 +1,182 @@
|
||||
package vip.fuck.sm.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import org.dromara.autotable.annotation.*;
|
||||
import vip.fuck.sm.vo.resp.DeptRespNodeVO;
|
||||
import vip.fuck.sm.vo.resp.PermissionRespNode;
|
||||
|
||||
import org.noear.solon.validation.annotation.NotBlank;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 角色
|
||||
*
|
||||
* @author xian.zi.ming@qq.com fuck.vip
|
||||
* @version V1.0
|
||||
* @date 2020年3月18日
|
||||
*/
|
||||
@TableName("sys_role")
|
||||
@AutoTable(value = "sys_role",comment = "角色")
|
||||
public class SysRole extends BasePageEntity implements Serializable {
|
||||
@TableId(type = IdType.AUTO)
|
||||
@PrimaryKey(autoIncrement = true)
|
||||
private Long id;
|
||||
|
||||
@NotBlank(message = "名称不能为空")
|
||||
private String name;
|
||||
|
||||
private String description;
|
||||
|
||||
private Integer status;
|
||||
|
||||
private Integer dataScope;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date updateTime;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@ColumnDefault(value = "0")
|
||||
private Integer deleted;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Ignore
|
||||
private List<PermissionRespNode> permissionRespNodes;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Ignore
|
||||
private List<DeptRespNodeVO> deptRespNodes;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Ignore
|
||||
private String startTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Ignore
|
||||
private String endTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Ignore
|
||||
private List<Long> permissions;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Ignore
|
||||
private List<Long> depts;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getDataScope() {
|
||||
return dataScope;
|
||||
}
|
||||
|
||||
public void setDataScope(Integer dataScope) {
|
||||
this.dataScope = dataScope;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public Integer getDeleted() {
|
||||
return deleted;
|
||||
}
|
||||
|
||||
public void setDeleted(Integer deleted) {
|
||||
this.deleted = deleted;
|
||||
}
|
||||
|
||||
public List<PermissionRespNode> getPermissionRespNodes() {
|
||||
return permissionRespNodes;
|
||||
}
|
||||
|
||||
public void setPermissionRespNodes(List<PermissionRespNode> permissionRespNodes) {
|
||||
this.permissionRespNodes = permissionRespNodes;
|
||||
}
|
||||
|
||||
public List<DeptRespNodeVO> getDeptRespNodes() {
|
||||
return deptRespNodes;
|
||||
}
|
||||
|
||||
public void setDeptRespNodes(List<DeptRespNodeVO> deptRespNodes) {
|
||||
this.deptRespNodes = deptRespNodes;
|
||||
}
|
||||
|
||||
public String getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(String startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public String getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(String endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public List<Long> getPermissions() {
|
||||
return permissions;
|
||||
}
|
||||
|
||||
public void setPermissions(List<Long> permissions) {
|
||||
this.permissions = permissions;
|
||||
}
|
||||
|
||||
public List<Long> getDepts() {
|
||||
return depts;
|
||||
}
|
||||
|
||||
public void setDepts(List<Long> depts) {
|
||||
this.depts = depts;
|
||||
}
|
||||
}
|
||||
@ -1,8 +1,7 @@
|
||||
package vip.fuck.sm.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import org.dromara.autotable.annotation.AutoTable;
|
||||
import org.dromara.autotable.annotation.PrimaryKey;
|
||||
|
||||
@ -16,8 +15,6 @@ import java.util.Date;
|
||||
* @email *****@mail.com
|
||||
* @date 2020-09-27 17:30:15
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@TableName("sys_role_dept")
|
||||
@AutoTable(value = "sys_role_dept",comment = "角色部门")
|
||||
public class SysRoleDeptEntity extends BasePageEntity implements Serializable {
|
||||
@ -48,5 +45,35 @@ public class SysRoleDeptEntity extends BasePageEntity implements Serializable {
|
||||
@TableField(value = "create_time", fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
}
|
||||
@ -1,7 +1,7 @@
|
||||
package vip.fuck.sm.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
|
||||
import org.dromara.autotable.annotation.AutoTable;
|
||||
import org.dromara.autotable.annotation.PrimaryKey;
|
||||
|
||||
@ -15,7 +15,6 @@ import java.util.Date;
|
||||
* @version V1.0
|
||||
* @date 2020年3月18日
|
||||
*/
|
||||
@Data
|
||||
@TableName("sys_role_permission")
|
||||
@AutoTable(value = "sys_role_permission",comment = "角色权限")
|
||||
public class SysRolePermission implements Serializable {
|
||||
@ -30,4 +29,35 @@ public class SysRolePermission implements Serializable {
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getRoleId() {
|
||||
return roleId;
|
||||
}
|
||||
|
||||
public void setRoleId(Long roleId) {
|
||||
this.roleId = roleId;
|
||||
}
|
||||
|
||||
public Long getPermissionId() {
|
||||
return permissionId;
|
||||
}
|
||||
|
||||
public void setPermissionId(Long permissionId) {
|
||||
this.permissionId = permissionId;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
}
|
||||
299
solon-system/src/main/java/vip/fuck/sm/entity/SysUser.java
Normal file
299
solon-system/src/main/java/vip/fuck/sm/entity/SysUser.java
Normal file
@ -0,0 +1,299 @@
|
||||
package vip.fuck.sm.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
|
||||
import org.dromara.autotable.annotation.AutoTable;
|
||||
import org.dromara.autotable.annotation.ColumnDefault;
|
||||
import org.dromara.autotable.annotation.Ignore;
|
||||
import org.dromara.autotable.annotation.PrimaryKey;
|
||||
import org.noear.solon.validation.annotation.NotBlank;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户
|
||||
*
|
||||
* @author xian.zi.ming@qq.com fuck.vip
|
||||
* @version V1.0
|
||||
* @date 2020年3月18日
|
||||
*/
|
||||
@TableName("sys_user")
|
||||
@AutoTable(value = "sys_user",comment = "系统用户")
|
||||
public class SysUser extends BasePageEntity implements Serializable {
|
||||
@TableId(type = IdType.AUTO)
|
||||
@PrimaryKey(autoIncrement = true)
|
||||
private Long id;
|
||||
|
||||
@NotBlank(message = "账号不能为空")
|
||||
private String username;
|
||||
|
||||
private String salt;
|
||||
|
||||
@NotBlank(message = "密码不能为空")
|
||||
private String password;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Ignore
|
||||
private String oldPwd;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Ignore
|
||||
private String newPwd;
|
||||
|
||||
private String phone;
|
||||
|
||||
private Long deptId;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Ignore
|
||||
private String deptName;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Ignore
|
||||
private String deptNo;
|
||||
|
||||
|
||||
private String realName;
|
||||
|
||||
private String nickName;
|
||||
|
||||
private String email;
|
||||
|
||||
private Integer status;
|
||||
|
||||
private Integer sex;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@ColumnDefault(value = "0")
|
||||
private Integer deleted;
|
||||
|
||||
private Long createId;
|
||||
|
||||
private Long updateId;
|
||||
|
||||
private Integer createWhere;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date updateTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Ignore
|
||||
private String startTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Ignore
|
||||
private String endTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Ignore
|
||||
private List<Long> roleIds;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Ignore
|
||||
private String captcha;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getSalt() {
|
||||
return salt;
|
||||
}
|
||||
|
||||
public void setSalt(String salt) {
|
||||
this.salt = salt;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getOldPwd() {
|
||||
return oldPwd;
|
||||
}
|
||||
|
||||
public void setOldPwd(String oldPwd) {
|
||||
this.oldPwd = oldPwd;
|
||||
}
|
||||
|
||||
public String getNewPwd() {
|
||||
return newPwd;
|
||||
}
|
||||
|
||||
public void setNewPwd(String newPwd) {
|
||||
this.newPwd = newPwd;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public Long getDeptId() {
|
||||
return deptId;
|
||||
}
|
||||
|
||||
public void setDeptId(Long deptId) {
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
public String getDeptNo() {
|
||||
return deptNo;
|
||||
}
|
||||
|
||||
public void setDeptNo(String deptNo) {
|
||||
this.deptNo = deptNo;
|
||||
}
|
||||
|
||||
public String getRealName() {
|
||||
return realName;
|
||||
}
|
||||
|
||||
public void setRealName(String realName) {
|
||||
this.realName = realName;
|
||||
}
|
||||
|
||||
public String getNickName() {
|
||||
return nickName;
|
||||
}
|
||||
|
||||
public void setNickName(String nickName) {
|
||||
this.nickName = nickName;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(Integer sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public Integer getDeleted() {
|
||||
return deleted;
|
||||
}
|
||||
|
||||
public void setDeleted(Integer deleted) {
|
||||
this.deleted = deleted;
|
||||
}
|
||||
|
||||
public Long getCreateId() {
|
||||
return createId;
|
||||
}
|
||||
|
||||
public void setCreateId(Long createId) {
|
||||
this.createId = createId;
|
||||
}
|
||||
|
||||
public Long getUpdateId() {
|
||||
return updateId;
|
||||
}
|
||||
|
||||
public void setUpdateId(Long updateId) {
|
||||
this.updateId = updateId;
|
||||
}
|
||||
|
||||
public Integer getCreateWhere() {
|
||||
return createWhere;
|
||||
}
|
||||
|
||||
public void setCreateWhere(Integer createWhere) {
|
||||
this.createWhere = createWhere;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public String getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(String startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public String getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(String endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public List<Long> getRoleIds() {
|
||||
return roleIds;
|
||||
}
|
||||
|
||||
public void setRoleIds(List<Long> roleIds) {
|
||||
this.roleIds = roleIds;
|
||||
}
|
||||
|
||||
public String getCaptcha() {
|
||||
return captcha;
|
||||
}
|
||||
|
||||
public void setCaptcha(String captcha) {
|
||||
this.captcha = captcha;
|
||||
}
|
||||
}
|
||||
@ -1,7 +1,7 @@
|
||||
package vip.fuck.sm.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
|
||||
import org.dromara.autotable.annotation.AutoTable;
|
||||
import org.dromara.autotable.annotation.PrimaryKey;
|
||||
|
||||
@ -15,7 +15,6 @@ import java.util.Date;
|
||||
* @version V1.0
|
||||
* @date 2020年3月18日
|
||||
*/
|
||||
@Data
|
||||
@TableName("sys_user_role")
|
||||
@AutoTable(value = "sys_user_role",comment = "用户角色")
|
||||
public class SysUserRole implements Serializable {
|
||||
@ -30,5 +29,35 @@ public class SysUserRole implements Serializable {
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
}
|
||||
106
solon-system/src/main/java/vip/fuck/sm/gen/ColumnEntity.java
Normal file
106
solon-system/src/main/java/vip/fuck/sm/gen/ColumnEntity.java
Normal file
@ -0,0 +1,106 @@
|
||||
package vip.fuck.sm.gen;
|
||||
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 代码生成 列属性
|
||||
*
|
||||
* @author xian.zi.ming@qq.com fuck.vip
|
||||
* @version V1.0
|
||||
* @date 2020年3月18日
|
||||
*/
|
||||
|
||||
public class ColumnEntity implements Serializable {
|
||||
/**
|
||||
* 列名
|
||||
*/
|
||||
private String columnName;
|
||||
|
||||
/**
|
||||
* 列名类型
|
||||
*/
|
||||
private String dataType;
|
||||
|
||||
/**
|
||||
* 列名备注
|
||||
*/
|
||||
private String comments;
|
||||
|
||||
/**
|
||||
* 属性名称(第一个字母大写),如:user_name => UserName
|
||||
*/
|
||||
private String attrName;
|
||||
|
||||
/**
|
||||
* 属性名称(第一个字母小写),如:user_name => userName
|
||||
*/
|
||||
private String attrname;
|
||||
|
||||
/**
|
||||
* 属性类型
|
||||
*/
|
||||
private String attrType;
|
||||
|
||||
/**
|
||||
* auto_increment
|
||||
*/
|
||||
private String extra;
|
||||
|
||||
public String getColumnName() {
|
||||
return columnName;
|
||||
}
|
||||
|
||||
public void setColumnName(String columnName) {
|
||||
this.columnName = columnName;
|
||||
}
|
||||
|
||||
public String getDataType() {
|
||||
return dataType;
|
||||
}
|
||||
|
||||
public void setDataType(String dataType) {
|
||||
this.dataType = dataType;
|
||||
}
|
||||
|
||||
public String getComments() {
|
||||
return comments;
|
||||
}
|
||||
|
||||
public void setComments(String comments) {
|
||||
this.comments = comments;
|
||||
}
|
||||
|
||||
public String getAttrName() {
|
||||
return attrName;
|
||||
}
|
||||
|
||||
public void setAttrName(String attrName) {
|
||||
this.attrName = attrName;
|
||||
}
|
||||
|
||||
public String getAttrname() {
|
||||
return attrname;
|
||||
}
|
||||
|
||||
public void setAttrname(String attrname) {
|
||||
this.attrname = attrname;
|
||||
}
|
||||
|
||||
public String getAttrType() {
|
||||
return attrType;
|
||||
}
|
||||
|
||||
public void setAttrType(String attrType) {
|
||||
this.attrType = attrType;
|
||||
}
|
||||
|
||||
public String getExtra() {
|
||||
return extra;
|
||||
}
|
||||
|
||||
public void setExtra(String extra) {
|
||||
this.extra = extra;
|
||||
}
|
||||
}
|
||||
95
solon-system/src/main/java/vip/fuck/sm/gen/TableEntity.java
Normal file
95
solon-system/src/main/java/vip/fuck/sm/gen/TableEntity.java
Normal file
@ -0,0 +1,95 @@
|
||||
package vip.fuck.sm.gen;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 代码生成 表数据
|
||||
*
|
||||
* @author xian.zi.ming@qq.com fuck.vip
|
||||
* @version V1.0
|
||||
* @date 2020年3月18日
|
||||
*/
|
||||
|
||||
public class TableEntity {
|
||||
//表的名称
|
||||
private String tableName;
|
||||
//表的备注
|
||||
private String comments;
|
||||
//表的主键
|
||||
private ColumnEntity pk;
|
||||
//表的列名(不包含主键)
|
||||
private List<ColumnEntity> columns;
|
||||
private List<ColumnEntity> htmlColumns;
|
||||
|
||||
//类名(第一个字母大写),如:sys_user => SysUser
|
||||
private String className;
|
||||
//类名(第一个字母小写),如:sys_user => sysUser
|
||||
private String classname;
|
||||
//类名(都小写),如:sys_user => sysuser
|
||||
private String classNameLower;
|
||||
|
||||
public String getTableName() {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
public void setTableName(String tableName) {
|
||||
this.tableName = tableName;
|
||||
}
|
||||
|
||||
public String getComments() {
|
||||
return comments;
|
||||
}
|
||||
|
||||
public void setComments(String comments) {
|
||||
this.comments = comments;
|
||||
}
|
||||
|
||||
public ColumnEntity getPk() {
|
||||
return pk;
|
||||
}
|
||||
|
||||
public void setPk(ColumnEntity pk) {
|
||||
this.pk = pk;
|
||||
}
|
||||
|
||||
public List<ColumnEntity> getColumns() {
|
||||
return columns;
|
||||
}
|
||||
|
||||
public void setColumns(List<ColumnEntity> columns) {
|
||||
this.columns = columns;
|
||||
}
|
||||
|
||||
public List<ColumnEntity> getHtmlColumns() {
|
||||
return htmlColumns;
|
||||
}
|
||||
|
||||
public void setHtmlColumns(List<ColumnEntity> htmlColumns) {
|
||||
this.htmlColumns = htmlColumns;
|
||||
}
|
||||
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
public String getClassname() {
|
||||
return classname;
|
||||
}
|
||||
|
||||
public void setClassname(String classname) {
|
||||
this.classname = classname;
|
||||
}
|
||||
|
||||
public String getClassNameLower() {
|
||||
return classNameLower;
|
||||
}
|
||||
|
||||
public void setClassNameLower(String classNameLower) {
|
||||
this.classNameLower = classNameLower;
|
||||
}
|
||||
}
|
||||
@ -17,5 +17,7 @@ public interface SysPlugsService extends IService<SysPlugsEntity> {
|
||||
|
||||
SysPlugsEntity uploadJar(UploadedFile file) throws Exception;
|
||||
|
||||
void startPlugin(String qn);
|
||||
|
||||
}
|
||||
|
||||
@ -2,7 +2,6 @@ package vip.fuck.sm.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@ -14,7 +13,7 @@ import vip.fuck.sm.mapper.SysDeptMapper;
|
||||
import vip.fuck.sm.mapper.SysUserMapper;
|
||||
import vip.fuck.sm.service.DeptService;
|
||||
import vip.fuck.sm.vo.resp.DeptRespNodeVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.apache.ibatis.solon.annotation.Db;
|
||||
import org.noear.solon.annotation.Inject;
|
||||
import org.noear.solon.annotation.Component;
|
||||
@ -34,7 +33,6 @@ import java.util.concurrent.atomic.AtomicReference;
|
||||
* @date 2020年3月18日
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
public class DeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> implements DeptService {
|
||||
|
||||
@Db
|
||||
@ -15,7 +15,7 @@ import vip.fuck.sm.service.PermissionService;
|
||||
import vip.fuck.sm.service.RolePermissionService;
|
||||
import vip.fuck.sm.service.UserRoleService;
|
||||
import vip.fuck.sm.vo.resp.PermissionRespNode;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.apache.ibatis.solon.annotation.Db;
|
||||
import org.noear.solon.annotation.Inject;
|
||||
import org.noear.solon.annotation.Component;
|
||||
@ -36,7 +36,6 @@ import java.util.Set;
|
||||
* @date 2020年3月18日
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
public class PermissionServiceImpl extends ServiceImpl<SysPermissionMapper, SysPermission> implements PermissionService {
|
||||
@Inject
|
||||
private UserRoleService userRoleService;
|
||||
@ -78,7 +77,7 @@ public class PermissionServiceImpl extends ServiceImpl<SysPermissionMapper, SysP
|
||||
List<Long> userIds = getUserIdsById(permissionId);
|
||||
SysPermission sysPermission = sysPermissionMapper.selectById(permissionId);
|
||||
if (null == sysPermission) {
|
||||
log.error("传入 的 id:{}不合法", permissionId);
|
||||
// log.error("传入 的 id:{}不合法", permissionId);
|
||||
throw new BusinessException(BaseResponseCode.DATA_ERROR);
|
||||
}
|
||||
//获取下一级
|
||||
@ -15,7 +15,7 @@ import vip.fuck.sm.service.*;
|
||||
import vip.fuck.sm.vo.req.RolePermissionOperationReqVO;
|
||||
import vip.fuck.sm.vo.resp.DeptRespNodeVO;
|
||||
import vip.fuck.sm.vo.resp.PermissionRespNode;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.apache.ibatis.solon.annotation.Db;
|
||||
import org.noear.solon.annotation.Component;
|
||||
import org.noear.solon.annotation.Inject;
|
||||
@ -34,7 +34,6 @@ import java.util.Set;
|
||||
* @date 2020年3月18日
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
public class RoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> implements RoleService {
|
||||
@Db
|
||||
private SysRoleMapper sysRoleMapper;
|
||||
@ -67,7 +66,7 @@ public class RoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impleme
|
||||
public void updateRole(SysRole vo) {
|
||||
SysRole sysRole = sysRoleMapper.selectById(vo.getId());
|
||||
if (null == sysRole) {
|
||||
log.error("传入 的 id:{}不合法", vo.getId());
|
||||
// log.error("传入 的 id:{}不合法", vo.getId());
|
||||
throw new BusinessException(BaseResponseCode.DATA_ERROR);
|
||||
}
|
||||
sysRoleMapper.updateById(vo);
|
||||
@ -85,7 +84,7 @@ public class RoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impleme
|
||||
public SysRole detailInfo(String id) {
|
||||
SysRole sysRole = sysRoleMapper.selectById(id);
|
||||
if (sysRole == null) {
|
||||
log.error("传入 的 id:{}不合法", id);
|
||||
// log.error("传入 的 id:{}不合法", id);
|
||||
throw new BusinessException(BaseResponseCode.DATA_ERROR);
|
||||
}
|
||||
List<PermissionRespNode> permissionRespNodes = permissionService.selectAllByTree(1);
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user