|
@@ -48,7 +48,7 @@ func GetVideoIdByKeyWord(tagName string) (video_id string, err error) {
|
|
|
func GetVideoListCount(condition string, pars []interface{}) (count int, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
o.Using("rddp")
|
|
|
- sql := `SELECT COUNT(DISTINCT b.company_id) AS count
|
|
|
+ sql := `SELECT COUNT(DISTINCT a.video_id) AS count
|
|
|
FROM video AS a `
|
|
|
if condition != "" {
|
|
|
sql += condition
|
|
@@ -60,7 +60,7 @@ func GetVideoListCount(condition string, pars []interface{}) (count int, err err
|
|
|
func GetVideoList(condition string, pars []interface{}, startSize, pageSize int) (items []*VideoList, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
o.Using("rddp")
|
|
|
- sql := `SELECT a.*,GROUP_CONCAT(c.tags_name ORDER BY b.product_id ASC SEPARATOR '/') AS tags_name FROM video AS a
|
|
|
+ sql := `SELECT a.*,GROUP_CONCAT(c.tags_name SEPARATOR '/') AS tags_name FROM video AS a
|
|
|
INNER JOIN video_tags AS b ON a.video_id=b.video_id
|
|
|
INNER JOIN tags AS c ON b.tags_id=c.tags_id `
|
|
|
if condition != "" {
|