|
|
@@ -22,3 +22,14 @@ func (a AdvertisingSpaceDb) AdvertisingSpaceAll() (*[]model.AdvertisingSpace, er |
|
|
|
} |
|
|
|
return &m, nil |
|
|
|
} |
|
|
|
func (a AdvertisingSpaceDb) GetAdvertisingSpace(id string) (m *model.AdvertisingSpace, err error) { |
|
|
|
m = new(model.AdvertisingSpace) |
|
|
|
has, err := a.Db.Where("id=?", id).Get(m) |
|
|
|
if err != nil { |
|
|
|
return nil, zhios_order_relate_logx.Error(err) |
|
|
|
} |
|
|
|
if has == false { |
|
|
|
return nil, nil |
|
|
|
} |
|
|
|
return m, nil |
|
|
|
} |