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.
 
 
 
 
 
 

29 lines
457 B

package service
import (
"github.com/TremblingV5/DouTok/applications/publish/dal/model"
)
func QueryVideoFromRBDById(id uint64) (*model.Video, error) {
v, err := Do.Where(
Video.ID.Eq(id),
).First()
if err != nil {
return v, err
}
return v, nil
}
func QuerySomeVideoFromRDBByIds(id ...uint64) ([]*model.Video, error) {
videos, err := Do.Where(
Video.ID.In(id...),
).Find()
if err != nil {
return videos, err
}
return videos, nil
}