🌱 init
This commit is contained in:
commit
89831785d9
|
@ -0,0 +1,8 @@
|
||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="GitCommitMessageStorage">
|
||||||
|
<option name="messageStorage">
|
||||||
|
<MessageStorage>
|
||||||
|
<option name="commitTemplate">
|
||||||
|
<CommitTemplate>
|
||||||
|
<option name="body" value="" />
|
||||||
|
<option name="changes" value="" />
|
||||||
|
<option name="closes" value="" />
|
||||||
|
<option name="scope" value="" />
|
||||||
|
<option name="skipCi" value="" />
|
||||||
|
<option name="subject" value="" />
|
||||||
|
<option name="type" value="feat" />
|
||||||
|
</CommitTemplate>
|
||||||
|
</option>
|
||||||
|
</MessageStorage>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,27 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="CompilerConfiguration">
|
||||||
|
<annotationProcessing>
|
||||||
|
<profile default="true" name="Default" enabled="true" />
|
||||||
|
<profile name="Maven default annotation processors profile" enabled="true">
|
||||||
|
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||||
|
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||||
|
<outputRelativeToContentRoot value="true" />
|
||||||
|
<module name="model" />
|
||||||
|
<module name="common-util" />
|
||||||
|
<module name="service-oa" />
|
||||||
|
<module name="service-util" />
|
||||||
|
</profile>
|
||||||
|
</annotationProcessing>
|
||||||
|
</component>
|
||||||
|
<component name="JavacSettings">
|
||||||
|
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
|
||||||
|
<module name="common" options="-parameters" />
|
||||||
|
<module name="common-util" options="-parameters" />
|
||||||
|
<module name="guigu-oa-parent" options="-parameters" />
|
||||||
|
<module name="model" options="-parameters" />
|
||||||
|
<module name="service-oa" options="-parameters" />
|
||||||
|
<module name="service-util" options="-parameters" />
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="PublishConfigData" autoUpload="Always" remoteFilesAllowedToDisappearOnAutoupload="false" autoUploadExternalChanges="true">
|
||||||
|
<option name="myAutoUpload" value="ALWAYS" />
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="Encoding">
|
||||||
|
<file url="file://$PROJECT_DIR$/common/common-util/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/common/common-util/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/common/common-util/src/main/resources-filtered" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/common/service-util/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/common/service-util/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/common/service-util/src/main/resources-filtered" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/common/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/common/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/common/src/main/resources-filtered" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/model/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/model/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/model/src/main/resources-filtered" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/service-oa/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/service-oa/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/service-oa/src/main/resources-filtered" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/src/main/resources-filtered" charset="UTF-8" />
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="RemoteRepositoriesConfiguration">
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="central" />
|
||||||
|
<option name="name" value="Central Repository" />
|
||||||
|
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="central" />
|
||||||
|
<option name="name" value="Maven Central repository" />
|
||||||
|
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="jboss.community" />
|
||||||
|
<option name="name" value="JBoss Community repository" />
|
||||||
|
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||||
|
</remote-repository>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||||
|
<component name="MavenProjectsManager">
|
||||||
|
<option name="originalFiles">
|
||||||
|
<list>
|
||||||
|
<option value="$PROJECT_DIR$/pom.xml" />
|
||||||
|
<option value="$PROJECT_DIR$/common/common-util/pom.xml" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
|
||||||
|
</project>
|
|
@ -0,0 +1,124 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="Palette2">
|
||||||
|
<group name="Swing">
|
||||||
|
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
||||||
|
</item>
|
||||||
|
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
||||||
|
<initial-values>
|
||||||
|
<property name="text" value="Button" />
|
||||||
|
</initial-values>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||||
|
<initial-values>
|
||||||
|
<property name="text" value="RadioButton" />
|
||||||
|
</initial-values>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||||
|
<initial-values>
|
||||||
|
<property name="text" value="CheckBox" />
|
||||||
|
</initial-values>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||||
|
<initial-values>
|
||||||
|
<property name="text" value="Label" />
|
||||||
|
</initial-values>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||||
|
<preferred-size width="150" height="-1" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||||
|
<preferred-size width="150" height="-1" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||||
|
<preferred-size width="150" height="-1" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||||
|
<preferred-size width="150" height="50" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||||
|
<preferred-size width="150" height="50" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||||
|
<preferred-size width="150" height="50" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||||
|
<preferred-size width="150" height="50" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
||||||
|
<preferred-size width="150" height="50" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||||
|
<preferred-size width="150" height="50" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||||
|
<preferred-size width="200" height="200" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||||
|
<preferred-size width="200" height="200" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
||||||
|
<preferred-size width="-1" height="20" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||||
|
</item>
|
||||||
|
</group>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,38 @@
|
||||||
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
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>com.atguigu</groupId>
|
||||||
|
<artifactId>common</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>common-util</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<name>common-util</name>
|
||||||
|
<url>https://maven.apache.org</url>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.jsonwebtoken</groupId>
|
||||||
|
<artifactId>jjwt</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba</groupId>
|
||||||
|
<artifactId>fastjson</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
|
@ -0,0 +1,174 @@
|
||||||
|
package com.atguigu.common.result;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class Result<T> {
|
||||||
|
// 状态码
|
||||||
|
private Integer code;
|
||||||
|
// 返回消息
|
||||||
|
private String message;
|
||||||
|
// 返回数据
|
||||||
|
private T data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* * 自定义返回体
|
||||||
|
*
|
||||||
|
* @param data 返回体
|
||||||
|
* @return Result<T>
|
||||||
|
*/
|
||||||
|
protected static <T> Result<T> build(T data) {
|
||||||
|
Result<T> result = new Result<>();
|
||||||
|
if (data != null) {
|
||||||
|
result.setData(data);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* * 自定义返回体,使用ResultCodeEnum构建
|
||||||
|
*
|
||||||
|
* @param body 返回体
|
||||||
|
* @param codeEnum 返回状态码
|
||||||
|
* @return Result<T>
|
||||||
|
*/
|
||||||
|
public static <T> Result<T> build(T body, ResultCodeEnum codeEnum) {
|
||||||
|
Result<T> result = build(body);
|
||||||
|
result.setCode(codeEnum.getCode());
|
||||||
|
result.setMessage(codeEnum.getMessage());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* * 自定义返回体
|
||||||
|
*
|
||||||
|
* @param body 返回体
|
||||||
|
* @param code 返回状态码
|
||||||
|
* @param message 返回消息
|
||||||
|
* @return Result<T>
|
||||||
|
*/
|
||||||
|
public static <T> Result<T> build(T body, Integer code, String message) {
|
||||||
|
Result<T> result = build(body);
|
||||||
|
result.setCode(code);
|
||||||
|
result.setMessage(message);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* * 操作成功
|
||||||
|
*
|
||||||
|
* @return Result<T>
|
||||||
|
*/
|
||||||
|
public static <T> Result<T> success() {
|
||||||
|
return Result.success(null, ResultCodeEnum.SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* * 操作成功
|
||||||
|
*
|
||||||
|
* @param data baseCategory1List
|
||||||
|
*/
|
||||||
|
public static <T> Result<T> success(T data) {
|
||||||
|
return build(data, ResultCodeEnum.SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* * 操作成功-状态码
|
||||||
|
*
|
||||||
|
* @param codeEnum 状态码
|
||||||
|
*/
|
||||||
|
public static <T> Result<T> success(ResultCodeEnum codeEnum) {
|
||||||
|
return success(null, codeEnum);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* * 操作成功-自定义返回数据和状态码
|
||||||
|
*
|
||||||
|
* @param data 返回体
|
||||||
|
* @param codeEnum 状态码
|
||||||
|
*/
|
||||||
|
public static <T> Result<T> success(T data, ResultCodeEnum codeEnum) {
|
||||||
|
return build(data, codeEnum);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* * 操作失败-自定义返回数据和状态码
|
||||||
|
*
|
||||||
|
* @param data 返回体
|
||||||
|
* @param message 错误信息
|
||||||
|
*/
|
||||||
|
public static <T> Result<T> success(T data, String message) {
|
||||||
|
return build(data, 200, message);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* * 操作失败-自定义返回数据和状态码
|
||||||
|
*
|
||||||
|
* @param data 返回体
|
||||||
|
* @param code 状态码
|
||||||
|
* @param message 错误信息
|
||||||
|
*/
|
||||||
|
public static <T> Result<T> success(T data, Integer code, String message) {
|
||||||
|
return build(data, code, message);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* * 操作失败
|
||||||
|
*/
|
||||||
|
public static <T> Result<T> error() {
|
||||||
|
return Result.build(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* * 操作失败-自定义返回数据
|
||||||
|
*
|
||||||
|
* @param data 返回体
|
||||||
|
*/
|
||||||
|
public static <T> Result<T> error(T data) {
|
||||||
|
return build(data, ResultCodeEnum.FAIL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* * 操作失败-状态码
|
||||||
|
*
|
||||||
|
* @param codeEnum 状态码
|
||||||
|
*/
|
||||||
|
public static <T> Result<T> error(ResultCodeEnum codeEnum) {
|
||||||
|
return build(null, codeEnum);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* * 操作失败-自定义返回数据和状态码
|
||||||
|
*
|
||||||
|
* @param data 返回体
|
||||||
|
* @param codeEnum 状态码
|
||||||
|
*/
|
||||||
|
public static <T> Result<T> error(T data, ResultCodeEnum codeEnum) {
|
||||||
|
return build(data, codeEnum);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* * 操作失败-自定义返回数据和状态码
|
||||||
|
*
|
||||||
|
* @param data 返回体
|
||||||
|
* @param code 状态码
|
||||||
|
* @param message 错误信息
|
||||||
|
*/
|
||||||
|
public static <T> Result<T> error(T data, Integer code, String message) {
|
||||||
|
return build(data, code, message);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* * 操作失败-自定义返回数据和状态码
|
||||||
|
*
|
||||||
|
* @param data 返回体
|
||||||
|
* @param message 错误信息
|
||||||
|
*/
|
||||||
|
public static <T> Result<T> error(T data, String message) {
|
||||||
|
return build(null, 500, message);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.atguigu.common.result;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统一返回结果状态信息类
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public enum ResultCodeEnum {
|
||||||
|
|
||||||
|
SUCCESS(200, "成功"),
|
||||||
|
FAIL(201, "失败"),
|
||||||
|
SERVICE_ERROR(2012, "服务异常"),
|
||||||
|
DATA_ERROR(204, "数据异常"),
|
||||||
|
|
||||||
|
LOGIN_AUTH(208, "未登陆"),
|
||||||
|
PERMISSION(209, "没有权限");
|
||||||
|
|
||||||
|
private final Integer code;
|
||||||
|
private final String message;
|
||||||
|
|
||||||
|
ResultCodeEnum(Integer code, String message) {
|
||||||
|
this.code = code;
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,26 @@
|
||||||
|
<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>com.atguigu</groupId>
|
||||||
|
<artifactId>guigu-oa-parent</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>common</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
<name>common</name>
|
||||||
|
<url>https://maven.apache.org</url>
|
||||||
|
<modules>
|
||||||
|
<module>service-util</module>
|
||||||
|
</modules>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
|
@ -0,0 +1,50 @@
|
||||||
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
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>com.atguigu</groupId>
|
||||||
|
<artifactId>common</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>service-util</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<name>service-util</name>
|
||||||
|
<url>https://maven.apache.org</url>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.atguigu</groupId>
|
||||||
|
<artifactId>common-util</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<!-- mysql和代码生成器 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus-generator</artifactId>
|
||||||
|
<version>3.4.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.velocity</groupId>
|
||||||
|
<artifactId>velocity-engine-core</artifactId>
|
||||||
|
<version>2.0</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
|
@ -0,0 +1,68 @@
|
||||||
|
package com.atguigu;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.DbType;
|
||||||
|
import com.baomidou.mybatisplus.generator.AutoGenerator;
|
||||||
|
import com.baomidou.mybatisplus.generator.config.DataSourceConfig;
|
||||||
|
import com.baomidou.mybatisplus.generator.config.GlobalConfig;
|
||||||
|
import com.baomidou.mybatisplus.generator.config.PackageConfig;
|
||||||
|
import com.baomidou.mybatisplus.generator.config.StrategyConfig;
|
||||||
|
import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
|
||||||
|
|
||||||
|
public class CodeGet {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
// 1、创建代码生成器
|
||||||
|
AutoGenerator mpg = new AutoGenerator();
|
||||||
|
|
||||||
|
// 2、全局配置
|
||||||
|
// 全局配置
|
||||||
|
GlobalConfig gc = new GlobalConfig();
|
||||||
|
// TODO 需要修改路径名称
|
||||||
|
gc.setOutputDir("F:\\File\\Java\\ssyx\\ssyx-parent\\service\\service-order" + "/src/main/java");
|
||||||
|
|
||||||
|
gc.setServiceName("%sService"); // 去掉Service接口的首字母I
|
||||||
|
gc.setAuthor("bunny");
|
||||||
|
gc.setOpen(false);
|
||||||
|
mpg.setGlobalConfig(gc);
|
||||||
|
|
||||||
|
// 3、数据源配置
|
||||||
|
DataSourceConfig dsc = new DataSourceConfig();
|
||||||
|
// TODO 需要修改数据库
|
||||||
|
dsc.setUrl("jdbc:mysql://106.15.251.123:3305/shequ-order?serverTimezone=GMT%2B8&useSSL=false&characterEncoding=utf-8&allowPublicKeyRetrieval=true");
|
||||||
|
dsc.setDriverName("com.mysql.cj.jdbc.Driver");
|
||||||
|
dsc.setUsername("root");
|
||||||
|
dsc.setPassword("02120212");
|
||||||
|
dsc.setDbType(DbType.MYSQL);
|
||||||
|
mpg.setDataSource(dsc);
|
||||||
|
|
||||||
|
// 4、包配置
|
||||||
|
PackageConfig pc = new PackageConfig();
|
||||||
|
pc.setParent("com.atguigu.ssyx");
|
||||||
|
// TODO 需要修改模块名
|
||||||
|
pc.setModuleName("order");
|
||||||
|
pc.setController("controller");
|
||||||
|
pc.setService("service");
|
||||||
|
pc.setMapper("mapper");
|
||||||
|
mpg.setPackageInfo(pc);
|
||||||
|
|
||||||
|
// 5、策略配置
|
||||||
|
StrategyConfig strategy = getStrategyConfig();
|
||||||
|
|
||||||
|
mpg.setStrategy(strategy);
|
||||||
|
|
||||||
|
// 6、执行
|
||||||
|
mpg.execute();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static StrategyConfig getStrategyConfig() {
|
||||||
|
StrategyConfig strategy = new StrategyConfig();
|
||||||
|
// TODO 要生成的表
|
||||||
|
strategy.setInclude("cart_info", "order_item", "order_info", "order_deliver");
|
||||||
|
strategy.setNaming(NamingStrategy.underline_to_camel);// 数据库表映射到实体的命名策略
|
||||||
|
strategy.setColumnNaming(NamingStrategy.underline_to_camel);// 数据库表字段映射到实体的命名策略
|
||||||
|
strategy.setEntityLombokModel(true); // lombok 模型 @Accessors(chain = true) setter链式操作
|
||||||
|
strategy.setRestControllerStyle(true); // restful api风格控制器
|
||||||
|
strategy.setControllerMappingHyphenStyle(true); // url中驼峰转连字符
|
||||||
|
return strategy;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
package com.atguigu.config;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.DbType;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.inner.BlockAttackInnerInterceptor;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||||
|
|
||||||
|
@EnableTransactionManagement
|
||||||
|
@MapperScan("com.atguigu.*.mapper")
|
||||||
|
@Configuration
|
||||||
|
@Slf4j
|
||||||
|
public class MybatisPlusConfig {
|
||||||
|
@Bean
|
||||||
|
public MybatisPlusInterceptor mybatisPlusInterceptor() {
|
||||||
|
log.info("注入MybatisPlus配置类...");
|
||||||
|
|
||||||
|
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
||||||
|
// 向Mybatis过滤器链中添加分页拦截器
|
||||||
|
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
|
||||||
|
// 乐观锁插件
|
||||||
|
interceptor.addInnerInterceptor(new OptimisticLockerInnerInterceptor());
|
||||||
|
// 防止全表删除
|
||||||
|
interceptor.addInnerInterceptor(new BlockAttackInnerInterceptor());
|
||||||
|
return interceptor;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
package com.atguigu.constant;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 信息提示常量类
|
||||||
|
*/
|
||||||
|
public class MessageConstant {
|
||||||
|
public static final String PASSWORD_ERROR = "密码错误";
|
||||||
|
public static final String OLD_PASSWORD_ERROR = "旧密码不匹配";
|
||||||
|
public static final String OLD_PASSWORD_SAME_NEW_PASSWORD = "旧密码与新密码相同";
|
||||||
|
public static final String ACCOUNT_NOT_FOUND = "账号不存在";
|
||||||
|
public static final String ACCOUNT_LOCKED = "账号被锁定";
|
||||||
|
public static final String UNKNOWN_ERROR = "未知错误";
|
||||||
|
public static final String USER_NOT_LOGIN = "用户未登录";
|
||||||
|
public static final String USER_TOKEN_OUT_OF_DATE = "用户登录过期";
|
||||||
|
public static final String LOGIN_FAILED = "登录失败";
|
||||||
|
public static final String UPLOAD_FAILED = "文件上传失败";
|
||||||
|
public static final String PASSWORD_EDIT_FAILED = "密码修改失败";
|
||||||
|
public static final String ALREADY_EXISTS = "已存在";
|
||||||
|
public static final String REQUEST_NOT_EMPTY = "请求不为空";
|
||||||
|
public static final String UPDATE_ID_IS_NOT_EMPTY = "删除id不能为空";
|
||||||
|
public static final String DELETE_ID_IS_NOT_EMPTY = "修改id不能为空";
|
||||||
|
public static final String MENU_IS_NOT_EXIST = "菜单不存在";
|
||||||
|
public static final String SAVE_DTO_IS_NULL = "添加参数不能为空";
|
||||||
|
public static final String UPDATE_DTO_IS_NULL = "修改参数不能为空";
|
||||||
|
public static final String FIND_ID_IS_NOT_EMPTY = "查询ID不能为空";
|
||||||
|
public static final String MESSAGE_CODE_NOT_PASS = "短信验证码未过期";
|
||||||
|
public static final String MESSAGE_CODE_UNAUTHORIZED = "短信验证码未授权,请联系管理员";
|
||||||
|
public static final String VERIFICATION_CODE_ERROR = "验证码错误";
|
||||||
|
public static final String USER_DOES_NOT_EXIST = "用户不存在";
|
||||||
|
public static final String USER_DOES_IS_EXIST = "用户已存在";
|
||||||
|
public static final String VERIFICATION_CODE_IS_EMPTY = "请先发送验证码";
|
||||||
|
public static final String LOGIN_DTO_IS_EMPTY = "登录参数不能为空";
|
||||||
|
public static final String TOKEN_IS_EMPTY = "token为空";
|
||||||
|
public static final String DATA_IS_EMPTY = "数据为空";
|
||||||
|
public static final String STOCK_LESS = "库存不足";
|
||||||
|
public static final String SKU_NUM_CANNOT_BE_LESS = "商品数量不能再少了";
|
||||||
|
public static final String CART_IS_EMPTY = "购物车为空";
|
||||||
|
}
|
|
@ -0,0 +1,47 @@
|
||||||
|
package com.atguigu.context;
|
||||||
|
|
||||||
|
|
||||||
|
public class BaseContext {
|
||||||
|
private static final ThreadLocal<Long> userId = new ThreadLocal<>();
|
||||||
|
private static final ThreadLocal<Long> wareId = new ThreadLocal<>();
|
||||||
|
private static final ThreadLocal<Long> adminId = new ThreadLocal<>();
|
||||||
|
|
||||||
|
// 用户id相关
|
||||||
|
public static Long getUserId() {
|
||||||
|
return userId.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setUserId(Long _userId) {
|
||||||
|
userId.set(_userId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void removeUserId() {
|
||||||
|
userId.remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
// wareId相关
|
||||||
|
public static Long getWareId() {
|
||||||
|
return wareId.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setWareId(Long _wareId) {
|
||||||
|
wareId.set(_wareId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void removeWareId() {
|
||||||
|
wareId.remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
// adminId 相关
|
||||||
|
public static Long getAdminId() {
|
||||||
|
return adminId.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setAdminId(Long _adminId) {
|
||||||
|
adminId.set(_adminId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void removeAdminId() {
|
||||||
|
adminId.remove();
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,23 @@
|
||||||
|
18:26:31:597 INFO 21276 --- [main] com.atguigu.auth.ServiceAuthApplication : Starting ServiceAuthApplication on bunny with PID 21276 (G:\java项目\guigu-oa-parent\service-oa\target\classes started by 13199 in G:\java项目\guigu-oa-parent)
|
||||||
|
18:26:31:598 INFO 21276 --- [main] com.atguigu.auth.ServiceAuthApplication : The following profiles are active: dev
|
||||||
|
18:26:32:027 WARN 21276 --- [main] o.m.s.mapper.ClassPathMapperScanner : No MyBatis mapper was found in '[com.atguigu.*.mapper]' package. Please check your configuration.
|
||||||
|
18:26:32:195 INFO 21276 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8800 (http)
|
||||||
|
18:26:32:200 INFO 21276 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
|
||||||
|
18:26:32:200 INFO 21276 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.39]
|
||||||
|
18:26:32:239 INFO 21276 --- [main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
|
||||||
|
18:26:32:239 INFO 21276 --- [main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 622 ms
|
||||||
|
18:26:32:437 INFO 21276 --- [main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
|
||||||
|
18:26:32:836 INFO 21276 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8800 (http) with context path ''
|
||||||
|
18:26:32:892 INFO 21276 --- [main] com.atguigu.auth.ServiceAuthApplication : Started ServiceAuthApplication in 1.512 seconds (JVM running for 1.974)
|
||||||
|
18:27:41:337 INFO 21276 --- [SpringContextShutdownHook] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor'
|
||||||
|
18:27:45:678 INFO 20440 --- [main] com.atguigu.auth.ServiceAuthApplication : Starting ServiceAuthApplication on bunny with PID 20440 (G:\java项目\guigu-oa-parent\service-oa\target\classes started by 13199 in G:\java项目\guigu-oa-parent)
|
||||||
|
18:27:45:680 INFO 20440 --- [main] com.atguigu.auth.ServiceAuthApplication : The following profiles are active: dev
|
||||||
|
18:27:46:090 WARN 20440 --- [main] o.m.s.mapper.ClassPathMapperScanner : No MyBatis mapper was found in '[com.atguigu.*.mapper]' package. Please check your configuration.
|
||||||
|
18:27:46:245 INFO 20440 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8800 (http)
|
||||||
|
18:27:46:249 INFO 20440 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
|
||||||
|
18:27:46:249 INFO 20440 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.39]
|
||||||
|
18:27:46:284 INFO 20440 --- [main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
|
||||||
|
18:27:46:284 INFO 20440 --- [main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 581 ms
|
||||||
|
18:27:46:478 INFO 20440 --- [main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
|
||||||
|
18:27:46:859 INFO 20440 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8800 (http) with context path ''
|
||||||
|
18:27:46:901 INFO 20440 --- [main] com.atguigu.auth.ServiceAuthApplication : Started ServiceAuthApplication in 1.425 seconds (JVM running for 1.84)
|
|
@ -0,0 +1,37 @@
|
||||||
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
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>com.atguigu</groupId>
|
||||||
|
<artifactId>guigu-oa-parent</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>model</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<name>model</name>
|
||||||
|
<url>https://maven.apache.org</url>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<!--lombok用来简化实体类-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.xiaoymin</groupId>
|
||||||
|
<artifactId>knife4j-spring-boot-starter</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
|
@ -0,0 +1,32 @@
|
||||||
|
package com.atguigu.model.base;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class BaseEntity implements Serializable {
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@TableField("create_time")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
@TableField("update_time")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
@TableLogic
|
||||||
|
@TableField("is_deleted")
|
||||||
|
private Integer isDeleted;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Map<String,Object> param = new HashMap<>();
|
||||||
|
}
|
|
@ -0,0 +1,56 @@
|
||||||
|
package com.atguigu.model.process;
|
||||||
|
|
||||||
|
import com.atguigu.model.base.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "Process")
|
||||||
|
@TableName("oa_process")
|
||||||
|
public class Process extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审批code")
|
||||||
|
@TableField("process_code")
|
||||||
|
private String processCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户id")
|
||||||
|
@TableField("user_id")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审批模板id")
|
||||||
|
@TableField("process_template_id")
|
||||||
|
private Long processTemplateId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审批类型id")
|
||||||
|
@TableField("process_type_id")
|
||||||
|
private Long processTypeId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "标题")
|
||||||
|
@TableField("title")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "描述")
|
||||||
|
@TableField("description")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "表单值")
|
||||||
|
@TableField("form_values")
|
||||||
|
private String formValues;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "流程实例id")
|
||||||
|
@TableField("process_instance_id")
|
||||||
|
private String processInstanceId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "当前审批人")
|
||||||
|
@TableField("current_auditor")
|
||||||
|
private String currentAuditor;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态(0:默认 1:审批中 2:审批通过 -1:驳回)")
|
||||||
|
@TableField("status")
|
||||||
|
private Integer status;
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
package com.atguigu.model.process;
|
||||||
|
|
||||||
|
import com.atguigu.model.base.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "ProcessRecord")
|
||||||
|
@TableName("oa_process_record")
|
||||||
|
public class ProcessRecord extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审批流程id")
|
||||||
|
@TableField("process_id")
|
||||||
|
private Long processId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审批描述")
|
||||||
|
@TableField("description")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态")
|
||||||
|
@TableField("status")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "操作用户id")
|
||||||
|
@TableField("operate_user_id")
|
||||||
|
private Long operateUserId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "操作用户")
|
||||||
|
@TableField("operate_user")
|
||||||
|
private String operateUser;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,59 @@
|
||||||
|
package com.atguigu.model.process;
|
||||||
|
|
||||||
|
import com.atguigu.model.base.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "ProcessTemplate")
|
||||||
|
@TableName("oa_process_template")
|
||||||
|
public class ProcessTemplate extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "模板名称")
|
||||||
|
@TableField("name")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "图标路径")
|
||||||
|
@TableField("icon_url")
|
||||||
|
private String iconUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "processTypeId")
|
||||||
|
@TableField("process_type_id")
|
||||||
|
private Long processTypeId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "表单属性")
|
||||||
|
@TableField("form_props")
|
||||||
|
private String formProps;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "表单选项")
|
||||||
|
@TableField("form_options")
|
||||||
|
private String formOptions;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "描述")
|
||||||
|
@TableField("description")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "流程定义key")
|
||||||
|
@TableField("process_definition_key")
|
||||||
|
private String processDefinitionKey;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "流程定义上传路process_model_id")
|
||||||
|
@TableField("process_definition_path")
|
||||||
|
private String processDefinitionPath;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "流程定义模型id")
|
||||||
|
@TableField("process_model_id")
|
||||||
|
private String processModelId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态")
|
||||||
|
@TableField("status")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String processTypeName;
|
||||||
|
}
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.atguigu.model.process;
|
||||||
|
|
||||||
|
import com.atguigu.model.base.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "ProcessType")
|
||||||
|
@TableName("oa_process_type")
|
||||||
|
public class ProcessType extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "类型名称")
|
||||||
|
@TableField("name")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "描述")
|
||||||
|
@TableField("description")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<ProcessTemplate> processTemplateList;
|
||||||
|
}
|
|
@ -0,0 +1,51 @@
|
||||||
|
package com.atguigu.model.system;
|
||||||
|
|
||||||
|
import com.atguigu.model.base.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "部门")
|
||||||
|
@TableName("sys_dept")
|
||||||
|
public class SysDept extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "部门名称")
|
||||||
|
@TableField("name")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "上级部门id")
|
||||||
|
@TableField("parent_id")
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "树结构")
|
||||||
|
@TableField("tree_path")
|
||||||
|
private String treePath;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "排序")
|
||||||
|
@TableField("sort_value")
|
||||||
|
private Integer sortValue;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "负责人")
|
||||||
|
@TableField("leader")
|
||||||
|
private String leader;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "电话")
|
||||||
|
@TableField("phone")
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态(1正常 0停用)")
|
||||||
|
@TableField("status")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "下级部门")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<SysDept> children;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
package com.atguigu.model.system;
|
||||||
|
|
||||||
|
import com.atguigu.model.base.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "SysLoginLog")
|
||||||
|
@TableName("sys_login_log")
|
||||||
|
public class SysLoginLog extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户账号")
|
||||||
|
@TableField("username")
|
||||||
|
private String username;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "登录IP地址")
|
||||||
|
@TableField("ipaddr")
|
||||||
|
private String ipaddr;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "登录状态(0成功 1失败)")
|
||||||
|
@TableField("status")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "提示信息")
|
||||||
|
@TableField("msg")
|
||||||
|
private String msg;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "访问时间")
|
||||||
|
@TableField("access_time")
|
||||||
|
private Date accessTime;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,62 @@
|
||||||
|
package com.atguigu.model.system;
|
||||||
|
|
||||||
|
import com.atguigu.model.base.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "菜单")
|
||||||
|
@TableName("sys_menu")
|
||||||
|
public class SysMenu extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "所属上级")
|
||||||
|
@TableField("parent_id")
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "名称")
|
||||||
|
@TableField("name")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "类型(1:菜单,2:按钮)")
|
||||||
|
@TableField("type")
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "路由地址")
|
||||||
|
@TableField("path")
|
||||||
|
private String path;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "组件路径")
|
||||||
|
@TableField("component")
|
||||||
|
private String component;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "权限标识")
|
||||||
|
@TableField("perms")
|
||||||
|
private String perms;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "图标")
|
||||||
|
@TableField("icon")
|
||||||
|
private String icon;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "排序")
|
||||||
|
@TableField("sort_value")
|
||||||
|
private Integer sortValue;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态(0:禁止,1:正常)")
|
||||||
|
@TableField("status")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
// 下级列表
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<SysMenu> children;
|
||||||
|
//是否选中
|
||||||
|
@TableField(exist = false)
|
||||||
|
private boolean isSelect;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,74 @@
|
||||||
|
package com.atguigu.model.system;
|
||||||
|
|
||||||
|
import com.atguigu.model.base.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "SysOperLog")
|
||||||
|
@TableName("sys_oper_log")
|
||||||
|
public class SysOperLog extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "模块标题")
|
||||||
|
@TableField("title")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "业务类型(0其它 1新增 2修改 3删除)")
|
||||||
|
@TableField("business_type")
|
||||||
|
private String businessType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "方法名称")
|
||||||
|
@TableField("method")
|
||||||
|
private String method;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "请求方式")
|
||||||
|
@TableField("request_method")
|
||||||
|
private String requestMethod;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "操作类别(0其它 1后台用户 2手机端用户)")
|
||||||
|
@TableField("operator_type")
|
||||||
|
private String operatorType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "操作人员")
|
||||||
|
@TableField("oper_name")
|
||||||
|
private String operName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "部门名称")
|
||||||
|
@TableField("dept_name")
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "请求URL")
|
||||||
|
@TableField("oper_url")
|
||||||
|
private String operUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "主机地址")
|
||||||
|
@TableField("oper_ip")
|
||||||
|
private String operIp;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "请求参数")
|
||||||
|
@TableField("oper_param")
|
||||||
|
private String operParam;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "返回参数")
|
||||||
|
@TableField("json_result")
|
||||||
|
private String jsonResult;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "操作状态(0正常 1异常)")
|
||||||
|
@TableField("status")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "错误消息")
|
||||||
|
@TableField("error_msg")
|
||||||
|
private String errorMsg;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "操作时间")
|
||||||
|
@TableField("oper_time")
|
||||||
|
private Date operTime;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
package com.atguigu.model.system;
|
||||||
|
|
||||||
|
import com.atguigu.model.base.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "岗位")
|
||||||
|
@TableName("sys_post")
|
||||||
|
public class SysPost extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "岗位编码")
|
||||||
|
@TableField("post_code")
|
||||||
|
private String postCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "岗位名称")
|
||||||
|
@TableField("name")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "显示顺序")
|
||||||
|
@TableField("description")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态(1正常 0停用)")
|
||||||
|
@TableField("status")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
package com.atguigu.model.system;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.atguigu.model.base.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "角色")
|
||||||
|
@TableName("sys_role")
|
||||||
|
public class SysRole extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
//@NotBlank(message = "角色名称不能为空")
|
||||||
|
@ApiModelProperty(value = "角色名称")
|
||||||
|
@TableField("role_name")
|
||||||
|
private String roleName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "角色编码")
|
||||||
|
@TableField("role_code")
|
||||||
|
private String roleCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "描述")
|
||||||
|
@TableField("description")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.atguigu.model.system;
|
||||||
|
|
||||||
|
import com.atguigu.model.base.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "角色菜单")
|
||||||
|
@TableName("sys_role_menu")
|
||||||
|
public class SysRoleMenu extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "角色id")
|
||||||
|
@TableField("role_id")
|
||||||
|
private Long roleId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "菜单id")
|
||||||
|
@TableField("menu_id")
|
||||||
|
private Long menuId;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,69 @@
|
||||||
|
package com.atguigu.model.system;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
|
||||||
|
import com.atguigu.model.base.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "用户")
|
||||||
|
@TableName("sys_user")
|
||||||
|
public class SysUser extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户名")
|
||||||
|
@TableField("username")
|
||||||
|
private String username;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "密码")
|
||||||
|
@TableField("password")
|
||||||
|
private String password;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "姓名")
|
||||||
|
@TableField("name")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "手机")
|
||||||
|
@TableField("phone")
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "头像地址")
|
||||||
|
@TableField("head_url")
|
||||||
|
private String headUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "部门id")
|
||||||
|
@TableField("dept_id")
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "岗位id")
|
||||||
|
@TableField("post_id")
|
||||||
|
private Long postId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "描述")
|
||||||
|
@TableField("description")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "openId")
|
||||||
|
@TableField("open_id")
|
||||||
|
private String openId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态(1:正常 0:停用)")
|
||||||
|
@TableField("status")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<SysRole> roleList;
|
||||||
|
//岗位
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String postName;
|
||||||
|
//部门
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String deptName;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.atguigu.model.system;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.atguigu.model.base.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "用户角色")
|
||||||
|
@TableName("sys_user_role")
|
||||||
|
public class SysUserRole extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "角色id")
|
||||||
|
@TableField("role_id")
|
||||||
|
private Long roleId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户id")
|
||||||
|
@TableField("user_id")
|
||||||
|
private Long userId;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
package com.atguigu.model.wechat;
|
||||||
|
|
||||||
|
import com.atguigu.model.base.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "菜单")
|
||||||
|
@TableName("wechat_menu")
|
||||||
|
public class Menu extends BaseEntity {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
@TableField("parent_id")
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "类型")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "网页 链接,用户点击菜单可打开链接")
|
||||||
|
private String url;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "菜单KEY值,用于消息接口推送")
|
||||||
|
@TableField("meun_key")
|
||||||
|
private String meunKey;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "排序")
|
||||||
|
private Integer sort;
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.atguigu.vo.process;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ApprovalVo {
|
||||||
|
|
||||||
|
private Long processId;
|
||||||
|
|
||||||
|
private String taskId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审批描述")
|
||||||
|
private String description;
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
package com.atguigu.vo.process;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "流程表单")
|
||||||
|
public class ProcessFormVo {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审批模板id")
|
||||||
|
private Long processTemplateId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审批类型id")
|
||||||
|
private Long processTypeId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "表单值")
|
||||||
|
private String formValues;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
package com.atguigu.vo.process;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "Process")
|
||||||
|
public class ProcessQueryVo {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "关键字")
|
||||||
|
private String keyword;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户id")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
@TableField("process_template_id")
|
||||||
|
private Long processTemplateId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审批类型id")
|
||||||
|
private Long processTypeId;
|
||||||
|
|
||||||
|
private String createTimeBegin;
|
||||||
|
private String createTimeEnd;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态(0:默认 1:审批中 2:审批通过 -1:驳回)")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,59 @@
|
||||||
|
package com.atguigu.vo.process;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "Process")
|
||||||
|
public class ProcessVo {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审批code")
|
||||||
|
private String processCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户id")
|
||||||
|
private Long userId;
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@TableField("process_template_id")
|
||||||
|
private Long processTemplateId;
|
||||||
|
private String processTemplateName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审批类型id")
|
||||||
|
private Long processTypeId;
|
||||||
|
private String processTypeName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "描述")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "表单属性")
|
||||||
|
private String formProps;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "表单选项")
|
||||||
|
private String formOptions;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "表单属性值")
|
||||||
|
private String formValues;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "流程实例id")
|
||||||
|
private String processInstanceId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "当前审批人")
|
||||||
|
private String currentAuditor;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态(0:默认 1:审批中 2:审批通过 -1:驳回)")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
private String taskId;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
package com.atguigu.vo.system;
|
||||||
|
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@ApiModel(description = "分配菜单")
|
||||||
|
@Data
|
||||||
|
public class AssginMenuVo {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "角色id")
|
||||||
|
private Long roleId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "菜单id列表")
|
||||||
|
private List<Long> menuIdList;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
package com.atguigu.vo.system;
|
||||||
|
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@ApiModel(description = "分配菜单")
|
||||||
|
@Data
|
||||||
|
public class AssginRoleVo {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户id")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "角色id列表")
|
||||||
|
private List<Long> roleIdList;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,34 @@
|
||||||
|
package com.atguigu.vo.system;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登录对象
|
||||||
|
*/
|
||||||
|
public class LoginVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手机号
|
||||||
|
*/
|
||||||
|
private String username;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 密码
|
||||||
|
*/
|
||||||
|
private String password;
|
||||||
|
|
||||||
|
public String getUsername() {
|
||||||
|
return username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUsername(String username) {
|
||||||
|
this.username = username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPassword() {
|
||||||
|
return password;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPassword(String password) {
|
||||||
|
this.password = password;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
package com.atguigu.vo.system;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 路由显示信息
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MetaVo
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 设置该路由在侧边栏和面包屑中展示的名字
|
||||||
|
*/
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置该路由的图标,对应路径src/assets/icons/svg
|
||||||
|
*/
|
||||||
|
private String icon;
|
||||||
|
|
||||||
|
public MetaVo()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public MetaVo(String title, String icon)
|
||||||
|
{
|
||||||
|
this.title = title;
|
||||||
|
this.icon = icon;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,50 @@
|
||||||
|
package com.atguigu.vo.system;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 路由配置信息
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class RouterVo
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 路由名字
|
||||||
|
*/
|
||||||
|
//private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 路由地址
|
||||||
|
*/
|
||||||
|
private String path;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否隐藏路由,当设置 true 的时候该路由不会再侧边栏出现
|
||||||
|
*/
|
||||||
|
private boolean hidden;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组件地址
|
||||||
|
*/
|
||||||
|
private String component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当你一个路由下面的 children 声明的路由大于1个时,自动会变成嵌套的模式--如组件页面
|
||||||
|
*/
|
||||||
|
private Boolean alwaysShow;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 其他元素
|
||||||
|
*/
|
||||||
|
private MetaVo meta;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子路由
|
||||||
|
*/
|
||||||
|
private List<RouterVo> children;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.atguigu.vo.system;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class SysLoginLogQueryVo {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户账号")
|
||||||
|
private String username;
|
||||||
|
|
||||||
|
private String createTimeBegin;
|
||||||
|
private String createTimeEnd;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.atguigu.vo.system;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class SysOperLogQueryVo {
|
||||||
|
|
||||||
|
private String title;
|
||||||
|
private String operName;
|
||||||
|
|
||||||
|
private String createTimeBegin;
|
||||||
|
private String createTimeEnd;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
package com.atguigu.vo.system;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class SysPostQueryVo {
|
||||||
|
|
||||||
|
//@ApiModelProperty(value = "岗位编码")
|
||||||
|
private String postCode;
|
||||||
|
|
||||||
|
//@ApiModelProperty(value = "岗位名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
//@ApiModelProperty(value = "状态(1正常 0停用)")
|
||||||
|
private Boolean status;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
//
|
||||||
|
//
|
||||||
|
package com.atguigu.vo.system;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 角色查询实体
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author qy
|
||||||
|
* @since 2019-11-08
|
||||||
|
*/
|
||||||
|
public class SysRoleQueryVo implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private String roleName;
|
||||||
|
|
||||||
|
public String getRoleName() {
|
||||||
|
return roleName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRoleName(String roleName) {
|
||||||
|
this.roleName = roleName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
//
|
||||||
|
//
|
||||||
|
package com.atguigu.vo.system;
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 用户查询实体
|
||||||
|
* </p>
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SysUserQueryVo implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private String keyword;
|
||||||
|
|
||||||
|
private String createTimeBegin;
|
||||||
|
private String createTimeEnd;
|
||||||
|
|
||||||
|
private Long roleId;
|
||||||
|
private Long postId;
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.atguigu.vo.wechat;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class BindPhoneVo {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "手机")
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "openId")
|
||||||
|
private String openId;
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
package com.atguigu.vo.wechat;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "菜单")
|
||||||
|
public class MenuVo {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "类型")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "url")
|
||||||
|
private String url;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "菜单key")
|
||||||
|
private String meunKey;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "排序")
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "下级")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<MenuVo> children;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,82 @@
|
||||||
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
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>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
|
<version>2.3.6.RELEASE</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<groupId>com.atguigu</groupId>
|
||||||
|
<artifactId>guigu-oa-parent</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
<name>guigu-oa-parent</name>
|
||||||
|
<url>https://maven.apache.org</url>
|
||||||
|
<modules>
|
||||||
|
<module>common</module>
|
||||||
|
<module>model</module>
|
||||||
|
<module>service-oa</module>
|
||||||
|
</modules>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<java.version>1.8</java.version>
|
||||||
|
<mybatis-plus.version>3.4.1</mybatis-plus.version>
|
||||||
|
<mysql.version>8.0.30</mysql.version>
|
||||||
|
<knife4j.version>3.0.3</knife4j.version>
|
||||||
|
<jwt.version>0.9.1</jwt.version>
|
||||||
|
<fastjson.version>2.0.21</fastjson.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<!--配置dependencyManagement锁定依赖的版本-->
|
||||||
|
<dependencyManagement>
|
||||||
|
<dependencies>
|
||||||
|
<!--mybatis-plus 持久层-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||||
|
<version>${mybatis-plus.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<!--mysql-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
<version>${mysql.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<!--knife4j-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.xiaoymin</groupId>
|
||||||
|
<artifactId>knife4j-spring-boot-starter</artifactId>
|
||||||
|
<version>${knife4j.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<!--jjwt-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.jsonwebtoken</groupId>
|
||||||
|
<artifactId>jjwt</artifactId>
|
||||||
|
<version>${jwt.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<!--fastjson-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba</groupId>
|
||||||
|
<artifactId>fastjson</artifactId>
|
||||||
|
<version>${fastjson.version}</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</dependencyManagement>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.1</version>
|
||||||
|
<configuration>
|
||||||
|
<source>1.8</source>
|
||||||
|
<target>1.8</target>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
|
@ -0,0 +1,21 @@
|
||||||
|
FROM openjdk:17
|
||||||
|
MAINTAINER bunny
|
||||||
|
|
||||||
|
#系统编码
|
||||||
|
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
|
||||||
|
|
||||||
|
# 设置时区,构建镜像时执行的命令
|
||||||
|
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||||
|
RUN echo "Asia/Shanghai" > /etc/timezone
|
||||||
|
|
||||||
|
# 设定工作目录
|
||||||
|
WORKDIR /home/bunny
|
||||||
|
|
||||||
|
# 复制jar包
|
||||||
|
COPY target/*.jar /home/bunny/app.jar
|
||||||
|
|
||||||
|
#启动容器时的进程
|
||||||
|
ENTRYPOINT ["java","-jar","/home/bunny/app.jar"]
|
||||||
|
|
||||||
|
#暴露 8080 端口
|
||||||
|
EXPOSE 8080
|
|
@ -0,0 +1,54 @@
|
||||||
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
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>com.atguigu</groupId>
|
||||||
|
<artifactId>guigu-oa-parent</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>service-oa</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<name>service-oa</name>
|
||||||
|
<url>https://maven.apache.org</url>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.atguigu</groupId>
|
||||||
|
<artifactId>model</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.atguigu</groupId>
|
||||||
|
<artifactId>service-util</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- knife4j -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.xiaoymin</groupId>
|
||||||
|
<artifactId>knife4j-spring-boot-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>${project.artifactId}</finalName>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.atguigu.auth;
|
||||||
|
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.context.annotation.ComponentScan;
|
||||||
|
|
||||||
|
@SpringBootApplication
|
||||||
|
@ComponentScan("com.atguigu")
|
||||||
|
public class ServiceAuthApplication {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SpringApplication.run(ServiceAuthApplication.class, args);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,56 @@
|
||||||
|
package com.atguigu.auth.config;
|
||||||
|
|
||||||
|
import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import springfox.documentation.builders.ApiInfoBuilder;
|
||||||
|
import springfox.documentation.builders.ParameterBuilder;
|
||||||
|
import springfox.documentation.builders.PathSelectors;
|
||||||
|
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||||
|
import springfox.documentation.schema.ModelRef;
|
||||||
|
import springfox.documentation.service.ApiInfo;
|
||||||
|
import springfox.documentation.service.Contact;
|
||||||
|
import springfox.documentation.service.Parameter;
|
||||||
|
import springfox.documentation.spi.DocumentationType;
|
||||||
|
import springfox.documentation.spring.web.plugins.Docket;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
@EnableKnife4j
|
||||||
|
public class Knife4jConfig {
|
||||||
|
@Bean
|
||||||
|
public Docket adminApiConfig() {
|
||||||
|
List<Parameter> pars = new ArrayList<>();
|
||||||
|
ParameterBuilder tokenPar = new ParameterBuilder();
|
||||||
|
tokenPar.name("token")
|
||||||
|
.description("用户token")
|
||||||
|
.defaultValue("")
|
||||||
|
.modelRef(new ModelRef("string"))
|
||||||
|
.parameterType("header")
|
||||||
|
.required(false)
|
||||||
|
.build();
|
||||||
|
pars.add(tokenPar.build());
|
||||||
|
// 添加head参数end
|
||||||
|
|
||||||
|
return new Docket(DocumentationType.SWAGGER_2)
|
||||||
|
.groupName("adminApi")
|
||||||
|
.apiInfo(adminApiInfo())
|
||||||
|
.select()
|
||||||
|
// 只显示admin路径下的页面
|
||||||
|
.apis(RequestHandlerSelectors.basePackage("com.atguigu"))
|
||||||
|
.paths(PathSelectors.regex("/admin/.*"))
|
||||||
|
.build()
|
||||||
|
.globalOperationParameters(pars);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ApiInfo adminApiInfo() {
|
||||||
|
return new ApiInfoBuilder()
|
||||||
|
.title("后台管理系统-API文档")
|
||||||
|
.description("本文档描述了后台管理系统微服务接口定义")
|
||||||
|
.version("1.0")
|
||||||
|
.contact(new Contact("atguigu", "http://atguigu.com", "atguigu@qq.com"))
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
server:
|
||||||
|
port: 8800
|
||||||
|
|
||||||
|
bunny:
|
||||||
|
datasource:
|
||||||
|
host: 106.15.251.123
|
||||||
|
port: 3305
|
||||||
|
sqlData: guigu-oa
|
||||||
|
username: root
|
||||||
|
password: "02120212"
|
||||||
|
|
||||||
|
# nacos:
|
||||||
|
# server-addr: z-bunny.cn:8848
|
||||||
|
# discovery:
|
||||||
|
# namespace: ssyx
|
||||||
|
#
|
||||||
|
# minio:
|
||||||
|
# endpointUrl: "http://129.211.31.58:9000"
|
||||||
|
# bucket-name: ssyx
|
||||||
|
# accessKey: bunny
|
||||||
|
# secretKey: "02120212"
|
|
@ -0,0 +1,34 @@
|
||||||
|
server:
|
||||||
|
port: 8800
|
||||||
|
|
||||||
|
spring:
|
||||||
|
application:
|
||||||
|
name: service-oa
|
||||||
|
profiles:
|
||||||
|
active: dev
|
||||||
|
|
||||||
|
datasource:
|
||||||
|
type: com.zaxxer.hikari.HikariDataSource
|
||||||
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
url: jdbc:mysql://${bunny.datasource.host}:${bunny.datasource.port}/${bunny.datasource.sqlData}?serverTimezone=GMT%2B8&useSSL=false&characterEncoding=utf-8&allowPublicKeyRetrieval=true
|
||||||
|
username: ${bunny.datasource.username}
|
||||||
|
password: ${bunny.datasource.password}
|
||||||
|
|
||||||
|
jackson:
|
||||||
|
date-format: yyyy-MM-dd HH:mm:ss
|
||||||
|
time-zone: GMT+8
|
||||||
|
|
||||||
|
mybatis-plus:
|
||||||
|
mapper-locations: classpath:mapper/*.xml
|
||||||
|
configuration:
|
||||||
|
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 查看日志
|
||||||
|
|
||||||
|
logging:
|
||||||
|
level:
|
||||||
|
com.atguigu.auth.mapper: debug
|
||||||
|
com.atguigu.auth.controller: info
|
||||||
|
com.atguigu.auth.service: info
|
||||||
|
pattern:
|
||||||
|
dateformat: HH:mm:ss:SSS
|
||||||
|
file:
|
||||||
|
path: "logs/${spring.application.name}"
|
|
@ -0,0 +1,16 @@
|
||||||
|
-----------------▄██-█▄---------
|
||||||
|
-----------------███▄██▄--------
|
||||||
|
-----------------███████--------
|
||||||
|
-----------------▀███████-------
|
||||||
|
-------------------██████▄▄-----
|
||||||
|
-------------------█████████▄---
|
||||||
|
-------------------██████▄████--
|
||||||
|
-------▄███████████████████████-
|
||||||
|
-----▄███████████████████████▀--
|
||||||
|
---▄██████████████████████------
|
||||||
|
---███████████████████████------
|
||||||
|
---███████████████████████------
|
||||||
|
-▄▄██████████████████████▀------
|
||||||
|
-█████████████████▀█████--------
|
||||||
|
-▀██████████████▀▀-▀█████▄------
|
||||||
|
-------▀▀▀▀▀▀▀▀▀------▀▀▀▀------
|
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
|
@ -0,0 +1,21 @@
|
||||||
|
server:
|
||||||
|
port: 8800
|
||||||
|
|
||||||
|
bunny:
|
||||||
|
datasource:
|
||||||
|
host: 106.15.251.123
|
||||||
|
port: 3305
|
||||||
|
sqlData: guigu-oa
|
||||||
|
username: root
|
||||||
|
password: "02120212"
|
||||||
|
|
||||||
|
# nacos:
|
||||||
|
# server-addr: z-bunny.cn:8848
|
||||||
|
# discovery:
|
||||||
|
# namespace: ssyx
|
||||||
|
#
|
||||||
|
# minio:
|
||||||
|
# endpointUrl: "http://129.211.31.58:9000"
|
||||||
|
# bucket-name: ssyx
|
||||||
|
# accessKey: bunny
|
||||||
|
# secretKey: "02120212"
|
|
@ -0,0 +1,34 @@
|
||||||
|
server:
|
||||||
|
port: 8800
|
||||||
|
|
||||||
|
spring:
|
||||||
|
application:
|
||||||
|
name: service-oa
|
||||||
|
profiles:
|
||||||
|
active: dev
|
||||||
|
|
||||||
|
datasource:
|
||||||
|
type: com.zaxxer.hikari.HikariDataSource
|
||||||
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
url: jdbc:mysql://${bunny.datasource.host}:${bunny.datasource.port}/${bunny.datasource.sqlData}?serverTimezone=GMT%2B8&useSSL=false&characterEncoding=utf-8&allowPublicKeyRetrieval=true
|
||||||
|
username: ${bunny.datasource.username}
|
||||||
|
password: ${bunny.datasource.password}
|
||||||
|
|
||||||
|
jackson:
|
||||||
|
date-format: yyyy-MM-dd HH:mm:ss
|
||||||
|
time-zone: GMT+8
|
||||||
|
|
||||||
|
mybatis-plus:
|
||||||
|
mapper-locations: classpath:mapper/*.xml
|
||||||
|
configuration:
|
||||||
|
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 查看日志
|
||||||
|
|
||||||
|
logging:
|
||||||
|
level:
|
||||||
|
com.atguigu.auth.mapper: debug
|
||||||
|
com.atguigu.auth.controller: info
|
||||||
|
com.atguigu.auth.service: info
|
||||||
|
pattern:
|
||||||
|
dateformat: HH:mm:ss:SSS
|
||||||
|
file:
|
||||||
|
path: "logs/${spring.application.name}"
|
|
@ -0,0 +1,16 @@
|
||||||
|
-----------------▄██-█▄---------
|
||||||
|
-----------------███▄██▄--------
|
||||||
|
-----------------███████--------
|
||||||
|
-----------------▀███████-------
|
||||||
|
-------------------██████▄▄-----
|
||||||
|
-------------------█████████▄---
|
||||||
|
-------------------██████▄████--
|
||||||
|
-------▄███████████████████████-
|
||||||
|
-----▄███████████████████████▀--
|
||||||
|
---▄██████████████████████------
|
||||||
|
---███████████████████████------
|
||||||
|
---███████████████████████------
|
||||||
|
-▄▄██████████████████████▀------
|
||||||
|
-█████████████████▀█████--------
|
||||||
|
-▀██████████████▀▀-▀█████▄------
|
||||||
|
-------▀▀▀▀▀▀▀▀▀------▀▀▀▀------
|
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
Loading…
Reference in New Issue