Merge branch 'master' into release
This commit is contained in:
commit
e7a476a8dd
@ -159,6 +159,26 @@ r.get('/channel/:chid/opay/bar', async (c, n) => {
|
||||
if (result.rowCount === 0) setting = {}
|
||||
setting = result.rows[0]
|
||||
|
||||
if (result.rowCount > 0) {
|
||||
text = `select sum(list.price) as total from "public"."opay_donate_list" list
|
||||
left join "public"."twitch" tw
|
||||
on tw.opayid = list.opayid
|
||||
where
|
||||
tw.opayid != ''
|
||||
and tw.id = $1
|
||||
and ctime >= $2
|
||||
group by list.opayid`
|
||||
values = [chid, setting.start_date]
|
||||
let priceResult = await c.db.query({
|
||||
text, values
|
||||
})
|
||||
if (priceResult.rowCount > 0) {
|
||||
setting.total = priceResult.row[0].price
|
||||
} else {
|
||||
setting.total = 0
|
||||
}
|
||||
}
|
||||
|
||||
c.obj = resObject('Success', {setting})
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user