|
@@ -0,0 +1,25 @@ |
|
|
|
|
|
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 NewEggAccessTotalDb(engine *xorm.Engine) dao.EggAccessTotalDao { |
|
|
|
|
|
return &EggAccessTotalDb{Db: engine} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
type EggAccessTotalDb struct { |
|
|
|
|
|
Db *xorm.Engine |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (e EggAccessTotalDb) EggAccessTotalGetByPage(year, week, page, limit int) ([]model.EggAccessTotal, error) { |
|
|
|
|
|
var m []model.EggAccessTotal |
|
|
|
|
|
err := e.Db.Where("year = ?", year).And("week = ?", week).Limit(limit, (page-1)*limit).Find(&m) |
|
|
|
|
|
if err != nil { |
|
|
|
|
|
return nil, zhios_order_relate_logx.Error(err.Error()) |
|
|
|
|
|
} |
|
|
|
|
|
return m, nil |
|
|
|
|
|
} |