diff --git a/internal/business/comm/db/db_user_push_for_jg.go b/internal/business/comm/db/db_user_push_for_jg.go index 12988f5..3b94db6 100644 --- a/internal/business/comm/db/db_user_push_for_jg.go +++ b/internal/business/comm/db/db_user_push_for_jg.go @@ -40,8 +40,7 @@ func (*dbUserPushForJg) UserPushForJgInsert(uid, masterId int64, pushAlia string // UserPushForJgUpdate 修改某条配置信息 func (*dbUserPushForJg) UserPushForJgUpdate(uid, masterId int64, pushAlia string) bool { - cfg := model.UserPushForJg{Uid: uid, PushAlia: pushAlia, MasterId: masterId} - err := db.DB.Where("`uid` = ? and `master_id` = ?", uid, masterId).Update(&cfg).Error + err := db.DB.Model(&model.UserPushForJg{}).Where("`uid` = ? and `master_id` = ?", uid, masterId).Update("push_alia", pushAlia).Error if err != nil { logx.Error(err) return false diff --git a/internal/business/domain/user/service/auth.go b/internal/business/domain/user/service/auth.go index 0e53c2e..072255e 100644 --- a/internal/business/domain/user/service/auth.go +++ b/internal/business/domain/user/service/auth.go @@ -63,7 +63,7 @@ func (*authService) SignIn(ctx context.Context, phoneNumber, code string, master if pushAlia != "" { userPushForJg, err := db.DbUserPushForJg.UserPushForJgGetOne(strconv.FormatInt(user.Id, 10), masterId) - if err != nil && err.Error() != "record not found" { + if err != nil { return false, 0, "", 0, err } if userPushForJg == nil {