From f45666eada3c7fa7f798b2c5674792b230c81082 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 14 Dec 2023 10:48:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=8F=E6=84=9F=E8=AF=8D?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/model/dao/sensitive_words.go | 2 +- business/model/sensitive_words.go | 2 +- controllers/cms_sku.go | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/business/model/dao/sensitive_words.go b/business/model/dao/sensitive_words.go index 367bbb571..21e041466 100644 --- a/business/model/dao/sensitive_words.go +++ b/business/model/dao/sensitive_words.go @@ -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) { diff --git a/business/model/sensitive_words.go b/business/model/sensitive_words.go index 5c791b3cb..02805151a 100644 --- a/business/model/sensitive_words.go +++ b/business/model/sensitive_words.go @@ -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"` } diff --git a/controllers/cms_sku.go b/controllers/cms_sku.go index 95a3d1a46..b54ddaceb 100644 --- a/controllers/cms_sku.go +++ b/controllers/cms_sku.go @@ -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