浏览代码

提交代码

wangtong 1 年之前
父节点
当前提交
364fbc7cec
共有 1 个文件被更改,包括 16 次插入3 次删除
  1. 16 3
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/mobile/MSysController.java

+ 16 - 3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/mobile/MSysController.java

@@ -6,9 +6,11 @@ import io.swagger.annotations.Api;
 import lombok.RequiredArgsConstructor;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 @Validated
 @Api(value = "字典", tags = {"字典"})
@@ -23,5 +25,16 @@ public class MSysController {
    {
        return  AjaxResult.success(sysDictTypeService.selectDictDataByType(type));
    }
+   @PostMapping("dictlist")
+   public AjaxResult dict( @RequestBody List<String> type)
+   {
+      Map<String,List> map=new HashMap<>();
+      type.forEach(item ->
+              {
+                 List arry=sysDictTypeService.selectDictDataByType(item);
+                 map.put(item,arry);
+              });
+      return  AjaxResult.success(map);
+   }
 }