diff --git a/txop/headwear_tx/headwear.go b/txop/headwear_tx/headwear.go index 42575ea8b418bdc7c91df6cecb6e6ec909202690..4b203f2544b5fdc4b41c6230971b7ee1c2f5f5c7 100644 --- a/txop/headwear_tx/headwear.go +++ b/txop/headwear_tx/headwear.go @@ -80,3 +80,15 @@ func AddUserHeadwearLog(model *domain.Model, userId mysql.ID, headwearId mysql.I } return userHeadwearLog.ID, nil } + +//删除头饰 +func DelHeadwear(model *domain.Model, userId, headwearId mysql.ID) error { + userHeadwear, err := user_m.GetUserHeadwearOrInit(model, userId, headwearId) + if err != nil { + return err + } + if userHeadwear, _, err = userHeadwear.MgrDel(0); err != nil { + return err + } + return nil +}