From fbf74734c6916306de1171c89c51bc5374b8d43c Mon Sep 17 00:00:00 2001 From: "jiaji.H" Date: Wed, 11 Mar 2026 21:42:51 +0800 Subject: [PATCH 1/3] =?UTF-8?q?Updata=EF=BC=9A=E6=9B=B4=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=80=BC=E8=8E=B7=E5=8F=96=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/dao/questionnaire_survey.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/dao/questionnaire_survey.go b/internal/dao/questionnaire_survey.go index 34647f8..a66fe0f 100644 --- a/internal/dao/questionnaire_survey.go +++ b/internal/dao/questionnaire_survey.go @@ -72,7 +72,7 @@ func SendQuestionnaireSurvey(req *bundle.SendQuestionnaireSurveyRequest) (resp * ExpiredAt: bundleBalance.ExpiredAt, BundleAccountNumber: 3, BundleVideoNumber: bundleBalance.BundleLimitVideoConsumptionNumber, - IncreaseVideoNumber: bundleBalance.IncreaseLimitVideoConsumptionNumber, + IncreaseVideoNumber: bundleBalance.IncreaseVideoConsumptionNumber, BundleImageNumber: bundleBalance.BundleLimitImageConsumptionNumber, BundleDataNumber: bundleBalance.BundleLimitDataAnalysisConsumptionNumber, BundleCompetitiveNumber: bundleBalance.BundleLimitCompetitiveConsumptionNumber, From cb575bb37cfeb451431a6ce7337af23609bf08a7 Mon Sep 17 00:00:00 2001 From: "jiaji.H" Date: Wed, 11 Mar 2026 21:48:51 +0800 Subject: [PATCH 2/3] =?UTF-8?q?Updata=EF=BC=9A=E6=9B=B4=E6=96=B0=E6=95=88?= =?UTF-8?q?=E9=AA=8C=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/dao/questionnaire_survey.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/dao/questionnaire_survey.go b/internal/dao/questionnaire_survey.go index a66fe0f..7f37a28 100644 --- a/internal/dao/questionnaire_survey.go +++ b/internal/dao/questionnaire_survey.go @@ -36,6 +36,7 @@ func SendQuestionnaireSurvey(req *bundle.SendQuestionnaireSurveyRequest) (resp * questionnaireInfo := &model.QuestionnaireSurvey{} err = app.ModuleClients.BundleDB.Model(&model.QuestionnaireSurvey{}). Where("user_tel = ? and deleted_at is null", req.UserTel). + Order("created_at desc"). First(&questionnaireInfo).Error if err != nil { if errors.Is(err, gorm.ErrRecordNotFound) { @@ -45,6 +46,10 @@ func SendQuestionnaireSurvey(req *bundle.SendQuestionnaireSurveyRequest) (resp * } } if questionnaireInfo.UserId != 0 { + if questionnaireInfo.SurveyStatus == msg.QuestionnaireSent { + resp.Status = 0 + return resp, nil + } resp.Status = 2 return resp, nil } From b91f06d24089acf9f18e417c79088d16b257f25c Mon Sep 17 00:00:00 2001 From: "jiaji.H" Date: Wed, 11 Mar 2026 22:03:54 +0800 Subject: [PATCH 3/3] =?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,