Skip to content

Commit

Permalink
Merge pull request #2819 from actiontech/feat_add_api_for_coding
Browse files Browse the repository at this point in the history
feat: add api for coding
  • Loading branch information
winfredLIN authored Dec 12, 2024
2 parents 487482f + 3100f6c commit 91a5029
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions sqle/locale/active.en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions sqle/locale/active.zh.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ ApSchema = "schema"
AuditRecordTagFull = "全量"
AuditRecordTagIncrement = "增量"
ConfigFeishuTestContent = "这是一条测试审批,用来测试SQLE飞书审批功能是否正常"
ConfigCodingTest = "这是一条测试信息,用来测试SQLE推送事项到Coding平台功能是否正常"
ConfigTestAudit = "测试审批"
DefaultRuleTemplatesDesc = "默认规则模板"
DefaultTemplatesDesc = "%s 默认模板"
Expand Down
1 change: 1 addition & 0 deletions sqle/locale/message_zh.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions sqle/model/instance_audit_plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}).
Expand Down

0 comments on commit 91a5029

Please sign in to comment.