添加业务模块

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") @GetMapping("/list")
public TableDataInfo list(TestApi testApi) { public TableDataInfo list(TestApi testApi) {
startPage(); startPage();
@@ -48,7 +47,6 @@ public class TestApiController extends BaseController {
/** /**
* 导出接口列表 * 导出接口列表
*/ */
@PreAuthorize("@ss.hasPermi('test:api:export')")
@Log(title = "接口", businessType = BusinessType.EXPORT) @Log(title = "接口", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, TestApi testApi) { 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}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) { public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(testApiService.selectTestApiById(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) @Log(title = "接口", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TestApi testApi) { 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) @Log(title = "接口", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TestApi testApi) { 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) @Log(title = "接口", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) { public AjaxResult remove(@PathVariable Long[] ids) {

View File

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

View File

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