diff --git a/internal/business/domain/user/repo/master_dao.go b/internal/business/domain/user/repo/master_dao.go index d734a07..d006187 100644 --- a/internal/business/domain/user/repo/master_dao.go +++ b/internal/business/domain/user/repo/master_dao.go @@ -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) }