You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
327 B
20 lines
327 B
4 years ago
|
package jyy
|
||
|
|
||
|
import (
|
||
|
"recook/internal/v2/model/jyy"
|
||
|
"time"
|
||
|
|
||
|
"git.oa00.com/go/mysql"
|
||
|
)
|
||
|
|
||
|
type logic struct {
|
||
|
}
|
||
|
|
||
|
var Logic = logic{}
|
||
|
|
||
|
func (o logic) Banners() (res jyy.Banner, err error) {
|
||
|
now := time.Now()
|
||
|
mysql.Db.Where("start < ?", now).Where("end > ?", now).Order("order_sort asc").Order("id desc").Find(&res)
|
||
|
return
|
||
|
}
|