Lin Qilong 3 週間 前
コミット
3f8179082e

+ 0 - 10
.idea/.gitignore

@@ -1,10 +0,0 @@
-# 默认忽略的文件
-/shelf/
-/workspace.xml
-# 基于编辑器的 HTTP 客户端请求
-/httpRequests/
-# 依赖于环境的 Maven 主目录路径
-/mavenHomeManager.xml
-# Datasource local storage ignored files
-/dataSources/
-/dataSources.local.xml

+ 0 - 7
.idea/encodings.xml

@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="Encoding">
-    <file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
-    <file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
-  </component>
-</project>

+ 1 - 3
.idea/misc.xml

@@ -8,7 +8,5 @@
       </list>
     </option>
   </component>
-  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="openjdk-1.8.0.191" project-jdk-type="JavaSDK">
-    <output url="file://$PROJECT_DIR$/out" />
-  </component>
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK" />
 </project>

+ 0 - 124
.idea/uiDesigner.xml

@@ -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>

+ 1 - 1
.idea/vcs.xml

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

+ 337 - 0
.idea/workspace.xml

@@ -0,0 +1,337 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="AnalysisUIOptions">
+    <option name="SPLITTER_PROPORTION" value="0.9004098" />
+  </component>
+  <component name="AutoImportSettings">
+    <option name="autoReloadType" value="SELECTIVE" />
+  </component>
+  <component name="ChangeListManager">
+    <list default="true" id="bdbed5d1-a156-40f3-aecd-82caf556ca52" name="更改" comment="更改">
+      <change beforePath="$PROJECT_DIR$/.idea/.gitignore" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/.idea/encodings.xml" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/.idea/uiDesigner.xml" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/.idea/vcs.xml" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/cn/com/goldenwater/domain/PtService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/cn/com/goldenwater/domain/PtService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/cn/com/goldenwater/filter/ApiAuthFilter.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/cn/com/goldenwater/filter/ApiAuthFilter.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/cn/com/goldenwater/filter/AuthFilter.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/cn/com/goldenwater/filter/AuthFilter.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/cn/com/goldenwater/filter/ResponseLogGlobalFilter.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/cn/com/goldenwater/filter/ResponseLogGlobalFilter.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/cn/com/goldenwater/mapper/PermissionMapper.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/cn/com/goldenwater/mapper/PermissionMapper.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/cn/com/goldenwater/service/AuthService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/cn/com/goldenwater/service/AuthService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/cn/com/goldenwater/service/impl/AuthServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/cn/com/goldenwater/service/impl/AuthServiceImpl.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/cn/com/goldenwater/service/impl/PermissionServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/cn/com/goldenwater/service/impl/PermissionServiceImpl.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/cn/com/goldenwater/utils/TokenUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/cn/com/goldenwater/utils/TokenUtils.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/application-dev.yml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/application-dev.yml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mapper/PermissionMapper.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mapper/PermissionMapper.xml" 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="Interface" />
+        <option value="Class" />
+      </list>
+    </option>
+  </component>
+  <component name="Git.Settings">
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
+  </component>
+  <component name="KubernetesApiPersistence">{}</component>
+  <component name="KubernetesApiProvider">{
+  &quot;isMigrated&quot;: true
+}</component>
+  <component name="ProjectColorInfo">{
+  &quot;associatedIndex&quot;: 3
+}</component>
+  <component name="ProjectId" id="30wEzbqK57NNv4x13f0c1kMImPD" />
+  <component name="ProjectLevelVcsManager">
+    <ConfirmationsSetting value="2" id="Add" />
+  </component>
+  <component name="ProjectViewState">
+    <option name="hideEmptyMiddlePackages" value="true" />
+    <option name="showLibraryContents" value="true" />
+  </component>
+  <component name="PropertiesComponent"><![CDATA[{
+  "keyToString": {
+    "Maven. [org.apache.maven.plugins:maven-archetype-plugin:RELEASE:generate].executor": "Run",
+    "Maven.sh-model-gateway [clean].executor": "Run",
+    "Maven.sh-model-gateway [install].executor": "Run",
+    "Maven.sh-model-gateway [package].executor": "Run",
+    "ModuleVcsDetector.initialDetectionPerformed": "true",
+    "RequestMappingsPanelOrder0": "0",
+    "RequestMappingsPanelOrder1": "1",
+    "RequestMappingsPanelWidth0": "75",
+    "RequestMappingsPanelWidth1": "75",
+    "RunOnceActivity.ShowReadmeOnStart": "true",
+    "RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager": "true",
+    "RunOnceActivity.git.unshallow": "true",
+    "SHARE_PROJECT_CONFIGURATION_FILES": "true",
+    "Spring Boot.Application.executor": "Debug",
+    "git-widget-placeholder": "master",
+    "kotlin-language-version-configured": "true",
+    "last_opened_file_path": "D:/Workspaces/tba-gxpt-gateway/src",
+    "node.js.detected.package.eslint": "true",
+    "node.js.detected.package.tslint": "true",
+    "node.js.selected.package.eslint": "(autodetect)",
+    "node.js.selected.package.tslint": "(autodetect)",
+    "nodejs_package_manager_path": "npm",
+    "project.structure.last.edited": "Modules",
+    "project.structure.proportion": "0.15",
+    "project.structure.side.proportion": "0.2",
+    "settings.editor.selected.configurable": "MavenSettings",
+    "vue.rearranger.settings.migration": "true"
+  }
+}]]></component>
+  <component name="ReactorSettings">
+    <option name="notificationShown" value="true" />
+  </component>
+  <component name="RecentsManager">
+    <key name="CopyFile.RECENT_KEYS">
+      <recent name="D:\Workspaces\sh-model-gateway\src\main\java\cn\com\goldenwater\core\domain" />
+      <recent name="D:\Workspaces\sh-model-gateway\src\main\java\cn\com\goldenwater\core" />
+      <recent name="D:\Workspaces\sh-model-gateway\src\main\resources" />
+      <recent name="D:\Workspaces\sh-model-gateway\src\main\java\cn\com\goldenwater\controller" />
+      <recent name="D:\Workspaces\sh-model-gateway\src\main\java\cn\com\goldenwater\service\impl" />
+    </key>
+    <key name="CopyClassDialog.RECENTS_KEY">
+      <recent name="cn.com.goldenwater.utils" />
+      <recent name="cn.com.goldenwater.enums" />
+      <recent name="cn.com.goldenwater.exception" />
+      <recent name="cn.com.goldenwater.filter" />
+      <recent name="cn.com.goldenwater.domain" />
+    </key>
+  </component>
+  <component name="RunManager">
+    <configuration name="Application" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" temporary="true" nameIsGenerated="true">
+      <module name="sh-model-gateway" />
+      <option name="SPRING_BOOT_MAIN_CLASS" value="cn.com.goldenwater.Application" />
+      <extension name="coverage">
+        <pattern>
+          <option name="PATTERN" value="cn.com.goldenwater.*" />
+          <option name="ENABLED" value="true" />
+        </pattern>
+      </extension>
+      <method v="2">
+        <option name="Make" enabled="true" />
+      </method>
+    </configuration>
+    <recent_temporary>
+      <list>
+        <item itemvalue="Spring Boot.Application" />
+      </list>
+    </recent_temporary>
+  </component>
+  <component name="SharedIndexes">
+    <attachedChunks>
+      <set>
+        <option value="bundled-jdk-9f38398b9061-39b83d9b5494-intellij.indexing.shared.core-IU-241.18034.62" />
+        <option value="bundled-js-predefined-1d06a55b98c1-0b3e54e931b4-JavaScript-IU-241.18034.62" />
+      </set>
+    </attachedChunks>
+  </component>
+  <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="应用程序级" UseSingleDictionary="true" transferred="true" />
+  <component name="TaskManager">
+    <task active="true" id="Default" summary="默认任务">
+      <changelist id="bdbed5d1-a156-40f3-aecd-82caf556ca52" name="更改" comment="" />
+      <created>1754530500690</created>
+      <option name="number" value="Default" />
+      <option name="presentableId" value="Default" />
+      <updated>1754530500690</updated>
+      <workItem from="1754530501608" duration="15558000" />
+      <workItem from="1754615216986" duration="15530000" />
+      <workItem from="1754976835705" duration="12465000" />
+      <workItem from="1755047186213" duration="2320000" />
+      <workItem from="1755080364350" duration="1408000" />
+      <workItem from="1755164620975" duration="148000" />
+      <workItem from="1755504196752" duration="11826000" />
+      <workItem from="1755569708301" duration="882000" />
+      <workItem from="1755570982053" duration="216000" />
+      <workItem from="1755593649204" duration="2092000" />
+      <workItem from="1755652749121" duration="629000" />
+      <workItem from="1756188699669" duration="5392000" />
+      <workItem from="1756863250981" duration="10441000" />
+      <workItem from="1756949043982" duration="3196000" />
+      <workItem from="1756986741902" duration="1590000" />
+      <workItem from="1756989970558" duration="611000" />
+      <workItem from="1757316632985" duration="5726000" />
+      <workItem from="1757398507990" duration="14164000" />
+      <workItem from="1757416690412" duration="9000" />
+      <workItem from="1757467771700" duration="21260000" />
+      <workItem from="1757553733107" duration="4459000" />
+      <workItem from="1757917072134" duration="3382000" />
+      <workItem from="1758007839529" duration="5531000" />
+      <workItem from="1758077881855" duration="18021000" />
+      <workItem from="1758103406536" duration="617000" />
+      <workItem from="1758180322036" duration="1916000" />
+      <workItem from="1759212166724" duration="206000" />
+      <workItem from="1760151950417" duration="2232000" />
+      <workItem from="1760169229571" duration="14000" />
+      <workItem from="1760339218907" duration="443000" />
+      <workItem from="1760510226604" duration="1312000" />
+      <workItem from="1760578193300" duration="7757000" />
+      <workItem from="1760597553571" duration="802000" />
+      <workItem from="1761531403616" duration="1203000" />
+      <workItem from="1761638698577" duration="342000" />
+      <workItem from="1761639047067" duration="183000" />
+      <workItem from="1761639235507" duration="2039000" />
+      <workItem from="1761701265111" duration="15074000" />
+      <workItem from="1761742885290" duration="2696000" />
+      <workItem from="1761791975226" duration="6738000" />
+      <workItem from="1761876184822" duration="2585000" />
+      <workItem from="1761884944240" duration="1365000" />
+      <workItem from="1761963205868" duration="76000" />
+      <workItem from="1761974366859" duration="7405000" />
+      <workItem from="1761998258387" duration="4266000" />
+      <workItem from="1762049288073" duration="7341000" />
+      <workItem from="1762077934548" duration="7000" />
+      <workItem from="1762140860471" duration="6000" />
+      <workItem from="1762148761093" duration="2864000" />
+      <workItem from="1762407324740" duration="352000" />
+      <workItem from="1762408940648" duration="2306000" />
+      <workItem from="1762758018400" duration="2147000" />
+      <workItem from="1762918136241" duration="599000" />
+      <workItem from="1763022824087" duration="623000" />
+      <workItem from="1763090697888" duration="1271000" />
+      <workItem from="1763172694665" duration="2616000" />
+      <workItem from="1763189413702" duration="2862000" />
+      <workItem from="1763196084805" duration="853000" />
+      <workItem from="1764557389891" duration="2278000" />
+      <workItem from="1764637683554" duration="8000" />
+      <workItem from="1764736985721" duration="456000" />
+      <workItem from="1764737603049" duration="3120000" />
+      <workItem from="1764817167366" duration="732000" />
+      <workItem from="1764919478024" duration="7000" />
+      <workItem from="1766050234568" duration="628000" />
+      <workItem from="1766107126546" duration="2001000" />
+      <workItem from="1767607591753" duration="654000" />
+      <workItem from="1767662632796" duration="10249000" />
+      <workItem from="1767751120694" duration="354000" />
+      <workItem from="1767751483688" duration="31000" />
+      <workItem from="1767751525959" duration="393000" />
+    </task>
+    <task id="LOCAL-00001" summary="更新">
+      <option name="closed" value="true" />
+      <created>1755570571986</created>
+      <option name="number" value="00001" />
+      <option name="presentableId" value="LOCAL-00001" />
+      <option name="project" value="LOCAL" />
+      <updated>1755570571986</updated>
+    </task>
+    <task id="LOCAL-00002" summary="更新">
+      <option name="closed" value="true" />
+      <created>1755653351515</created>
+      <option name="number" value="00002" />
+      <option name="presentableId" value="LOCAL-00002" />
+      <option name="project" value="LOCAL" />
+      <updated>1755653351515</updated>
+    </task>
+    <task id="LOCAL-00003" summary="更新">
+      <option name="closed" value="true" />
+      <created>1756986753513</created>
+      <option name="number" value="00003" />
+      <option name="presentableId" value="LOCAL-00003" />
+      <option name="project" value="LOCAL" />
+      <updated>1756986753513</updated>
+    </task>
+    <task id="LOCAL-00004" summary="更新">
+      <option name="closed" value="true" />
+      <created>1756988475412</created>
+      <option name="number" value="00004" />
+      <option name="presentableId" value="LOCAL-00004" />
+      <option name="project" value="LOCAL" />
+      <updated>1756988475412</updated>
+    </task>
+    <task id="LOCAL-00005" summary="添加权限验证">
+      <option name="closed" value="true" />
+      <created>1757558231641</created>
+      <option name="number" value="00005" />
+      <option name="presentableId" value="LOCAL-00005" />
+      <option name="project" value="LOCAL" />
+      <updated>1757558231641</updated>
+    </task>
+    <task id="LOCAL-00006" summary="添加权限验证">
+      <option name="closed" value="true" />
+      <created>1757927853303</created>
+      <option name="number" value="00006" />
+      <option name="presentableId" value="LOCAL-00006" />
+      <option name="project" value="LOCAL" />
+      <updated>1757927853303</updated>
+    </task>
+    <task id="LOCAL-00007" summary="添加告警信息记录">
+      <option name="closed" value="true" />
+      <created>1758103172970</created>
+      <option name="number" value="00007" />
+      <option name="presentableId" value="LOCAL-00007" />
+      <option name="project" value="LOCAL" />
+      <updated>1758103172970</updated>
+    </task>
+    <task id="LOCAL-00008" summary="添加路由token验证">
+      <option name="closed" value="true" />
+      <created>1760597945204</created>
+      <option name="number" value="00008" />
+      <option name="presentableId" value="LOCAL-00008" />
+      <option name="project" value="LOCAL" />
+      <updated>1760597945204</updated>
+    </task>
+    <task id="LOCAL-00009" summary="一些调整和数据源改成DM">
+      <option name="closed" value="true" />
+      <created>1761742752439</created>
+      <option name="number" value="00009" />
+      <option name="presentableId" value="LOCAL-00009" />
+      <option name="project" value="LOCAL" />
+      <updated>1761742752439</updated>
+    </task>
+    <task id="LOCAL-00010" summary="修改配置">
+      <option name="closed" value="true" />
+      <created>1761743052064</created>
+      <option name="number" value="00010" />
+      <option name="presentableId" value="LOCAL-00010" />
+      <option name="project" value="LOCAL" />
+      <updated>1761743052064</updated>
+    </task>
+    <task id="LOCAL-00011" summary="修改token请求方法,解决数据中台访问报错问题">
+      <option name="closed" value="true" />
+      <created>1761800505662</created>
+      <option name="number" value="00011" />
+      <option name="presentableId" value="LOCAL-00011" />
+      <option name="project" value="LOCAL" />
+      <updated>1761800505662</updated>
+    </task>
+    <task id="LOCAL-00012" summary="修改token请求方法,解决数据中台访问报错问题">
+      <option name="closed" value="true" />
+      <created>1762077910796</created>
+      <option name="number" value="00012" />
+      <option name="presentableId" value="LOCAL-00012" />
+      <option name="project" value="LOCAL" />
+      <updated>1762077910796</updated>
+    </task>
+    <option name="localTasksCounter" value="13" />
+    <servers />
+  </component>
+  <component name="TypeScriptGeneratedFilesManager">
+    <option name="version" value="3" />
+  </component>
+  <component name="VcsManagerConfiguration">
+    <MESSAGE value="更新" />
+    <MESSAGE value="添加权限验证" />
+    <MESSAGE value="添加告警信息记录" />
+    <MESSAGE value="添加路由token验证" />
+    <MESSAGE value="一些调整和数据源改成DM" />
+    <MESSAGE value="修改配置" />
+    <MESSAGE value="修改token请求方法,解决数据中台访问报错问题" />
+    <option name="LAST_COMMIT_MESSAGE" value="修改token请求方法,解决数据中台访问报错问题" />
+  </component>
+  <component name="XDebuggerManager">
+    <watches-manager>
+      <configuration name="SpringBootApplicationConfigurationType">
+        <watch expression="              // 记录写操作审计日志&#10;                    if (isWriteOperation(method)) {&#10;                        auditService.logWriteOperation(thirdPartyId, path, method, request);&#10;                    }" />
+      </configuration>
+    </watches-manager>
+  </component>
+</project>

