Updata:增加问卷调查白名单
This commit is contained in:
parent
b91f06d240
commit
651f12d8d7
@ -10,6 +10,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
|
"github.com/samber/lo"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -33,6 +34,15 @@ func SendQuestionnaireSurvey(req *bundle.SendQuestionnaireSurveyRequest) (resp *
|
|||||||
resp.Status = 1
|
resp.Status = 1
|
||||||
return resp, nil
|
return resp, nil
|
||||||
}
|
}
|
||||||
|
//判断是否在指定id列表中
|
||||||
|
userIds := []int{76, 77, 80, 82, 83, 98, 110, 119, 121, 137, 138, 140, 149, 152, 155, 156, 157, 163, 171, 178, 179, 183, 184, 187, 189, 195, 210, 212, 221, 223, 224, 225, 227, 229, 232, 233, 249, 279, 311, 274, 268, 314, 327, 291, 326, 320, 273, 319, 278, 264, 313, 296, 393, 395, 387, 371, 391, 366, 398, 400, 410, 411, 412, 419, 421, 430, 432, 540, 592, 630}
|
||||||
|
if lo.Contains(userIds, userInfo.UserId) {
|
||||||
|
resp.Status = 0
|
||||||
|
} else {
|
||||||
|
resp.Status = 1
|
||||||
|
return resp, nil
|
||||||
|
}
|
||||||
|
|
||||||
questionnaireInfo := &model.QuestionnaireSurvey{}
|
questionnaireInfo := &model.QuestionnaireSurvey{}
|
||||||
err = app.ModuleClients.BundleDB.Model(&model.QuestionnaireSurvey{}).
|
err = app.ModuleClients.BundleDB.Model(&model.QuestionnaireSurvey{}).
|
||||||
Where("user_tel = ? and deleted_at is null", req.UserTel).
|
Where("user_tel = ? and deleted_at is null", req.UserTel).
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user