修改敏感词增加异常

This commit is contained in:
邹宗楠
2023-12-14 10:48:44 +08:00
parent 0f82e9ef7b
commit f45666eada
3 changed files with 2 additions and 3 deletions

View File

@@ -27,7 +27,7 @@ func InsertSensitiveWord(word string, vendorID int, userName string) error {
}
sensitiveWord := &model.SensitiveWord{Word: word, VendorID: vendorID}
WrapAddIDCULDEntity(sensitiveWord, userName)
return CreateEntity(nil, sensitiveWord)
return CreateOrUpdate(nil, sensitiveWord)
}
func DeleteSensitiveWord(wordList *model.SensitiveWord, id int, userName string, vendorID int) (word *model.SensitiveWord, err error) {

View File

@@ -3,5 +3,5 @@ package model
type SensitiveWord struct {
ModelIDCULD
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
Word string `orm:"size(30);unique" json:"word"`
Word string `orm:"size(512);unique" json:"word"`
}