intimate_view/goserver/var_sql.go
2020-09-04 19:00:48 +08:00

57 lines
997 B
Go

package main
// SqlTagWithCount 获取 tag
var SqlTagWithCount string = `SELECT tags FROM intimate_extractor.streamer
WHERE platform = "%s" AND tags IS NOT NULL`
//SqlQuery 获取 网站数据
var SqlQuery string = `SELECT
ie.uid,
ie.platform,
ie.user_id,
ie.user_name ,
ie.live_url ,
ie.tags ,
cl.followers ,
cl.views ,
cl.gratuity ,
cl.live_title,
cl.live_start_time ,
cl.live_end_time ,
cl.update_time
From
(
SELECT
*
FROM
intimate_extractor.streamer
WHERE
platform = "%s"
AND operator = 0
AND latest_log_uid is not NULL ) ie
JOIN intimate_extractor.collect_log cl ON ie.latest_log_uid = cl.log_uid
WHERE
ie.latest_log_uid = cl.log_uid %s limit %s,%s;`
var SqlTagWithAttr = `SELECT
ie.tags ,
cl.followers ,
cl.views ,
cl.gratuity
From
(
SELECT
*
FROM
intimate_extractor.streamer
WHERE
platform = "%s"
AND operator = 0
AND latest_log_uid is not NULL ) ie
JOIN intimate_extractor.collect_log cl
WHERE
ie.latest_log_uid = cl.log_uid;`
// sortstr := "order by cl.followers desc"