tjx
2025-11-10 0fd4d12cddba6be0d46d779142da121c2321044c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package com.gs.simple.controller;
 
 
import com.gs.simple.common.ResultDto;
import com.gs.simple.domain.MesSimplesimple;
import com.gs.simple.domain.TreeView;
import com.gs.simple.service.MesSimpleService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import java.util.List;
 
@RestController
@RequestMapping("simple")
@RequiredArgsConstructor
@CrossOrigin(origins = "*") //跨域请求
public class SimpleController {
 
    private final MesSimpleService simpleService;
 
 
    @PostMapping("/getTree")
    public ResultDto<List<TreeView>> getTree() {
        return simpleService.getTree();
    }
 
 
    @PostMapping("list")
    public ResultDto<List<MesSimplesimple>> getList() {
        return simpleService.getMenuList();
    }
}