|
|
@@ -0,0 +1,24 @@ |
|
|
|
package implement |
|
|
|
|
|
|
|
import ( |
|
|
|
"code.fnuoos.com/EggPlanet/egg_models.git/src/dao" |
|
|
|
"code.fnuoos.com/EggPlanet/egg_models.git/src/model" |
|
|
|
zhios_order_relate_logx "code.fnuoos.com/EggPlanet/egg_models.git/utils/logx" |
|
|
|
"xorm.io/xorm" |
|
|
|
) |
|
|
|
|
|
|
|
func NewAdvertisingFunctionDb(engine *xorm.Engine) dao.AdvertisingFunctionDao { |
|
|
|
return &AdvertisingFunctionDb{Db: engine} |
|
|
|
} |
|
|
|
|
|
|
|
type AdvertisingFunctionDb struct { |
|
|
|
Db *xorm.Engine |
|
|
|
} |
|
|
|
|
|
|
|
func (a AdvertisingFunctionDb) AdvertisingFunctionAll() (*[]model.AdvertisingFunction, error) { |
|
|
|
var m []model.AdvertisingFunction |
|
|
|
if err := a.Db.Find(&m); err != nil { |
|
|
|
return nil, zhios_order_relate_logx.Error(err) |
|
|
|
} |
|
|
|
return &m, nil |
|
|
|
} |