| 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(); | 
|     } | 
| } |