@@ -466,16 +466,11 @@ type DataExportTaskRecord struct {
466466
467467type AuditResult struct {
468468 Level string `json:"level"`
469- Message string `json:"message"` // Deprecated: use I18nAuditResultInfo instead
470469 RuleName string `json:"rule_name"`
471470 I18nAuditResultInfo I18nAuditResultInfo `json:"i18n_audit_result_info"`
472471}
473472
474473func (ar * AuditResult ) GetAuditMsgByLangTag (lang language.Tag ) string {
475- if len (ar .I18nAuditResultInfo ) == 0 {
476- // 兼容老数据
477- return ar .Message
478- }
479474 return ar .I18nAuditResultInfo .GetAuditResultInfoByLangTag (lang ).Message
480475}
481476
@@ -529,11 +524,11 @@ func (a *AuditResults) String() string {
529524func (a * AuditResults ) Append (nar * AuditResult ) {
530525 for i := range * a {
531526 ar := (* a )[i ]
532- if ar .Level == nar .Level && ar .RuleName == nar .RuleName && ar .Message == nar .Message {
527+ if ar .Level == nar .Level && ar .RuleName == nar .RuleName && ar .GetAuditMsgByLangTag ( i18nPkg . DefaultLang ) == nar .GetAuditMsgByLangTag ( i18nPkg . DefaultLang ) {
533528 return
534529 }
535530 }
536- * a = append (* a , AuditResult {Level : nar .Level , RuleName : nar .RuleName , Message : nar . Message , I18nAuditResultInfo : nar .I18nAuditResultInfo })
531+ * a = append (* a , AuditResult {Level : nar .Level , RuleName : nar .RuleName , I18nAuditResultInfo : nar .I18nAuditResultInfo })
537532}
538533
539534type CbOperationLog struct {
@@ -542,7 +537,6 @@ type CbOperationLog struct {
542537 OpTime * time.Time `json:"op_time"`
543538 DBServiceUID string `json:"db_service_uid" gorm:"size:32"`
544539 OpType string `json:"op_type" gorm:"size:255"`
545- OpDetail string `json:"op_detail" gorm:"type:longtext"` // Deprecated: use I18nOpDetail instead
546540 I18nOpDetail i18nPkg.I18nStr `json:"i18n_op_detail" gorm:"column:i18n_op_detail; type:json"`
547541 OpSessionID * string `json:"op_session_id" gorm:"size:255"`
548542 ProjectID string `json:"project_id" gorm:"size:32"`
0 commit comments