Updata:更新发送问卷逻辑
This commit is contained in:
parent
cb575bb37c
commit
b91f06d240
@ -59,6 +59,10 @@ func SendQuestionnaireSurvey(req *bundle.SendQuestionnaireSurveyRequest) (resp *
|
|||||||
Order("created_at desc").
|
Order("created_at desc").
|
||||||
First(&orderRecord).Error
|
First(&orderRecord).Error
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||||
|
resp.Status = 1
|
||||||
|
return resp, nil
|
||||||
|
}
|
||||||
return resp, err
|
return resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,8 +73,13 @@ func SendQuestionnaireSurvey(req *bundle.SendQuestionnaireSurveyRequest) (resp *
|
|||||||
Where("month = ?", month).
|
Where("month = ?", month).
|
||||||
First(&bundleBalance).Error
|
First(&bundleBalance).Error
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||||
|
resp.Status = 1
|
||||||
|
return resp, nil
|
||||||
|
}
|
||||||
return resp, err
|
return resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
bundleInfo := &model.BundleInfo{
|
bundleInfo := &model.BundleInfo{
|
||||||
BundleName: orderRecord.BundleName,
|
BundleName: orderRecord.BundleName,
|
||||||
StartAt: bundleBalance.StartAt,
|
StartAt: bundleBalance.StartAt,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user