From b91f06d24089acf9f18e417c79088d16b257f25c Mon Sep 17 00:00:00 2001 From: "jiaji.H" Date: Wed, 11 Mar 2026 22:03:54 +0800 Subject: [PATCH] =?UTF-8?q?Updata=EF=BC=9A=E6=9B=B4=E6=96=B0=E5=8F=91?= =?UTF-8?q?=E9=80=81=E9=97=AE=E5=8D=B7=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/dao/questionnaire_survey.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/internal/dao/questionnaire_survey.go b/internal/dao/questionnaire_survey.go index 7f37a28..93ce90a 100644 --- a/internal/dao/questionnaire_survey.go +++ b/internal/dao/questionnaire_survey.go @@ -59,6 +59,10 @@ func SendQuestionnaireSurvey(req *bundle.SendQuestionnaireSurveyRequest) (resp * Order("created_at desc"). First(&orderRecord).Error if err != nil { + if errors.Is(err, gorm.ErrRecordNotFound) { + resp.Status = 1 + return resp, nil + } return resp, err } @@ -69,8 +73,13 @@ func SendQuestionnaireSurvey(req *bundle.SendQuestionnaireSurveyRequest) (resp * Where("month = ?", month). First(&bundleBalance).Error if err != nil { + if errors.Is(err, gorm.ErrRecordNotFound) { + resp.Status = 1 + return resp, nil + } return resp, err } + bundleInfo := &model.BundleInfo{ BundleName: orderRecord.BundleName, StartAt: bundleBalance.StartAt,