Initial commit

This commit is contained in:
Donny
2019-04-22 20:46:32 +08:00
commit 49ab8aadd1
25441 changed files with 4055000 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
package goblin
import (
"context"
"go-common/app/interface/main/tv/model"
)
const (
_getChl = "SELECT id, title, `desc`, splash FROM tv_channel WHERE deleted = 0"
)
// ChlInfo .
func (d *Dao) ChlInfo(c context.Context) (chls []*model.Channel, err error) {
rows, err := d.db.Query(c, _getChl)
if err != nil {
return
}
defer rows.Close()
for rows.Next() {
li := &model.Channel{}
if err = rows.Scan(&li.ID, &li.Title, &li.Desc, &li.Splash); err != nil {
return
}
chls = append(chls, li)
}
return
}