From 8b69ea3de0576e8478773ee4cc7c8da786c34a8d Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Sat, 17 Dec 2022 00:29:14 +0800 Subject: [PATCH] update auth --- internal/business/domain/user/repo/master_dao.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) }