修改UpdateSensitiveWord
This commit is contained in:
@@ -381,12 +381,15 @@ func (c *SkuController) InsertSensitiveWord() {
|
||||
// @router /UpdateSensitiveWord [put]
|
||||
func (c *SkuController) UpdateSensitiveWord() {
|
||||
c.callUpdateSensitiveWord(func(params *tSkuUpdateSensitiveWordParams) (retVal interface{}, errCode string, err error) {
|
||||
word := &model.SensitiveWord{
|
||||
VendorID: params.VendorID,
|
||||
Word: params.Word,
|
||||
ModelIDCULD: model.ModelIDCULD{
|
||||
ID: params.ID,
|
||||
},
|
||||
//word := &model.SensitiveWord{
|
||||
// VendorID: params.VendorID,
|
||||
// Word: params.Word,
|
||||
//}
|
||||
words, err := dao.GetSensitiveWordList(params.VendorID)
|
||||
word := words[0]
|
||||
word.Word = params.Word
|
||||
if params.ID != 0 {
|
||||
word.ModelIDCULD.ID = params.ID
|
||||
}
|
||||
if params.Status == 1 {
|
||||
retVal, err = dao.DeleteSensitiveWord(word, params.ID, params.Ctx.GetUserName(), params.VendorID)
|
||||
|
||||
Reference in New Issue
Block a user