修改结构

master
Sheyu-yao 2024-01-16 17:14:01 +08:00
parent 0bc6d501c5
commit 3dfe0ea650
27 changed files with 327 additions and 492 deletions

3
.gitignore vendored
View File

@ -4,7 +4,8 @@ target/
!**/src/test/**/target/
### IntelliJ IDEA ###
/.idea/
.idea
.idea/*.xml
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml

View File

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" native2AsciiForPropertiesFiles="true" defaultCharsetForPropertiesFiles="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$/ysy-auth/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ysy-common/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ysy-gateway/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ysy-modules/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ysy-modules/ysy-apply/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ysy-modules/ysy-system/src/main/java" charset="UTF-8" />
<file url="PROJECT" charset="UTF-8" />
</component>
</project>

View File

@ -1,14 +0,0 @@
<?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" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

View File

@ -1,124 +0,0 @@
<?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>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@ -1,253 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AutoImportSettings">
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="88964528-da9b-4dce-b2e1-90e4281b93bb" name="Changes" comment="初始化">
<change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ysy-auth/src/main/java/com/ysy/AuthServiceApplication.java" beforeDir="false" afterPath="$PROJECT_DIR$/ysy-auth/src/main/java/com/ysy/auth/AuthServiceApplication.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ysy-auth/src/main/java/com/ysy/controller/AuthController.java" beforeDir="false" afterPath="$PROJECT_DIR$/ysy-auth/src/main/java/com/ysy/auth/controller/AuthController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ysy-auth/src/main/java/com/ysy/service/AuthService.java" beforeDir="false" afterPath="$PROJECT_DIR$/ysy-auth/src/main/java/com/ysy/auth/service/AuthService.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ysy-auth/src/main/java/com/ysy/service/impl/AuthServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/ysy-auth/src/main/java/com/ysy/auth/service/impl/AuthServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ysy-common/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/ysy-common/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ysy-common/src/main/java/com/ysy/config/MybatisPlusConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/ysy-common/src/main/java/com/ysy/common/config/MybatisPlusConfig.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ysy-common/src/main/java/com/ysy/domain/po/Apply.java" beforeDir="false" afterPath="$PROJECT_DIR$/ysy-common/src/main/java/com/ysy/common/domain/po/Apply.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ysy-common/src/main/java/com/ysy/domain/po/Record.java" beforeDir="false" afterPath="$PROJECT_DIR$/ysy-common/src/main/java/com/ysy/common/domain/po/Record.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ysy-common/src/main/java/com/ysy/domain/po/Rider.java" beforeDir="false" afterPath="$PROJECT_DIR$/ysy-common/src/main/java/com/ysy/common/domain/po/Rider.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ysy-common/src/main/java/com/ysy/domain/result/R.java" beforeDir="false" afterPath="$PROJECT_DIR$/ysy-common/src/main/java/com/ysy/common/domain/result/R.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ysy-common/src/main/java/com/ysy/domain/vo/RiderVO.java" beforeDir="false" afterPath="$PROJECT_DIR$/ysy-common/src/main/java/com/ysy/common/domain/vo/RiderVO.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ysy-common/src/main/java/com/ysy/exception/GlobalExceptionHandler.java" beforeDir="false" afterPath="$PROJECT_DIR$/ysy-common/src/main/java/com/ysy/common/exception/GlobalExceptionHandler.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ysy-common/src/main/java/com/ysy/remote/SystemClientRemote.java" beforeDir="false" afterPath="$PROJECT_DIR$/ysy-common/src/main/java/com/ysy/common/remote/SystemClientRemote.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ysy-common/src/main/java/com/ysy/utils/gateway/GatewayUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/ysy-common/src/main/java/com/ysy/common/utils/gateway/GatewayUtils.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ysy-common/src/main/java/com/ysy/utils/jwt/JwtUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/ysy-common/src/main/java/com/ysy/common/utils/jwt/JwtUtil.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ysy-common/src/main/java/com/ysy/utils/tools/StringUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/ysy-common/src/main/java/com/ysy/common/utils/tools/StringUtils.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ysy-gateway/src/main/java/com/ysy/GatewayApplication.java" beforeDir="false" afterPath="$PROJECT_DIR$/ysy-gateway/src/main/java/com/ysy/gateway/GatewayApplication.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ysy-gateway/src/main/java/com/ysy/config/AuthProperties.java" beforeDir="false" afterPath="$PROJECT_DIR$/ysy-gateway/src/main/java/com/ysy/gateway/config/AuthProperties.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ysy-gateway/src/main/java/com/ysy/filter/GlobalAuthFilter.java" beforeDir="false" afterPath="$PROJECT_DIR$/ysy-gateway/src/main/java/com/ysy/gateway/filter/GlobalAuthFilter.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ysy-modules/ysy-apply/src/main/java/com/ysy/ApplyServiceApplication.java" beforeDir="false" afterPath="$PROJECT_DIR$/ysy-modules/ysy-apply/src/main/java/com/ysy/apply/ApplyServiceApplication.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ysy-modules/ysy-apply/src/main/java/com/ysy/controller/ApplyController.java" beforeDir="false" afterPath="$PROJECT_DIR$/ysy-modules/ysy-apply/src/main/java/com/ysy/apply/controller/ApplyController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ysy-modules/ysy-apply/src/main/java/com/ysy/mapper/ApplyMapper.java" beforeDir="false" afterPath="$PROJECT_DIR$/ysy-modules/ysy-apply/src/main/java/com/ysy/apply/mapper/ApplyMapper.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ysy-modules/ysy-apply/src/main/java/com/ysy/service/ApplyService.java" beforeDir="false" afterPath="$PROJECT_DIR$/ysy-modules/ysy-apply/src/main/java/com/ysy/apply/service/ApplyService.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ysy-modules/ysy-apply/src/main/java/com/ysy/service/impl/ApplyServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/ysy-modules/ysy-apply/src/main/java/com/ysy/apply/service/impl/ApplyServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ysy-modules/ysy-system/src/main/java/com/ysy/SystemServiceApplication.java" beforeDir="false" afterPath="$PROJECT_DIR$/ysy-modules/ysy-system/src/main/java/com/ysy/system/SystemServiceApplication.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ysy-modules/ysy-system/src/main/java/com/ysy/controller/SystemController.java" beforeDir="false" afterPath="$PROJECT_DIR$/ysy-modules/ysy-system/src/main/java/com/ysy/system/controller/RiderController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ysy-modules/ysy-system/src/main/java/com/ysy/mapper/RiderMapper.java" beforeDir="false" afterPath="$PROJECT_DIR$/ysy-modules/ysy-system/src/main/java/com/ysy/system/mapper/RiderMapper.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ysy-modules/ysy-system/src/main/java/com/ysy/service/RiderService.java" beforeDir="false" afterPath="$PROJECT_DIR$/ysy-modules/ysy-system/src/main/java/com/ysy/system/service/RiderService.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ysy-modules/ysy-system/src/main/java/com/ysy/service/impl/RiderServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/ysy-modules/ysy-system/src/main/java/com/ysy/system/service/impl/RiderServiceImpl.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Class" />
<option value="Interface" />
</list>
</option>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="MavenImportPreferences">
<option name="generalSettings">
<MavenGeneralSettings>
<option name="mavenHome" value="D:/Maven/apache-maven-3.9.4-bin/apache-maven-3.9.4" />
<option name="userSettingsFile" value="D:\Maven\apache-maven-3.9.4-bin\apache-maven-3.9.4\conf\settings.xml" />
</MavenGeneralSettings>
</option>
</component>
<component name="ProjectColorInfo">{
&quot;associatedIndex&quot;: 6
}</component>
<component name="ProjectId" id="2apjXkTQBGD1Lya9b7KwYJoFZ8H" />
<component name="ProjectLevelVcsManager">
<ConfirmationsSetting value="1" id="Add" />
</component>
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;RequestMappingsPanelOrder0&quot;: &quot;0&quot;,
&quot;RequestMappingsPanelOrder1&quot;: &quot;1&quot;,
&quot;RequestMappingsPanelWidth0&quot;: &quot;75&quot;,
&quot;RequestMappingsPanelWidth1&quot;: &quot;75&quot;,
&quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;SHARE_PROJECT_CONFIGURATION_FILES&quot;: &quot;true&quot;,
&quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
&quot;git-widget-placeholder&quot;: &quot;master&quot;,
&quot;jdk.selected.JAVA_MODULE&quot;: &quot;17&quot;,
&quot;last_opened_file_path&quot;: &quot;C:/Users/Hasee/Desktop/senior_grade5_week01/ysy-modules/ysy-apply/src/main/resources&quot;,
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
&quot;project.structure.last.edited&quot;: &quot;Project&quot;,
&quot;project.structure.proportion&quot;: &quot;0.15&quot;,
&quot;project.structure.side.proportion&quot;: &quot;0.2&quot;,
&quot;settings.editor.selected.configurable&quot;: &quot;reference.settings.project.maven.runner&quot;,
&quot;spring.configuration.checksum&quot;: &quot;60d9e760ae25323a26478f12f86db80c&quot;,
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
}
}</component>
<component name="ReactorSettings">
<option name="notificationShown" value="true" />
</component>
<component name="RecentsManager">
<key name="CreateClassDialog.RecentsKey">
<recent name="com.ysy.mapper" />
<recent name="com.ysy.service" />
</key>
<key name="CopyFile.RECENT_KEYS">
<recent name="C:\Users\Hasee\Desktop\senior_grade5_week01\ysy-modules\ysy-apply\src\main\resources" />
<recent name="C:\Users\Hasee\Desktop\senior_grade5_week01\ysy-gateway\src\main\java\com\ysy\config" />
<recent name="C:\Users\Hasee\Desktop\senior_grade5_week01\ysy-gateway\src\main\resources" />
<recent name="C:\Users\Hasee\Desktop\senior_grade5_week01\ysy-auth\src\main\resources" />
<recent name="C:\Users\Hasee\Desktop\senior_grade5_week01\ysy-modules\ysy-system\src\main\resources" />
</key>
</component>
<component name="RunDashboard">
<option name="configurationTypes">
<set>
<option value="SpringBootApplicationConfigurationType" />
</set>
</option>
</component>
<component name="RunManager" selected="Spring Boot.GatewayApplication">
<configuration name="SystemServiceApplication" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="com.ysy.system.SystemServiceApplication" />
<module name="ysy-system" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="com.ysy.auth.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="ApplyServiceApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" temporary="true" nameIsGenerated="true">
<module name="ysy-apply" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.ysy.apply.ApplyServiceApplication" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="com.ysy.apply.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="AuthServiceApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" temporary="true" nameIsGenerated="true">
<module name="ysy-auth" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.ysy.auth.AuthServiceApplication" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="com.ysy.auth.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="GatewayApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" temporary="true" nameIsGenerated="true">
<module name="ysy-gateway" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.ysy.gateway.GatewayApplication" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="com.ysy.gateway.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="SystemServiceApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" temporary="true" nameIsGenerated="true">
<module name="ysy-system" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.ysy.system.SystemServiceApplication" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="com.ysy.system.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<recent_temporary>
<list>
<item itemvalue="Spring Boot.SystemServiceApplication" />
<item itemvalue="Spring Boot.AuthServiceApplication" />
<item itemvalue="Spring Boot.GatewayApplication" />
<item itemvalue="Spring Boot.ApplyServiceApplication" />
<item itemvalue="Application.SystemServiceApplication" />
</list>
</recent_temporary>
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="88964528-da9b-4dce-b2e1-90e4281b93bb" name="Changes" comment="" />
<created>1705022459502</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1705022459502</updated>
<workItem from="1705022460543" duration="26554000" />
<workItem from="1705105106156" duration="6505000" />
<workItem from="1705231338774" duration="2711000" />
</task>
<task id="LOCAL-00001" summary="初始化">
<option name="closed" value="true" />
<created>1705040594040</created>
<option name="number" value="00001" />
<option name="presentableId" value="LOCAL-00001" />
<option name="project" value="LOCAL" />
<updated>1705040594041</updated>
</task>
<option name="localTasksCounter" value="2" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" />
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State />
</value>
</entry>
</map>
</option>
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="初始化" />
<option name="LAST_COMMIT_MESSAGE" value="初始化" />
</component>
<component name="XDebuggerManager">
<watches-manager>
<configuration name="SpringBootApplicationConfigurationType">
<watch expression="configurations.get(1)" />
<watch expression="configurations.get(0)" />
</configuration>
</watches-manager>
</component>
<component name="XSLT-Support.FileAssociations.UIState">
<expand />
<select />
</component>
</project>

View File

@ -1,13 +1,16 @@
package com.ysy.auth;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@AutoConfiguration
@EnableFeignClients(basePackages = "com.ysy.common.remote")
public class AuthServiceApplication {
public static void main(String[] args) {
SpringApplication.run(AuthServiceApplication.class, args);
}
}

View File

@ -1,5 +1,6 @@
package com.ysy.auth.controller;
import com.ysy.common.domain.dto.RiderDTO;
import com.ysy.common.domain.result.R;
import com.ysy.common.domain.vo.RiderVO;
import com.ysy.auth.service.AuthService;
@ -20,6 +21,6 @@ public class AuthController {
@PostMapping("/login")
public R authLogin(@RequestBody @Validated RiderVO riderVO) {
return authService.authLoginByRiderVO(riderVO);
return R.success("rider", authService.authLoginByRiderVO(riderVO));
}
}

View File

@ -1,8 +1,8 @@
package com.ysy.auth.service;
import com.ysy.common.domain.result.R;
import com.ysy.common.domain.dto.RiderDTO;
import com.ysy.common.domain.vo.RiderVO;
public interface AuthService {
R authLoginByRiderVO(RiderVO riderVO);
RiderDTO authLoginByRiderVO(RiderVO riderVO);
}

View File

@ -2,12 +2,14 @@ package com.ysy.auth.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson2.JSON;
import com.ysy.common.domain.dto.RiderDTO;
import com.ysy.common.domain.po.Rider;
import com.ysy.common.domain.result.R;
import com.ysy.common.domain.vo.RiderVO;
import com.ysy.common.remote.SystemClientRemote;
import com.ysy.auth.service.AuthService;
import com.ysy.common.utils.jwt.JwtUtil;
import com.ysy.common.utils.jwt.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
@ -26,7 +28,7 @@ public class AuthServiceImpl implements AuthService {
private StringRedisTemplate stringRedisTemplate;
@Override
public R authLoginByRiderVO(RiderVO riderVO) {
public RiderDTO authLoginByRiderVO(RiderVO riderVO) {
//服务远程调用
R result = systemClientRemote.getRiderByRiderName(riderVO.getRiderName());
@ -36,17 +38,26 @@ public class AuthServiceImpl implements AuthService {
Rider rider = JSON.parseObject(JSON.toJSONString(result.getData().get("rider")), Rider.class);
//密码错误
Assert.isTrue(rider.getPassword().equals(riderVO.getPassword()), "密码错误");
Assert.isTrue(
SecurityUtils.matchesPassword(
riderVO.getPassword(),
rider.getSalt(),
rider.getPassword()),
"密码错误");
//生成token
Map<String, Object> tokenMap = BeanUtil.beanToMap(rider, new HashMap<>(), false, false);
String token = JwtUtil.getToken("rider", tokenMap);
Map<String, Object> claim = BeanUtil.beanToMap(rider, new HashMap<>(), false, false);
String token = JwtUtil.createToken(claim);
//登录成功存入缓存
stringRedisTemplate.opsForValue().set(token,
JSON.toJSONString(rider),
30, TimeUnit.MINUTES);
return R.ok("登录成功","token", token);
//返回对象
RiderDTO riderDTO = new RiderDTO();
BeanUtil.copyProperties(rider, riderDTO, false);
riderDTO.setToken(token);
return riderDTO;
}
}

View File

@ -0,0 +1,10 @@
package com.ysy.common.contant;
public class ResultConstants {
public final static int SUCCESS_CODE = 200;
public final static int FAIL_CODE = 300;
public final static int ERROR_CODE = 500;
public final static String SUCCESS_MSG = "success";
public final static String FAIL_MSG = "fail";
public final static String ERROR_MSG = "error";
}

View File

@ -0,0 +1,21 @@
package com.ysy.common.domain.dto;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class RiderDTO {
private String riderName;
private Integer kilometer;
private Integer leftMoney;
private String token;
}

View File

@ -0,0 +1,15 @@
package com.ysy.common.domain.page;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
@Data
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
public class PageInfo {
private Integer pageNum;
private Integer pageSize;
}

View File

@ -23,6 +23,9 @@ public class Rider {
@TableField("password")
private String password;
@TableField("salt")
private String salt;
@TableField("kilometer")
private Integer kilometer;

View File

@ -0,0 +1,30 @@
package com.ysy.common.domain.result;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public class PageResult<T> implements Serializable {
private long total;
private List<T> list;
public PageResult() {
}
public PageResult(long total, List<T> list) {
this.total = total;
this.list = list;
}
public static <T> PageResult<T> toPageResult(long total, List<T> list){
return new PageResult(total , list);
}
public static <T> Result<PageResult<T>> toResult(long total, List<T> list){
return Result.success(PageResult.toPageResult(total, list));
}
}

View File

@ -1,5 +1,6 @@
package com.ysy.common.domain.result;
import com.ysy.common.contant.ResultConstants;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@ -27,23 +28,31 @@ public class R {
this.data.put(key, value);
}
public static R ok(String msg) {
return new R(200, msg);
public static R success() {
return new R(ResultConstants.SUCCESS_CODE, ResultConstants.SUCCESS_MSG);
}
public static R ok(Map<String, Object> data) {
return new R(200, "ok", data);
public static R success(String msg) {
return new R(ResultConstants.SUCCESS_CODE, msg);
}
public static R ok(String key, Object value) {
return new R(200, "ok", key, value);
public static R success(Map<String, Object> data) {
return new R(ResultConstants.SUCCESS_CODE, ResultConstants.SUCCESS_MSG, data);
}
public static R ok(String msg, String key, Object value) {
return new R(200, msg, key, value);
public static R success(String key, Object value) {
return new R(ResultConstants.SUCCESS_CODE, ResultConstants.SUCCESS_MSG, key, value);
}
public static R success(String msg, String key, Object value) {
return new R(ResultConstants.SUCCESS_CODE, msg, key, value);
}
public static R fail() {
return new R(ResultConstants.FAIL_CODE, ResultConstants.FAIL_MSG);
}
public static R fail(String msg) {
return new R(300, msg);
return new R(ResultConstants.FAIL_CODE, msg);
}
}

View File

@ -0,0 +1,84 @@
package com.ysy.common.domain.result;
import com.ysy.common.contant.ResultConstants;
import lombok.Data;
import java.io.Serializable;
@Data
public class Result<T> implements Serializable {
private static final long serialVersionUID = 1L;
public static final int SUCCESS = ResultConstants.SUCCESS_CODE;
public static final int FAIL = ResultConstants.FAIL_CODE;
public static final int ERROR = ResultConstants.ERROR_CODE;
public static final String SUCCESS_MSG = ResultConstants.SUCCESS_MSG;
public static final String FAIL_MSG = ResultConstants.FAIL_MSG;
public static final String ERROR_MSG = ResultConstants.ERROR_MSG;
//field
private int code;
private String msg;
private T data;
public static <T> Result<T> success() {
return restResult(SUCCESS, SUCCESS_MSG, null);
}
public static <T> Result<T> success(String msg) {
return restResult(SUCCESS, msg, null);
}
public static <T> Result<T> success(T data) {
return restResult(SUCCESS, SUCCESS_MSG, data);
}
public static <T> Result<T> success(String msg, T data) {
return restResult(SUCCESS, msg, data);
}
public static <T> Result<T> fail() {
return restResult(FAIL, FAIL_MSG, null);
}
public static <T> Result<T> fail(String msg) {
return restResult(FAIL, msg, null);
}
public static <T> Result<T> error() {
return restResult(ERROR, ERROR_MSG, null);
}
public static <T> Result<T> error(String msg) {
return restResult(ERROR, msg, null);
}
private static <T> Result<T> restResult(int code, String msg, T data) {
Result<T> apiResult = new Result<>();
apiResult.setCode(code);
apiResult.setMsg(msg);
apiResult.setData(data);
return apiResult;
}
/**
*
* @return :true
*/
public boolean isSuccess(){
return this.code == SUCCESS;
}
/**
*
* @return :false
*/
public boolean isError(){
return !isSuccess();
}
}

