yjp 1 vuosi sitten
vanhempi
commit
b8177424f0

+ 3 - 0
project/server/deployment/data_service/data_containers/sql_executor.yaml

@@ -9,6 +9,9 @@ spec:
       - name: sql
         type: text
         comment: sql语句
+      - name: executor_id
+        type: varchar(32)
+        comment: 执行人ID
       - name: executor_name
         type: varchar(256)
         comment: 执行人姓名

+ 2 - 2
project/server/main.go

@@ -78,8 +78,8 @@ import (
 // curl -X GET "http://localhost:31000/example/api/v1/hobby/student/query?id=42b305bb292c4082a3e91a2967f11111"
 
 // Sql Executor
-// curl -X POST -H 'Content-Type: application/json' -d '{"sql": "SELECT * FROM test.sql_execute_logs", "executorName": "test"}' "http://localhost:31000/example/api/sql/execute"
-// curl -X GET "http://localhost:31000/example/api/sql/execute/log?sql=SELECT&executorName=te&startExecuteTime=2024-05-30%2012:03:45"
+// curl -X POST -H 'Content-Type: application/json' -d '{"sql": "SELECT * FROM test.sql_execute_logs", "executorId": "guest-00254b4a7102429db35e6edc8e", "executorName": "test"}' "http://localhost:31000/example/api/sql/execute"
+// curl -X GET "http://localhost:31000/example/api/sql/execute/log?sql=SELECT&executorId=guest-00254b4a7102429db35e6edc8e&executorName=te&startExecuteTime=2024-05-30%2012:03:45"
 
 func main() {
 	application.NewApp()