Updata:更新sql
This commit is contained in:
parent
1bec8e5ebf
commit
9b22520851
@ -2,6 +2,7 @@ package dao
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"micro-bundle/internal/model"
|
||||
"micro-bundle/pb/bundle"
|
||||
"micro-bundle/pkg/app"
|
||||
@ -9,6 +10,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
func SendQuestionnaireSurvey(req *bundle.SendQuestionnaireSurveyRequest) (resp *bundle.SendQuestionnaireSurveyResponse, err error) {
|
||||
@ -36,6 +38,9 @@ func SendQuestionnaireSurvey(req *bundle.SendQuestionnaireSurveyRequest) (resp *
|
||||
Where("user_tel = ? and deleted_at is null", req.UserTel).
|
||||
First(&questionnaireInfo).Error
|
||||
if err != nil {
|
||||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||
resp.Status = 0
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
if questionnaireInfo.UserId != 0 {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user