From 61c2cc198c29d3e6e56b2f2214feb324009c5056 Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Fri, 13 Dec 2024 20:25:29 +0800 Subject: [PATCH] update --- app/hdl/member_center/hdl_tag__management.go | 4 +--- app/md/member_center/md_tag_management.go | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/hdl/member_center/hdl_tag__management.go b/app/hdl/member_center/hdl_tag__management.go index e5f9ce0..8a024aa 100644 --- a/app/hdl/member_center/hdl_tag__management.go +++ b/app/hdl/member_center/hdl_tag__management.go @@ -68,9 +68,7 @@ func AddTag(c *gin.Context) { TagName: req.Name, Memo: req.Memo, CreateAt: time.Now().Format("2006-01-02 15:04:05"), - } - if req.IsPunish == "1" { - tag.IsPunish = 1 + IsPunish: req.IsPunish, } tagDb := implement.NewUserTagDb(db.Db) tagID, err := tagDb.UserTagInsert(&tag) diff --git a/app/md/member_center/md_tag_management.go b/app/md/member_center/md_tag_management.go index aa81633..bdb4bdd 100644 --- a/app/md/member_center/md_tag_management.go +++ b/app/md/member_center/md_tag_management.go @@ -17,7 +17,7 @@ type GetTagListResp struct { type AddTagReq struct { Name string `json:"name,required"` // 标签名称 Memo string `json:"memo,required"` // 备注 - IsPunish string `json:"is_punish,required"` // 是否为处罚标签(0:否 1:是) + IsPunish int `json:"is_punish,required"` // 是否为处罚标签(0:否 1:是) } type UpdateTagReq struct {