ceshi
This commit is contained in:
@@ -29,7 +29,7 @@ func GetBillExpend(db *DaoDB, userID string, billType int, fromTime, toTime time
|
|||||||
sql := `
|
sql := `
|
||||||
SELECT b.*
|
SELECT b.*
|
||||||
FROM user_bill a
|
FROM user_bill a
|
||||||
JOIN bill_expend b ON b.bill_id = a.bill_id
|
LEFT JOIN bill_expend b ON b.bill_id = a.bill_id
|
||||||
WHERE a.deleted_at = ?
|
WHERE a.deleted_at = ?
|
||||||
`
|
`
|
||||||
sqlParams := []interface{}{utils.DefaultTimeValue}
|
sqlParams := []interface{}{utils.DefaultTimeValue}
|
||||||
@@ -49,7 +49,7 @@ func GetBillExpend(db *DaoDB, userID string, billType int, fromTime, toTime time
|
|||||||
sql += ` AND b.created_at <= ?`
|
sql += ` AND b.created_at <= ?`
|
||||||
sqlParams = append(sqlParams, toTime)
|
sqlParams = append(sqlParams, toTime)
|
||||||
}
|
}
|
||||||
err = GetRow(db, &billExpends, sql, sqlParams)
|
err = GetRows(db, &billExpends, sql, sqlParams)
|
||||||
return billExpends, err
|
return billExpends, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user