fix: tolerate missing recharge coin quantity
This commit is contained in:
parent
905da26cf8
commit
e7143a5178
@ -161,7 +161,7 @@ func (r *MySQLRepository) StartRechargeReconciler(ctx context.Context, logger *s
|
||||
func (r *MySQLRepository) listOfficialRechargeRows(ctx context.Context, since time.Time,
|
||||
limit int) ([]officialRechargeRow, error) {
|
||||
rows, err := r.db.QueryContext(ctx, `
|
||||
SELECT CAST(o.id AS CHAR), o.user_id, o.sys_origin, o.pay_platform, o.unit_price, o.coin_quantity, o.create_time,
|
||||
SELECT CAST(o.id AS CHAR), o.user_id, o.sys_origin, o.pay_platform, o.unit_price, 0 AS coin_quantity, o.create_time,
|
||||
u.id, u.origin_sys, IFNULL(NULLIF(u.country_code, ''), ?),
|
||||
IFNULL(NULLIF(u.country_name, ''), IFNULL(NULLIF(u.country_code, ''), ?)),
|
||||
IFNULL(u.is_del, 0), u.create_time, u.update_time
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user