From 0614fd84e20c16dece7941ff71ae35c81d1d8073 Mon Sep 17 00:00:00 2001 From: Leufolium Date: Wed, 8 May 2024 22:55:15 +0800 Subject: [PATCH] by Robin at 20240508 --- api/consts/status.go | 6 ++++++ app/mix/service/apiservice.go | 2 +- app/mix/service/logic/zone_third_partner.go | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/api/consts/status.go b/api/consts/status.go index 6e780f28..775fa89c 100644 --- a/api/consts/status.go +++ b/api/consts/status.go @@ -232,6 +232,12 @@ const ( IsHeaded_Yes = 1 //是 ) +// 是否隐藏 +const ( + IsHided_No = 0 //否 + IsHided_Yes = 1 //是 +) + // 从未更新的时间跨度 const ( DaysElapsedSinceTheLastZonesUpdate_Never = -1 diff --git a/app/mix/service/apiservice.go b/app/mix/service/apiservice.go index ecf18e41..7733b19a 100644 --- a/app/mix/service/apiservice.go +++ b/app/mix/service/apiservice.go @@ -3119,7 +3119,7 @@ func (s *Service) ApiGetZoneThirdPartnerList(ctx *gin.Context, req *zone_third_p vo = nil return } - if zoneThirdPartner.GetIsHided() == 1 { + if zoneThirdPartner.GetIsHided() == consts.IsHided_Yes { zoneThirdPartner.ThirdPartnerMid = nil zoneThirdPartner.SharingRatio = nil vo = &zone_third_partner_proto.ZoneThirdPartnerApiVO{ diff --git a/app/mix/service/logic/zone_third_partner.go b/app/mix/service/logic/zone_third_partner.go index fd1dbdee..27df2cca 100644 --- a/app/mix/service/logic/zone_third_partner.go +++ b/app/mix/service/logic/zone_third_partner.go @@ -31,7 +31,7 @@ func (p *ZoneThirdPartner) OpCreate(ctx *gin.Context, req *zone_third_partner_pr req.ZoneThirdPartner.Ct = goproto.Int64(time.Now().Unix()) req.ZoneThirdPartner.Ut = goproto.Int64(time.Now().Unix()) req.ZoneThirdPartner.DelFlag = goproto.Int64(consts.Exist) - //req.ZoneThirdPartner.IsHided = goproto.Int64(0) + req.ZoneThirdPartner.IsHided = goproto.Int64(consts.IsHided_No) err := p.store.CreateZoneThirdPartner(ctx, req.ZoneThirdPartner) if err != nil { logger.Error("CreateZoneThirdPartner fail, err: %v", err)