From a2f19e795a2790a0d0a6c1f9f162ce437d257029 Mon Sep 17 00:00:00 2001 From: LordofAvernus Date: Tue, 30 Jul 2024 11:12:25 +0000 Subject: [PATCH 1/2] return instance id --- sqle/api/controller/v1/instance_audit_plan.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sqle/api/controller/v1/instance_audit_plan.go b/sqle/api/controller/v1/instance_audit_plan.go index 3a9777393..a46e23461 100644 --- a/sqle/api/controller/v1/instance_audit_plan.go +++ b/sqle/api/controller/v1/instance_audit_plan.go @@ -526,7 +526,7 @@ type InstanceAuditPlanDetailResV1 struct { Business string `json:"business" example:"test"` InstanceType string `json:"instance_type" example:"mysql" ` InstanceName string `json:"instance_name" example:"test_mysql"` - + InstanceID string `json:"instance_id" example:"instance_id"` // 扫描类型 AuditPlans []AuditPlanRes `json:"audit_plans"` } @@ -570,6 +570,7 @@ func GetInstanceAuditPlanDetail(c echo.Context) error { Business: detail.Business, InstanceType: detail.DBType, InstanceName: detail.InstanceName, + InstanceID: fmt.Sprintf("%d", detail.InstanceID), AuditPlans: auditPlans, } return c.JSON(http.StatusOK, &GetInstanceAuditPlanDetailResV1{ From fd0622c5d886bbbe535c832a5e06701103943b4c Mon Sep 17 00:00:00 2001 From: LordofAvernus Date: Tue, 30 Jul 2024 13:05:19 +0000 Subject: [PATCH 2/2] fix : extract schema task sql fail --- sqle/server/auditplan/task_type_mysql_schema_meta.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqle/server/auditplan/task_type_mysql_schema_meta.go b/sqle/server/auditplan/task_type_mysql_schema_meta.go index d3433a967..fba2dba1d 100644 --- a/sqle/server/auditplan/task_type_mysql_schema_meta.go +++ b/sqle/server/auditplan/task_type_mysql_schema_meta.go @@ -199,7 +199,7 @@ func (at *BaseSchemaMetaTaskV2) ExtractSQL(logger *logrus.Entry, ap *AuditPlan, return nil, nil } - sqls, err := at.extractSQL(logger, ap, persist) + sqls, err := at.extract(logger, ap, persist) if err != nil { return nil, err }