添加业务模块

This commit is contained in:
2025-02-08 11:33:55 +08:00
parent e23030bf18
commit 4a0a9b6471
3 changed files with 12 additions and 15 deletions

View File

@@ -37,7 +37,6 @@ public class TestApiController extends BaseController {
/**
* 查询接口列表
*/
@PreAuthorize("@ss.hasPermi('test:api:list')")
@GetMapping("/list")
public TableDataInfo list(TestApi testApi) {
startPage();
@@ -48,7 +47,6 @@ public class TestApiController extends BaseController {
/**
* 导出接口列表
*/
@PreAuthorize("@ss.hasPermi('test:api:export')")
@Log(title = "接口", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, TestApi testApi) {
@@ -60,7 +58,6 @@ public class TestApiController extends BaseController {
/**
* 获取接口详细信息
*/
@PreAuthorize("@ss.hasPermi('test:api:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(testApiService.selectTestApiById(id));
@@ -69,7 +66,6 @@ public class TestApiController extends BaseController {
/**
* 新增接口
*/
@PreAuthorize("@ss.hasPermi('test:api:add')")
@Log(title = "接口", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TestApi testApi) {
@@ -79,7 +75,6 @@ public class TestApiController extends BaseController {
/**
* 修改接口
*/
@PreAuthorize("@ss.hasPermi('test:api:edit')")
@Log(title = "接口", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TestApi testApi) {
@@ -89,7 +84,6 @@ public class TestApiController extends BaseController {
/**
* 删除接口
*/
@PreAuthorize("@ss.hasPermi('test:api:remove')")
@Log(title = "接口", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {

View File

@@ -40,7 +40,7 @@
<where>
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
<if test="method != null and method != ''">and method = #{method}</if>
<if test="uri != null and uri != ''">and uri = #{uri}</if>
<if test="uri != null and uri != ''">and uri = like concat('%', #{uri}, '%')</if>
<if test="header != null and header != ''">and header = #{header}</if>
<if test="param != null and param != ''">and param = #{param}</if>
<if test="body != null and body != ''">and body = #{body}</if>

View File

@@ -9,13 +9,15 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="接口请求类型" prop="method">
<el-input
v-model="queryParams.method"
placeholder="请输入接口请求类型"
clearable
@keyup.enter.native="handleQuery"
/>
<el-form-item label="请求类型" prop="method">
<el-select v-model="queryParams.method" placeholder="请输入接口请求类型" clearable @keyup.enter.native="handleQuery">
<el-option
v-for="dict in dict.type.http_method"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="接口路径" prop="uri">
<el-input
@@ -105,7 +107,7 @@
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
@@ -143,6 +145,7 @@ import { listApi, getApi, delApi, addApi, updateApi } from "@/api/test/api";
export default {
name: "Api",
dicts: ['http_method'],
data() {
return {
// 遮罩层