jinlin
2024-02-26 6f0714843341b168573ad0272069f7af2d3d2b87
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
36
37
38
39
40
41
42
43
44
package com.zt.modules.sys.controller;
 
import com.zt.common.servlet.Result;
import com.zt.modules.sys.dto.InterfaceDto;
import com.zt.modules.sys.service.SysInterfaceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import java.util.List;
 
/**
 * SYS_INTERFACE
 *
 * @author xhb test@email.com
 * @since 1.0.0 2020-06-02
 */
@RestController
@RequestMapping("/sys/interface")
@Api(tags = "数据接口")
public class SysInterfaceController {
    @Autowired
    private SysInterfaceService sysInterfaceService;
 
    @GetMapping("tree")
    @ApiOperation("树形结构")
    public Result<List<InterfaceDto>> tree() {
 
        return Result.ok(sysInterfaceService.tree());
 
    }
 
    @GetMapping("update")
    // @PostMapping
    // @RequiresPermissions(Constant.Permissions.SUPER_ADMIN)
    public Result updateInterfaces() throws Exception {
        sysInterfaceService.saveInterfaces();
 
        return Result.ok();
    }
}