fix: use withdrawals table consistently
Build docker and publish / build (20.15.1) (push) Failing after 8m20s
Build docker and publish / build (20.15.1) (push) Failing after 8m20s
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
UPDATE `user` u
|
||||
JOIN (
|
||||
SELECT user_id, COALESCE(SUM(amount), 0) AS pending_total
|
||||
FROM user_withdrawal
|
||||
FROM withdrawals
|
||||
WHERE status = 0
|
||||
GROUP BY user_id
|
||||
) p ON u.id = p.user_id
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
UPDATE `user` u
|
||||
JOIN (
|
||||
SELECT user_id, COALESCE(SUM(amount), 0) AS pending_total
|
||||
FROM user_withdrawal
|
||||
FROM withdrawals
|
||||
WHERE status = 0
|
||||
GROUP BY user_id
|
||||
) p ON u.id = p.user_id
|
||||
@@ -38,7 +38,7 @@ SELECT
|
||||
NOW() AS created_at
|
||||
FROM (
|
||||
SELECT user_id, COALESCE(SUM(amount), 0) AS pending_total
|
||||
FROM user_withdrawal
|
||||
FROM withdrawals
|
||||
WHERE status = 0
|
||||
GROUP BY user_id
|
||||
HAVING pending_total > 0
|
||||
|
||||
@@ -174,5 +174,5 @@ type Withdrawal struct {
|
||||
}
|
||||
|
||||
func (*Withdrawal) TableName() string {
|
||||
return "user_withdrawal"
|
||||
return "withdrawals"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user