From f9df18e9fb1bbb25707d7e85642078c21061c5af Mon Sep 17 00:00:00 2001 From: hujiebin Date: Thu, 15 Jun 2023 20:20:39 +0800 Subject: [PATCH] Update headwear.go --- txop/headwear_tx/headwear.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/txop/headwear_tx/headwear.go b/txop/headwear_tx/headwear.go index 42575ea..4b203f2 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 +} -- 2.22.0