Browse Source

中石油导入fix 大小写不敏感

xiziwen 4 months ago
parent
commit
42bf50bdeb
1 changed files with 3 additions and 1 deletions
  1. 3 1
      services/pcsg/mail.go

+ 3 - 1
services/pcsg/mail.go

@@ -239,7 +239,9 @@ func handleMailMessage(emailMessage mail.MailMessage) (err error) {
 	}
 	reportInfo.Title = strings.Replace(reportInfo.Title, "[PCI ANALYTICS CLOUD PLATFORM(00) Fwd] - ", "", -1)
 	for _, v := range ruleList {
-		if strings.Contains(emailMessage.Title, v.Rule) {
+		title := strings.ToLower(reportInfo.Title)
+		rule := strings.ToLower(v.Rule)
+		if strings.Contains(title, rule) {
 			reportInfo.Title = v.Title
 			reportInfo.Abstract = v.Abstract
 			reportInfo.ClassifyID = v.ClassifyId