@RestController @RequestMapping(value="/system/api/interface") public class ApiInterfaceController extends Object
| 构造器和说明 |
|---|
ApiInterfaceController() |
| 限定符和类型 | 方法和说明 |
|---|---|
Result |
add(com.alibaba.fastjson2.JSONObject jsonObject)
新增保存
|
Result<ApiInterface> |
detail(Long id)
详情页
|
Result |
edit(com.alibaba.fastjson2.JSONObject jsonObject)
修改保存
|
void |
export(javax.servlet.http.HttpServletResponse response,
ApiInterface apiInterface)
导出接口
|
Result |
getInterface(Long projectId,
Long id)
详情页, 编辑页面需要调用详情接口
|
Result<com.baomidou.mybatisplus.core.metadata.IPage<ApiInterface>> |
list(ApiInterface apiInterface,
Integer pageNo,
Integer pageSize)
分页查询
|
Result |
remove(Long[] ids)
删除接口
|
Result |
sync(ApiInterface apiInterface)
同步接口
即从java代码中解析接口,并同步到接口表中
|
@OperateLog(title="\u63a5\u53e3\u6587\u6863", businessType=DETAIL) @PreAuthorize(value="@auth.hasAuthority(\'system:interface:query\')") @GetMapping(value={"/{projectId}/","/{projectId}/{id}"}) public Result getInterface(@PathVariable Long projectId, @PathVariable(value="id",required=false) Long id)
@OperateLog(title="\u63a5\u53e3\u6587\u6863", businessType=DETAIL) @PreAuthorize(value="@auth.hasAuthority(\'system:interface:query\')") @GetMapping(value="/detail") public Result<ApiInterface> detail(Long id)
@OperateLog(title="\u63a5\u53e3\u6587\u6863", businessType=LIST) @PreAuthorize(value="@auth.hasAuthority(\'system:interface:list\')") @GetMapping(value="/list") public Result<com.baomidou.mybatisplus.core.metadata.IPage<ApiInterface>> list(ApiInterface apiInterface, @RequestParam(name="pageNum",defaultValue="1") Integer pageNo, @RequestParam(name="pageSize",defaultValue="10") Integer pageSize)
apiInterface - 分页查询筛选条件pageNo - 页码pageSize - 每页的数量@OperateLog(title="\u63a5\u53e3\u6587\u6863", businessType=INSERT) @PreAuthorize(value="@auth.hasAuthority(\'system:interface:add\')") @PostMapping public Result add(@Validated @RequestBody com.alibaba.fastjson2.JSONObject jsonObject)
@OperateLog(title="\u63a5\u53e3\u6587\u6863", businessType=UPDATE) @PreAuthorize(value="@auth.hasAuthority(\'system:interface:edit\')") @PutMapping public Result edit(@Validated @RequestBody com.alibaba.fastjson2.JSONObject jsonObject)
@OperateLog(title="\u63a5\u53e3\u6587\u6863", businessType=DELETE) @PreAuthorize(value="@auth.hasAuthority(\'system:interface:remove\')") @DeleteMapping(value="/{ids}") public Result remove(@PathVariable Long[] ids)
@OperateLog(title="\u63a5\u53e3\u6587\u6863", businessType=EXPORT) @PreAuthorize(value="@auth.hasAuthority(\'system:interface:export\')") @PostMapping(value="/export") public void export(javax.servlet.http.HttpServletResponse response, ApiInterface apiInterface) throws Exception
Exception@OperateLog(title="\u63a5\u53e3\u6587\u6863", businessType=SYNC) @PostMapping(value="sync") public Result sync(@RequestBody ApiInterface apiInterface)
apiInterface - Copyright © 2023. All rights reserved.