From 13fb262b82817adb86e41ae5ca851b4484626fd9 Mon Sep 17 00:00:00 2001 From: Leufolium Date: Wed, 17 Apr 2024 23:39:37 +0800 Subject: [PATCH] by Robin at 20240417 --- app/mix/controller/init.go | 2 +- app/mix/service/apiservice.go | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/mix/controller/init.go b/app/mix/controller/init.go index bd8f937c..75d58bc7 100644 --- a/app/mix/controller/init.go +++ b/app/mix/controller/init.go @@ -242,7 +242,7 @@ func Init(r *gin.Engine) { // 空间代运营表 apiZoneThirdPartnerGroup := r.Group("/api/zone_third_partner", PrepareToC()) - apiZoneThirdPartnerGroup.POST("create", middleware.JSONParamValidator(zone_third_partner_proto.ApiCreateReq{}), middleware.JwtAuthenticator(), ApiCreateZoneThirdPartner) + apiZoneThirdPartnerGroup.POST("create", middleware.JSONParamValidator(zone_third_partner_proto.ApiCreateReq{}), middleware.JwtAuthenticator(), middleware.RequestDecryptor(), ApiCreateZoneThirdPartner) //apiZoneThirdPartnerGroup.POST("update", middleware.JSONParamValidator(zone_third_partner_proto.ApiUpdateReq{}), middleware.JwtAuthenticator(), ApiUpdateZoneThirdPartner) //apiZoneThirdPartnerGroup.POST("delete", middleware.JSONParamValidator(zone_third_partner_proto.ApiDeleteReq{}), middleware.JwtAuthenticator(), ApiDeleteZoneThirdPartner) apiZoneThirdPartnerGroup.POST("list", middleware.JSONParamValidator(zone_third_partner_proto.ApiListReq{}), middleware.JwtAuthenticator(), ApiGetZoneThirdPartnerList) diff --git a/app/mix/service/apiservice.go b/app/mix/service/apiservice.go index dfd9db92..858ea94a 100644 --- a/app/mix/service/apiservice.go +++ b/app/mix/service/apiservice.go @@ -527,6 +527,11 @@ func (s *Service) ApiGetAccountListForOthersByUserId(ctx *gin.Context, req *acco ec = errcode.ErrCodeAccountSrvFail return } + if account == nil { + logger.Error("No account entity was found") + ec = errcode.ErrCodeAccountNotExist + return + } vo = &accountproto.ApiListOthersVO{} vo.CopyAccount(account)