|
|
@@ -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) |
|
|
|
} |
|
|
|