|
@@ -13,8 +13,8 @@ var MasterDao = new(masterDao) |
|
|
|
|
|
|
|
|
// Get 获取站长信息 |
|
|
// Get 获取站长信息 |
|
|
func (*masterDao) Get(masterId int64) (*model.Master, error) { |
|
|
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 { |
|
|
if err != nil && err != gorm.ErrRecordNotFound { |
|
|
return nil, gerrors.WrapError(err) |
|
|
return nil, gerrors.WrapError(err) |
|
|
} |
|
|
} |
|
|