fix 活跃统计 筛选人
This commit is contained in:
parent
dc8fea04b6
commit
1f3e1752c5
@ -9,8 +9,8 @@ function init(){
|
||||
}
|
||||
|
||||
async function activeCount(userid){
|
||||
const sql = `select count(*) from active where date_sub(curdate(), INTERVAL 30 DAY) <= date(activedate);`
|
||||
const sql2 = `select * from active where date_sub(curdate(), INTERVAL 30 DAY) <= date(activedate);`
|
||||
const sql = `select count(*) from active where date_sub(curdate(), INTERVAL 30 DAY) <= date(activedate) and userid='${userid}';`
|
||||
const sql2 = `select * from active where date_sub(curdate(), INTERVAL 30 DAY) <= date(activedate) and userid='${userid}';`
|
||||
|
||||
const count = (await query(sql))[0]["count(*)"]
|
||||
const list = await query(sql2)
|
||||
@ -92,5 +92,5 @@ function createMessage({msg}){
|
||||
}
|
||||
onMessageCreate(createMessage)
|
||||
|
||||
const res = await activeCount()
|
||||
const res = await activeCount('384023542260794903')
|
||||
console.log(res)
|
Loading…
Reference in New Issue
Block a user