DengBiao 2 anni fa
parent
commit
f0cf554897
2 ha cambiato i file con 2 aggiunte e 3 eliminazioni
  1. +1
    -2
      internal/business/comm/db/db_user_push_for_jg.go
  2. +1
    -1
      internal/business/domain/user/service/auth.go

+ 1
- 2
internal/business/comm/db/db_user_push_for_jg.go Vedi File

@@ -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


+ 1
- 1
internal/business/domain/user/service/auth.go Vedi File

@@ -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 {


Caricamento…
Annulla
Salva