浏览代码

创建字典key常量类,修改手机端代码引用常量属性

Wang-Xiao-Ran 1 年之前
父节点
当前提交
142e09fb8a

+ 3 - 0
src/main/java/com/sooka/sponest/mobile/remoteapi/RemoteSystemBaseService.java

@@ -194,4 +194,7 @@ public interface RemoteSystemBaseService {
 
     @GetMapping("/dict/data/type/{dictType}")
     AjaxResult getSortByType(@PathVariable("dictType") String dictType);
+
+    @GetMapping("/menuApp/selectMenuListByParentIdAndRoleId/{parentId}")
+    AjaxResult getMenuListByParentId(@PathVariable("parentId") String parentId);
 }

+ 6 - 0
src/main/java/com/sooka/sponest/mobile/remoteapi/factory/RemoteSystemBaseServiceFallbackFactory.java

@@ -15,6 +15,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.cloud.openfeign.FallbackFactory;
 import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.PathVariable;
 
 import java.util.List;
 import java.util.Map;
@@ -149,6 +150,11 @@ public class RemoteSystemBaseServiceFallbackFactory implements FallbackFactory<R
             public AjaxResult getSortByType(String dictType) {
                 return null;
             }
+
+            @Override
+            public AjaxResult getMenuListByParentId(@PathVariable("parentId") String parentId) {
+                return null;
+            }
         };
     }
 

+ 27 - 0
src/main/java/com/sooka/sponest/mobile/system/menu/controller/MenuController.java

@@ -0,0 +1,27 @@
+package com.sooka.sponest.mobile.system.menu.controller;
+
+import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.sooka.sponest.mobile.remoteapi.RemoteSystemBaseService;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author LG
+ * @Date 2023/10/8 - 14:12
+ */
+@RestController
+@RequestMapping("/menu")
+public class MenuController {
+
+    @Resource
+    RemoteSystemBaseService remoteSystemBaseService;
+
+    @GetMapping("/getMenu")
+    public AjaxResult getMenu(@RequestParam String parentId){
+        return remoteSystemBaseService.getMenuListByParentId(parentId);
+    }
+}