From 2cfe121fd14a0bade0f35a012652dbefb63e2c0e Mon Sep 17 00:00:00 2001 From: Leufolium Date: Wed, 26 Jun 2024 12:40:09 +0800 Subject: [PATCH] by Robin at 20240626 --- app/mix/service/apiservice.go | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/app/mix/service/apiservice.go b/app/mix/service/apiservice.go index b9b24c9c..b93b708e 100644 --- a/app/mix/service/apiservice.go +++ b/app/mix/service/apiservice.go @@ -3276,7 +3276,10 @@ func (s *Service) ApiHvyogoQueryAgreeState(ctx *gin.Context, req *hvyogoproto.Ap } if workerId == nil { logger.Error("No worker_id entity was found") - ec = errcode.ErrCodeWorkerIdNotExist + data = &hvyogoproto.ApiQueryAgreeStateData{ + StatusCode: response.StatusCodeFail, + StatusText: "用户尚未认证", + } return } @@ -3316,7 +3319,10 @@ func (s *Service) ApiHvyogoWorkerFindDetail(ctx *gin.Context, req *hvyogoproto.A } if workerId == nil { logger.Error("No worker_id entity was found") - ec = errcode.ErrCodeWorkerIdNotExist + data = &hvyogoproto.ApiWorkerFindDetailData{ + StatusCode: response.StatusCodeFail, + StatusText: "用户尚未认证", + } return } @@ -3459,6 +3465,11 @@ func (s *Service) ApiHvyogoSingleDistribute(ctx *gin.Context, req *hvyogoproto.A logger.Error("_DefaultSingleDistributeHis OpUpdate fail, err: %v", err) } + if resp.StatusCode != response.StatusCodeSuccess { + err = fmt.Errorf("single distribution fail") + return resp, err + } + return resp, nil } @@ -3495,7 +3506,10 @@ func (s *Service) ApiHvyogoWorkerUpdate(ctx *gin.Context, req *hvyogoproto.ApiWo } if workerId == nil { logger.Error("No worker_id entity was found") - ec = errcode.ErrCodeWorkerIdNotExist + data = &hvyogoproto.ApiWorkerUpdateData{ + StatusCode: response.StatusCodeFail, + StatusText: "用户尚未认证", + } return }