by Robin at 20240507; is_hided for third partner

This commit is contained in:
Leufolium 2024-05-07 16:33:55 +08:00
parent 5aab80fcdd
commit 099230a6ba
2 changed files with 16 additions and 0 deletions

View File

@ -3119,6 +3119,14 @@ func (s *Service) ApiGetZoneThirdPartnerList(ctx *gin.Context, req *zone_third_p
vo = nil
return
}
if zoneThirdPartner.GetIsHided() == 1 {
zoneThirdPartner.ThirdPartnerMid = nil
zoneThirdPartner.SharingRatio = nil
vo = &zone_third_partner_proto.ZoneThirdPartnerApiVO{
ZoneThirdPartner: zoneThirdPartner,
}
return
}
acct, err := _DefaultAccount.OpListByMid(ctx, &accountproto.OpListByMidReq{
Mid: zoneThirdPartner.ThirdPartnerMid,

View File

@ -5,6 +5,7 @@ type ZoneThirdPartner struct {
Zid *int64 `json:"zid" bson:"zid"` // 空间id
ThirdPartnerMid *int64 `json:"third_partner_mid" bson:"third_partner_mid"` // 代运营用户id
SharingRatio *float64 `json:"sharing_ratio" bson:"sharing_ratio"` // 分成比例
IsHided *int64 `json:"is_hided" bson:"is_hided"` // 是否隐藏
Ct *int64 `json:"ct" bson:"ct"` // 创建时间
Ut *int64 `json:"ut" bson:"ut"` // 更新时间
DelFlag *int64 `json:"del_flag" bson:"del_flag"` // 删除标记
@ -31,3 +32,10 @@ func (p *ZoneThirdPartner) GetSharingRatio() float64 {
}
return 0
}
func (p *ZoneThirdPartner) GetIsHided() int64 {
if p != nil && p.IsHided != nil {
return *p.IsHided
}
return 0
}