From cb575bb37cfeb451431a6ce7337af23609bf08a7 Mon Sep 17 00:00:00 2001 From: "jiaji.H" Date: Wed, 11 Mar 2026 21:48:51 +0800 Subject: [PATCH] =?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 }