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