Browse Source

update

master
DengBiao 2 years ago
parent
commit
2bdee6b9e8
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      internal/business/comm/db/db_user_push_for_jg.go

+ 4
- 1
internal/business/comm/db/db_user_push_for_jg.go View File

@@ -17,7 +17,10 @@ var DbUserPushForJg = new(dbUserPushForJg)
// UserPushForJgGetOne 获取一条记录 // UserPushForJgGetOne 获取一条记录
func (*dbUserPushForJg) UserPushForJgGetOne(uid string, masterId int64) (*model.UserPushForJg, error) { func (*dbUserPushForJg) UserPushForJgGetOne(uid string, masterId int64) (*model.UserPushForJg, error) {
var cfgList model.UserPushForJg var cfgList model.UserPushForJg
if err := db.DB.Where("`uid` = ? and `master_id` = ?", uid, masterId).First(&cfgList).Error; err != nil && err.Error() != "record not found" {
if err := db.DB.Where("`uid` = ? and `master_id` = ?", uid, masterId).First(&cfgList).Error; err != nil {
if err.Error() != "record not found" {
return nil, nil
}
return nil, gerrors.WrapError(err) return nil, gerrors.WrapError(err)
} }
return &cfgList, nil return &cfgList, nil


Loading…
Cancel
Save