From 1fda9baf017c481e681a0b4b22acd4124e5188fe Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Wed, 11 Dec 2024 18:20:24 +0800 Subject: [PATCH] update --- app/hdl/member_center/hdl_tag__management.go | 2 +- app/md/member_center/md_tag_management.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/hdl/member_center/hdl_tag__management.go b/app/hdl/member_center/hdl_tag__management.go index b40b72c..e5f9ce0 100644 --- a/app/hdl/member_center/hdl_tag__management.go +++ b/app/hdl/member_center/hdl_tag__management.go @@ -109,7 +109,7 @@ func UpdateTag(c *gin.Context) { e.OutErr(c, e.ERR_NO_DATA, errors.New("标签不存在").Error()) return } - if req.IsPunish != "" && oldTag.IsPunish != utils.StrToInt(req.IsPunish) { + if oldTag.IsPunish != req.IsPunish { // 标签在被使用情况下不允许修改是否为处罚标签 recordsDb := implement.NewUserTagRecordsDb(db.Db) exist, err := recordsDb.UserTagRecordsExist(0, tagID) diff --git a/app/md/member_center/md_tag_management.go b/app/md/member_center/md_tag_management.go index fd6bc13..aa81633 100644 --- a/app/md/member_center/md_tag_management.go +++ b/app/md/member_center/md_tag_management.go @@ -24,7 +24,7 @@ type UpdateTagReq struct { TagID string `json:"tag_id,required"` // 标签 ID Name string `json:"name,required"` // 标签名称 Memo string `json:"memo,required"` // 备注 - IsPunish string `json:"is_punish"` // 是否是惩罚标签 + IsPunish int `json:"is_punish"` // 是否是惩罚标签 } type DeleteTagReq struct {