This commit is contained in:
邹宗楠
2022-06-08 14:52:46 +08:00
parent cac838e8ee
commit 80c079db4e
3 changed files with 19 additions and 1 deletions

View File

@@ -61,7 +61,7 @@ func GetSimFlowIncomeSum(db *sqlx.DB, iccid string, createdAtBegin, createdAtEnd
SELECT SUM(
IF(flow_unit = 'KB', flow,
IF(flow_unit = 'MB', ROUND(flow * 1024),
IF(flow_unit = 'GB', ROUND(flow * 1024 * 1024), 0)
IF(flow_unit = 'GB', ROUND(flow * 1024 * 1024), 0)
)
)
) flow, icc_id, 'KB' flow_unit