+ 3 - 3
pom.xml

@@ -2,15 +2,15 @@
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.example</groupId>
-    <artifactId>sh-model-gateway</artifactId>
+    <artifactId>tba-gxpt-gateway</artifactId>
     <packaging>jar</packaging>
     <version>1.0-SNAPSHOT</version>
-    <name>sh-model-gateway</name>
+    <name>tba-gxpt-gateway</name>
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
-        <java.version>1.8</java.version>
+        <java.version>11</java.version>
         <mybatis-plus.version>3.5.1</mybatis-plus.version>
         <mybatis-spring-boot.version>2.2.0</mybatis-spring-boot.version>
         <spring-boot.version>2.7.18</spring-boot.version>

+ 0 - 11
src/main/java/cn/com/goldenwater/domain/PtService.java

@@ -27,9 +27,6 @@ public class PtService implements Serializable {
 
     @TableId(value = "SRV_ID", type = IdType.ASSIGN_UUID)
     private String srvId;
-
-    /** 模型id */
-    private String mdid;
     /** 目录ID */
     private String cateCode;
     /** 服务名称 */
@@ -77,12 +74,8 @@ public class PtService implements Serializable {
     private String rptype;
     /** 返回信息 */
     private String rpcontent;
-    /** 代理地址 */
-    private String proxyAddress;
     /** 代理路径 */
     private String proxyPath;
-    /** 示例 */
-    private String example;
 
     /** 申请量 */
     private Integer cnt;
@@ -105,8 +98,4 @@ public class PtService implements Serializable {
     /** 接口发布时间 */
     @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
     private Date releaseTime;
-
-    /** 排序 */
-    private Integer sort;
-
 }

+ 8 - 9
src/main/java/cn/com/goldenwater/filter/ApiAuthFilter.java

@@ -36,19 +36,18 @@ public class ApiAuthFilter implements GlobalFilter, Ordered {
     public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
         ServerHttpRequest request = exchange.getRequest();
         String path = request.getPath().value();
+        String gatewayUrl = "/" + path.split("/")[1];
+        String url = path.replaceFirst(gatewayUrl, "");
         String method = request.getMethodValue();
+        String appId = request.getQueryParams().getFirst("appId");
 
-        // 获取 第三方服务ID
-        String token = exchange.getAttribute("AUTH_TOKEN");
-        String thirdPartyId = Optional.ofNullable(token).map(t -> ptAppService.getAppIdByAppToken(token)).orElse(null);
-        if (thirdPartyId == null) {
-//            return forbidden(exchange, "Invalid third-party identity");
-        } else {
-            exchange.getAttributes().put("THIRD_PARTY_ID", thirdPartyId);
+        Boolean isPublicPath = exchange.getAttribute("IS_PUBLIC_PATH");
+        if (Boolean.TRUE.equals(isPublicPath)) {
+            return chain.filter(exchange);
         }
 
         // 检查权限
-        return permissionService.checkPermission(thirdPartyId, path, method)
+        return permissionService.checkPermission(appId, url, method)
                 .flatMap(hasPermission -> {
                     if (!hasPermission) {
                         return forbidden(exchange, "Insufficient permissions");
@@ -56,7 +55,7 @@ public class ApiAuthFilter implements GlobalFilter, Ordered {
 
                     // 记录写操作审计日志
                     if (isWriteOperation(method)) {
-                        auditService.logWriteOperation(thirdPartyId, path, method, request);
+                        auditService.logWriteOperation(appId, url, method, request);
                     }
 
                     return chain.filter(exchange);

+ 6 - 3
src/main/java/cn/com/goldenwater/filter/AuthFilter.java

@@ -1,6 +1,5 @@
 package cn.com.goldenwater.filter;
 
-import cn.com.goldenwater.domain.PtService;
 import cn.com.goldenwater.service.AuthService;
 import cn.com.goldenwater.utils.JsonUtils;
 import cn.com.goldenwater.utils.TokenUtils;
@@ -31,26 +30,30 @@ public class AuthFilter implements GlobalFilter, Ordered {
     public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
         ServerHttpRequest request = exchange.getRequest();
         String path = request.getPath().value();
+        String appId = request.getQueryParams().getFirst("appId");
 
         // 跳过不需要认证的路径
         if (authService.isPublicPath(path)) {
+            exchange.getAttributes().put("IS_PUBLIC_PATH", true);
             return chain.filter(exchange);
         }
 
         // 获取访问令牌
         String token = TokenUtils.getTokenFromRequest(request);
         if (token == null) {
-//            return unauthorized(exchange, "Missing access token");
+            return unauthorized(exchange, "Missing access token");
         } else {
             exchange.getAttributes().put("AUTH_TOKEN", token);
         }
 
         // 验证令牌
-        return authService.validateToken(token)
+        return authService.validateToken(token, appId)
                 .flatMap(valid -> {
                     if (!(Boolean) valid) {
                         return unauthorized(exchange, "Invalid access token");
                     }
+                    // 获取 第三方服务ID
+                    exchange.getAttributes().put("THIRD_PARTY_ID", appId);
                     return chain.filter(exchange);
                 })
                 .onErrorResume(e -> {

+ 1 - 1
src/main/java/cn/com/goldenwater/filter/ResponseLogGlobalFilter.java

@@ -195,7 +195,7 @@ public class ResponseLogGlobalFilter implements GlobalFilter, Ordered {
             if (ptService != null) {
                 serviceLog.setServiceName(ptService.getName());
                 serviceLog.setSerId(ptService.getSrvId());
-                serviceLog.setMdId(ptService.getMdid());
+                serviceLog.setMdId(ptService.getProxyPath());
             } else {
                 serviceLog.setServiceName("未找到服务信息");
             }

+ 3 - 4
src/main/java/cn/com/goldenwater/mapper/PermissionMapper.java

@@ -1,12 +1,11 @@
 package cn.com.goldenwater.mapper;
 
 import org.apache.ibatis.annotations.Param;
-import reactor.core.publisher.Mono;
 
 public interface PermissionMapper {
 
-    Mono<Boolean> findPermission(@Param("thirdPartyId") String thirdPartyId,
-                                 @Param("path") String path,
-                                 @Param("method") String method);
+    Integer findPermission(@Param("thirdPartyId") String thirdPartyId,
+                           @Param("path") String path,
+                           @Param("method") String method);
 
 }

+ 1 - 1
src/main/java/cn/com/goldenwater/service/AuthService.java

@@ -6,6 +6,6 @@ public interface AuthService {
 
     boolean isPublicPath(String path);
 
-    Mono<Object> validateToken(String token);
+    Mono<Object> validateToken(String token, String appId);
 
 }

+ 39 - 28
src/main/java/cn/com/goldenwater/service/impl/AuthServiceImpl.java

@@ -1,15 +1,17 @@
 package cn.com.goldenwater.service.impl;
 
+import cn.com.goldenwater.core.redis.RedisCache;
 import cn.com.goldenwater.domain.PtApp;
+import cn.com.goldenwater.domain.PtService;
 import cn.com.goldenwater.service.AuthService;
-import cn.com.goldenwater.service.PtAppService;
 import cn.com.goldenwater.service.PtServiceService;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import io.jsonwebtoken.JwtException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import reactor.core.publisher.Mono;
 
+import java.util.Optional;
+
 @Service
 public class AuthServiceImpl implements AuthService {
 
@@ -17,42 +19,51 @@ public class AuthServiceImpl implements AuthService {
     private PtServiceService ptServiceService;
 
     @Autowired
-    private PtAppService ptAppService;
+    private RedisCache redisCache;
 
 
     @Override
     public boolean isPublicPath(String path) {
-        // TODO 开放条件判断
-//        String gatewayUrl = "/" + path.split("/")[1];
-//        path = path.replaceFirst(gatewayUrl, "");
-//        PtService ptService = ptServiceService.getServiceByUrl(path);
-//        return Optional.ofNullable(ptService).map(PtService::getOpenCndtn).map("1"::equals).orElse(false);
-        return false;
+        String gatewayUrl = "/" + path.split("/")[1];
+        path = path.replaceFirst(gatewayUrl, "");
+        PtService ptService = ptServiceService.getServiceByUrl(path);
+        return Optional.ofNullable(ptService).map(PtService::getOpenCndtn).map("2"::equals).orElse(false);
     }
 
     @Override
-    public Mono<Object> validateToken(String token) {
+    public Mono<Object> validateToken(String token, String appId) {
         try {
-            // 使用 JwtTokenProvider 解析token
-//            Claims claims = jwtTokenProvider.parseToken(token);
-
-            // 检查token是否过期
-//            if (claims.getExpiration().before(new Date())) {
-//                return Mono.just(false);
-//            }
-
-//            QueryWrapper<PtApp> queryWrapper = new QueryWrapper<>();
-//            queryWrapper.eq("app_secret", token);
-//            PtApp ptApp = ptAppService.getOne(queryWrapper);
-//            if (ptApp == null) {
-//                return Mono.just(false);
-//            }
-
-            // token有效
-            return Mono.just(true);
+            Object cachedObj = redisCache.getCacheObject(token);
+            if (cachedObj == null) {
+                return Mono.just(false);
+            }
+            
+            // 尝试将缓存对象转换为PtApp
+            PtApp ptApp = convertToPtApp(cachedObj);
+            if (ptApp == null) {
+                return Mono.just(false);
+            }
+            
+            if (ptApp.getAppId().equals(appId)) {
+                return Mono.just(true);
+            }
+
+            return Mono.just(false);
         } catch (JwtException | IllegalArgumentException e) {
-            // token无效或解析出错
             return Mono.just(false);
         }
     }
+    
+    private PtApp convertToPtApp(Object obj) {
+        if (obj instanceof PtApp) {
+            return (PtApp) obj;
+        } else if (obj instanceof com.alibaba.fastjson2.JSONObject) {
+            // 将JSONObject转换为PtApp对象
+            String jsonStr = obj.toString();
+            return com.alibaba.fastjson2.JSON.parseObject(jsonStr, PtApp.class);
+        } else {
+            // 其他情况尝试直接转换
+            return com.alibaba.fastjson2.JSON.parseObject(obj.toString(), PtApp.class);
+        }
+    }
 }

+ 9 - 14
src/main/java/cn/com/goldenwater/service/impl/PermissionServiceImpl.java

@@ -4,10 +4,11 @@ import cn.com.goldenwater.core.redis.RedisCache;
 import cn.com.goldenwater.mapper.PermissionMapper;
 import cn.com.goldenwater.service.PermissionService;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.stereotype.Service;
 import reactor.core.publisher.Mono;
 
+import java.util.concurrent.TimeUnit;
+
 @Service
 public class PermissionServiceImpl implements PermissionService {
 
@@ -27,18 +28,12 @@ public class PermissionServiceImpl implements PermissionService {
         }
 
         // 查询数据库
-//        return permissionMapper.findPermission(thirdPartyId, path, method)
-//                .map(() -> {
-//                    // 缓存结果,有效期5分钟
-//                    redisTemplate.opsForValue().set(cacheKey, true, 5, TimeUnit.MINUTES);
-//                    return true;
-//                })
-//                .switchIfEmpty(Mono.defer(() -> {
-//                    // 缓存无权限结果,有效期1分钟
-//                    redisTemplate.opsForValue().set(cacheKey, false, 1, TimeUnit.MINUTES);
-//                    return Mono.just(false);
-//                }));
-
-        return Mono.just(true);
+        Integer permission = permissionMapper.findPermission(thirdPartyId, path, method);
+        if (permission != null && permission > 0) {
+            redisCache.setCacheObject(cacheKey, true, 5, TimeUnit.MINUTES);
+            return Mono.just(true);
+        }
+        redisCache.setCacheObject(cacheKey, false, 1, TimeUnit.MINUTES);
+        return Mono.just(false);
     }
 }

+ 3 - 2
src/main/java/cn/com/goldenwater/utils/TokenUtils.java

@@ -4,10 +4,11 @@ import org.springframework.http.server.reactive.ServerHttpRequest;
 
 public class TokenUtils {
 
-    private final static String AUTHORIZATION = "ModelAuth";
+    private final static String AUTHORIZATION = "accessToken";
 
     public static String getTokenFromRequest(ServerHttpRequest request) {
-        String authHeader = request.getHeaders().getFirst(AUTHORIZATION);
+        String authHeader = request.getQueryParams().getFirst(AUTHORIZATION);
+//        String authHeader = request.getHeaders().getFirst(AUTHORIZATION);
 //        if (authHeader != null && authHeader.startsWith("Bearer ")) {
 //            return authHeader.substring(7);
 //        }

+ 5 - 5
src/main/resources/application-dev.yml

@@ -1,9 +1,9 @@
 spring:
   datasource:
     driver-class-name: dm.jdbc.driver.DmDriver
-    url: jdbc:dm://39.98.38.2:30236?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&schema=SH_MODEL
-    username: SH_MODEL
-    password: ShModel@js123
+    url: jdbc:dm://39.98.38.2:30236?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&schema=TBA_GXPT
+    username: TBA_GXPT
+    password: Gxpt./1226
   sql:
     init:
       mode: always
@@ -15,9 +15,9 @@ spring:
     # 端口,默认为6379
     port: 16379
     # 数据库索引
-    database: 5
+    database: 6
     # 密码
-    password: 123456
+    password: ZjsthGw1125
     # 连接超时时间
     timeout: 20s
     lettuce:

+ 8 - 10
src/main/resources/mapper/PermissionMapper.xml

@@ -3,15 +3,13 @@
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="cn.com.goldenwater.mapper.PermissionMapper">
-    <select id="findPermission" resultType="java.lang.Boolean">
-        SELECT EXISTS(
-            SELECT 1
-            FROM permissions p
-                     JOIN third_party_permissions tpp ON p.id = tpp.permission_id
-            WHERE tpp.third_party_id = #{thirdPartyId}
-              AND p.path = #{path}
-              AND p.method = #{method}
-              AND p.enabled = 1
-        )
+    <select id="findPermission" resultType="java.lang.Integer">
+        SELECT COUNT(1)
+        FROM PT_SERVICE p
+                 JOIN PT_SERVICE_AUTH tpp ON p.SRV_ID = tpp.SRV_ID
+        WHERE INSTR(',' || tpp.APP_ID || ',', ',' || #{thirdPartyId} || ',') > 0
+          AND p.URL = #{path}
+          AND p.RQTYPE = #{method}
+          AND p.STATUS = 1
     </select>
 </mapper>