Updata:更新sql
This commit is contained in:
parent
fa3bf5c824
commit
022d246765
@ -103,11 +103,11 @@ func SendQuestionnaireSurvey(req *bundle.SendQuestionnaireSurveyRequest) (resp *
|
||||
}
|
||||
|
||||
func GetQuestionnaireSurveyInfo(req *bundle.GetQuestionnaireSurveyInfoRequest) (data *model.QuestionnaireSurvey, err error) {
|
||||
questionnaireInfo := &model.QuestionnaireSurvey{}
|
||||
data = &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
|
||||
First(&data).Error
|
||||
if err != nil {
|
||||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||
return nil, errors.New("问卷信息不存在")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user