diff --git a/sqle/locale/active.en.toml b/sqle/locale/active.en.toml index a851b8ccb..cfc70f667 100644 --- a/sqle/locale/active.en.toml +++ b/sqle/locale/active.en.toml @@ -73,6 +73,7 @@ ApSchema = "Schema" AuditRecordTagFull = "Full" AuditRecordTagIncrement = "Increment" ConfigFeishuTestContent = "This is a test approval, used to test whether the SQLE Feishu approval function is normal." +ConfigCodingTest = "This is a test message, used to test whether the function of SQLE push to Coding platform is normal." ConfigTestAudit = "Test approval" DefaultRuleTemplatesDesc = "Default rule template" DefaultTemplatesDesc = "%s default template" diff --git a/sqle/locale/active.zh.toml b/sqle/locale/active.zh.toml index 6707e2ced..8416cc89d 100644 --- a/sqle/locale/active.zh.toml +++ b/sqle/locale/active.zh.toml @@ -73,6 +73,7 @@ ApSchema = "schema" AuditRecordTagFull = "全量" AuditRecordTagIncrement = "增量" ConfigFeishuTestContent = "这是一条测试审批,用来测试SQLE飞书审批功能是否正常" +ConfigCodingTest = "这是一条测试信息,用来测试SQLE推送事项到Coding平台功能是否正常" ConfigTestAudit = "测试审批" DefaultRuleTemplatesDesc = "默认规则模板" DefaultTemplatesDesc = "%s 默认模板" diff --git a/sqle/locale/message_zh.go b/sqle/locale/message_zh.go index 465ac237c..74ed4e2d2 100644 --- a/sqle/locale/message_zh.go +++ b/sqle/locale/message_zh.go @@ -184,6 +184,7 @@ var ( var ( ConfigTestAudit = &i18n.Message{ID: "ConfigTestAudit", Other: "测试审批"} ConfigFeishuTestContent = &i18n.Message{ID: "ConfigFeishuTestContent", Other: "这是一条测试审批,用来测试SQLE飞书审批功能是否正常"} + ConfigCoding = &i18n.Message{ID: "ConfigCodingTest", Other: "这是一条测试信息,用来测试SQLE推送事项到Coding平台功能是否正常"} ) // operation_record diff --git a/sqle/model/instance_audit_plan.go b/sqle/model/instance_audit_plan.go index 82bc9eef7..33febb96f 100644 --- a/sqle/model/instance_audit_plan.go +++ b/sqle/model/instance_audit_plan.go @@ -283,6 +283,17 @@ type SQLManageRecordProcess struct { Remark string `json:"remark" gorm:"type:varchar(4000)"` } +func (s *Storage) GetSQLManageRecordProcess(sqlManageRecordID uint) (*SQLManageRecordProcess, error) { + sqlManageRecordProcess := &SQLManageRecordProcess{} + err := s.db.Model(SQLManageRecordProcess{}). + Where("sql_manage_record_id = ?", sqlManageRecordID). + First(sqlManageRecordProcess).Error + if err != nil { + return nil, err + } + return sqlManageRecordProcess, nil +} + func (s *Storage) GetAuditPlanByID(auditPlanID int) (*AuditPlanV2, bool, error) { auditPlan := &AuditPlanV2{} err := s.db.Model(AuditPlanV2{}).