Updata:更新发送问卷逻辑
This commit is contained in:
parent
cb575bb37c
commit
b91f06d240
@ -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,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user