Browse Source

update

master
DengBiao 2 years ago
parent
commit
f0cf554897
2 changed files with 2 additions and 3 deletions
  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 View File

@@ -40,8 +40,7 @@ func (*dbUserPushForJg) UserPushForJgInsert(uid, masterId int64, pushAlia string


// UserPushForJgUpdate 修改某条配置信息 // UserPushForJgUpdate 修改某条配置信息
func (*dbUserPushForJg) UserPushForJgUpdate(uid, masterId int64, pushAlia string) bool { 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 { if err != nil {
logx.Error(err) logx.Error(err)
return false return false


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

@@ -63,7 +63,7 @@ func (*authService) SignIn(ctx context.Context, phoneNumber, code string, master


if pushAlia != "" { if pushAlia != "" {
userPushForJg, err := db.DbUserPushForJg.UserPushForJgGetOne(strconv.FormatInt(user.Id, 10), masterId) 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 return false, 0, "", 0, err
} }
if userPushForJg == nil { if userPushForJg == nil {


Loading…
Cancel
Save