From 5a18d863778ffabcc45da185f7f77e7462289bb9 Mon Sep 17 00:00:00 2001
From: yeg <1347747024@qq.com>
Date: 星期四, 27 八月 2026 20:45:31 +0800
Subject: [PATCH] feat(test): implement test configuration and channel binding

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TTestController.java |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TTestController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TTestController.java
index 555b1f2..91dd05f 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TTestController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TTestController.java
@@ -30,6 +30,13 @@
     @Autowired
     private ITTestService testService;
 
+    @PreAuthorize("@ss.hasAnyPermi('system:test:add,system:test:edit')")
+    @GetMapping("/options")
+    public AjaxResult options()
+    {
+        return success(testService.selectConfigurationOptions());
+    }
+
     @PreAuthorize("@ss.hasPermi('system:test:list')")
     @GetMapping("/list")
     public TableDataInfo list(TTest test)
@@ -51,8 +58,10 @@
     @PostMapping
     public AjaxResult add(@Validated @RequestBody TTest test)
     {
+        test.setOperatorId(getUserId());
+        test.setCreatorId(getUserId());
         test.setCreateBy(getUsername());
-        return toAjax(testService.insertTest(test));
+        return success(testService.createTest(test));
     }
 
     @PreAuthorize("@ss.hasPermi('system:test:edit')")
@@ -60,6 +69,7 @@
     @PutMapping
     public AjaxResult edit(@Validated @RequestBody TTest test)
     {
+        test.setOperatorId(getUserId());
         test.setUpdateBy(getUsername());
         return toAjax(testService.updateTest(test));
     }

--
Gitblit v1.7.1