1234567891011121314151617181920212223 |
- package models
- import (
- "time"
- "github.com/beego/beego/v2/client/orm"
- )
- type Banner struct {
- BannerId int `orm:"pk" description:"id"`
- ImageUrl string `description:"图片地址"`
- CreateTime time.Time `description:"创建时间"`
- ModifyTime time.Time `description:"修改时间"`
- JumpUrl string `description:"跳转路径"`
- Remake string `description:"备注"`
- }
- func GetBannerList(startSize, pageSize int) (items []*Banner, err error) {
- o := orm.NewOrm()
- sql := `SELECT * FROM banner LIMIT ?,?`
- _, err = o.Raw(sql, startSize, pageSize).QueryRows(&items)
- return
- }
|