2020-08-20 11:29:22 +00:00
|
|
|
package main
|
|
|
|
|
2020-08-24 11:07:02 +00:00
|
|
|
// SqlTagWithCount 获取 tag
|
|
|
|
var SqlTagWithCount string = `SELECT tags FROM intimate_extractor.streamer
|
2020-08-20 11:29:22 +00:00
|
|
|
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"
|
2020-08-24 07:12:52 +00:00
|
|
|
AND operator = 0
|
|
|
|
AND latest_log_uid is not NULL ) ie
|
2020-09-04 11:00:48 +00:00
|
|
|
JOIN intimate_extractor.collect_log cl ON ie.latest_log_uid = cl.log_uid
|
2020-08-20 11:29:22 +00:00
|
|
|
WHERE
|
2020-08-24 07:12:52 +00:00
|
|
|
ie.latest_log_uid = cl.log_uid %s limit %s,%s;`
|
2020-08-24 11:07:02 +00:00
|
|
|
|
|
|
|
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"
|