修改敏感词增加异常
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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"`
|
||||
}
|
||||
|
||||
@@ -397,7 +397,6 @@ func (c *SkuController) GetSensitiveWordList() {
|
||||
|
||||
// @Title 插入敏感词列表
|
||||
// @Description 插入敏感词列表
|
||||
// @Param token header string true "认证token"
|
||||
// @Param word formData string true "关键词名字"
|
||||
// @Param vendorID formData int false "VendorID"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
|
||||
Reference in New Issue
Block a user