View File

@ -0,0 +1,16 @@
package com.ysy.common.domain.vo;
import com.ysy.common.domain.page.PageInfo;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
@Data
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
public class ApplyVO extends PageInfo {
private String username;
}

View File

@ -2,6 +2,7 @@ package com.ysy.common.domain.vo;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -13,8 +14,10 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
public class RiderVO {
@NotBlank(message = "用户名不能为空")
@Pattern(regexp = "\\w{5,11}", message = "用户名格式不正确")
private String riderName;
@NotBlank(message = "密码不能为空")
@Pattern(regexp = "\\d{5,11}", message = "密码格式不正确")
private String password;
}

View File

@ -10,12 +10,14 @@ import java.util.Date;
import java.util.Map;
public class JwtUtil {
private final static Date EXPIRE_TIME = new Date(System.currentTimeMillis() + 1000 * 60 * 60 * 24L);
private final static String SECRET = "qwertyuiopasdfghjkl";
private final static String CLAIM_NAME = "claim_name";
public static String getToken(String name, Map<String, Object> claim) {
public static String createToken(Map<String, Object> claim) {
String token = JWT.create()
.withClaim(name, claim)
// .withExpiresAt(new Date(System.currentTimeMillis() + 1000 * 60 * 60 * 24))
.withClaim(CLAIM_NAME, claim)
//.withExpiresAt(EXPIRE_TIME)
.sign(Algorithm.HMAC256(SECRET));
return token;
}
@ -27,9 +29,9 @@ public class JwtUtil {
return decodedJWT;
}
public static Claim getClaim(String token, String name) {
public static Claim getClaim(String token) {
DecodedJWT decodedJWT = decodedJWT(token);
Map<String, Claim> claims = decodedJWT.getClaims();
return claims.get(name);
return claims.get(CLAIM_NAME);
}
}

View File

@ -0,0 +1,55 @@
package com.ysy.common.utils.jwt;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Base64;
/**
*
*
* @author ruoyi
*/
public class SecurityUtils {
/**
* BCryptPasswordEncoder
*
* @param password
*
* @return
*/
public static String encryptPassword (String password, String salt) {
return encryptMD5(password, salt);
}
/**
*
*
* @param password
* @param encodedPassword
*
* @return
*/
public static boolean matchesPassword (String password, String salt, String encodedPassword) {
return encryptMD5(password, salt).equals(encodedPassword);
}
/**
* MD5Base64
* @param password
* @return Base64
*/
public static String encryptMD5(String password, String salt) {
try {
MessageDigest md = MessageDigest.getInstance("MD5");
md.update((password + salt).getBytes()); // 加盐处理
byte[] digest = md.digest();
String encodeToString = Base64.getEncoder().encodeToString(digest);
return encodeToString;
} catch (NoSuchAlgorithmException e) {
throw new RuntimeException(e);
}
}
}

View File

@ -27,33 +27,5 @@ spring:
- data-id: common-redis.yaml
group: SPRING_CLOUD_COMMONS
refresh: true
- data-id: common-mysql.yaml
group: SPRING_CLOUD_COMMONS
refresh: true
loadbalancer:
nacos:
#开启nacos权重生效
enabled: true
#网关配置
gateway:
#路由配置
routes:
#路由标识,全局唯一
- id: auth-service
#路由目标地址lb代表负载均衡+服务名称
uri: lb://authService
#路由路径匹配规则
predicates:
- Path=/auth/**
- id: system-service
uri: lb://systemService
predicates:
- Path=/system/**
- id: apply-service
uri: lb://applyService
predicates:
- Path=/apply/**

View File

@ -1,10 +1,10 @@
package com.ysy.apply;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
//@Import({GlobalExceptionHandler.class, MybatisPlusConfig.class})
public class ApplyServiceApplication {
public static void main(String[] args) {
SpringApplication.run(ApplyServiceApplication.class, args);

View File

@ -1,12 +1,12 @@
package com.ysy.apply.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ysy.apply.service.ApplyService;
import com.ysy.common.domain.po.Apply;
import com.ysy.common.domain.result.R;
import com.ysy.common.domain.vo.ApplyVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/apply")
@ -14,8 +14,9 @@ public class ApplyController {
@Autowired
private ApplyService applyService;
@GetMapping("/list/{pageNum}")
public R applyList(@PathVariable Integer pageNum) {
return applyService.getApplyList(pageNum);
@GetMapping("/list")
public R applyList(ApplyVO applyVO) {
IPage<Apply> applyIPage = applyService.getApplyList(applyVO);
return R.success("applyList", applyIPage);
}
}

View File

@ -1,9 +1,11 @@
package com.ysy.apply.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ysy.common.domain.po.Apply;
import com.ysy.common.domain.result.R;
import com.ysy.common.domain.vo.ApplyVO;
public interface ApplyService extends IService<Apply> {
R getApplyList(Integer pageNum);
IPage<Apply> getApplyList(ApplyVO applyVO);
}

View File

@ -1,14 +1,19 @@
package com.ysy.apply.service.impl;
import com.alibaba.fastjson2.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ysy.common.domain.po.Apply;
import com.ysy.common.domain.po.Rider;
import com.ysy.common.domain.result.R;
import com.ysy.apply.mapper.ApplyMapper;
import com.ysy.apply.service.ApplyService;
import com.ysy.common.domain.vo.ApplyVO;
import jakarta.servlet.http.HttpServletRequest;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
@ -17,8 +22,6 @@ import java.util.List;
@Service
public class ApplyServiceImpl extends ServiceImpl<ApplyMapper, Apply> implements ApplyService {
@Autowired
private ApplyMapper applyMapper;
@Autowired
private HttpServletRequest request;
@ -27,28 +30,31 @@ public class ApplyServiceImpl extends ServiceImpl<ApplyMapper, Apply> implements
private StringRedisTemplate stringRedisTemplate;
@Override
public R getApplyList(Integer pageNum) {
public IPage<Apply> getApplyList(ApplyVO applyVO) {
String token = request.getHeader("token");
String jsonString = stringRedisTemplate.opsForValue().get(token);
Rider rider = JSON.parseObject(jsonString, Rider.class);
// IPage<Apply> iPage = new Page<>(pageNum, 3);
IPage<Apply> page = new Page<>();
page.setCurrent(applyVO.getPageNum());
page.setSize(applyVO.getPageSize());
QueryWrapper<Apply> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("rider_id", 0)
.or(a ->
a.eq("rider_id", rider.getRiderId())
.eq("state", 0))
.orderByDesc("order_time");
LambdaQueryWrapper<Apply> lambdaQueryWrapper = new LambdaQueryWrapper<>();
// LambdaQueryWrapper<Apply> lambdaQueryWrapper = new LambdaQueryWrapper<>();
if (StringUtils.isNoneBlank(applyVO.getUsername())) {
lambdaQueryWrapper.like(Apply::getUsername, applyVO.getUsername());
}
// lambdaQueryWrapper.eq(rider.getRiderId() != null, Apply::getRiderId, rider.getRiderId());
lambdaQueryWrapper
.and(a -> {
a.eq(Apply::getRiderId, 0)
.or(a1 ->
a1.eq(Apply::getRiderId, rider.getRiderId())
.eq(Apply::getState, 0));
})
.orderByDesc(Apply::getOrderTime);
List<Apply> applyList = applyMapper.selectList(queryWrapper);
// IPage<Apply> iPage1 = iPage.setRecords(applyList);
return R.ok("applyList", applyList);
return page(page, lambdaQueryWrapper);
}
}

View File

@ -1,6 +1,7 @@
package com.ysy.system.service.impl;
import com.alibaba.fastjson2.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ysy.common.domain.po.Rider;
@ -23,10 +24,10 @@ public class RiderServiceImpl extends ServiceImpl<RiderMapper, Rider> implements
@Override
public R getRiderByRiderName(String riderName) {
QueryWrapper<Rider> queryWrapper = new QueryWrapper<>();
queryWrapper.eq(StringUtils.isNotBlank(riderName), "rider_name", riderName);
Rider one = getOne(queryWrapper);
return R.ok("rider", one);
LambdaQueryWrapper<Rider> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(StringUtils.isNotBlank(riderName), Rider::getRiderName, riderName);
Rider one = getOne(lambdaQueryWrapper);
return R.success("rider", one);
}
@Override
@ -36,6 +37,6 @@ public class RiderServiceImpl extends ServiceImpl<RiderMapper, Rider> implements
String jsonString = stringRedisTemplate.opsForValue().get(token);
Rider rider = JSON.parseObject(jsonString, Rider.class);
return R.ok("rider", rider);
return R.success("rider", rider);
}
}