Browse Source

update auth

master
DengBiao 1 year ago
parent
commit
8b69ea3de0
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      internal/business/domain/user/repo/master_dao.go

+ 2
- 2
internal/business/domain/user/repo/master_dao.go View File

@@ -13,8 +13,8 @@ var MasterDao = new(masterDao)

// Get 获取站长信息
func (*masterDao) Get(masterId int64) (*model.Master, error) {
var master = model.Master{MasterId: masterId}
err := db.DB.First(&master).Error
var master = model.Master{}
err := db.DB.Where("master_id = ?", masterId).First(&master).Error
if err != nil && err != gorm.ErrRecordNotFound {
return nil, gerrors.WrapError(err)
}


Loading…
Cancel
Save