Commit 786b457d authored by chenweijian's avatar chenweijian

im check

parent 80752959
......@@ -151,7 +151,7 @@ func GetCpInvite(model *domain.Model, userId, userIdInvite uint64, status cp_e.C
func GetCpInviteById(model *domain.Model, id, userId uint64) (*CpInvite, error) {
res := new(CpInvite)
err := model.DB().Model(CpInvite{}).Where(CpInvite{Id: id}).Where("user_id = ? or invite_userId = ?", userId, userId).First(&res).Error
err := model.DB().Model(CpInvite{}).Where(CpInvite{Id: id}).Where("user_id = ? or invite_user_id = ?", userId, userId).First(&res).Error
if err != nil {
if err == gorm.ErrRecordNotFound {
return nil, nil
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment