优化代码

This commit is contained in:
Sakurasan committed 2023-04-27 02:31:35 +08:00
1 parent a100d75c00
commit a202dfadca
2 files changed
+44 -35

No files matched your search

+1 -1
View File
@@ -58,7 +58,7 @@ func QueryUsage(from, to string) ([]CalcUsage, error) {
--SUM(prompt_units) AS prompt_units,
-- SUM(completion_units) AS completion_units,
SUM(total_unit) AS total_unit,
SUM(cost) AS cost`).
printf('%.6f', SUM(cost)) AS cost`).
Group("user_id").
Where("date >= ? AND date < ?", from, to).
Find(&results).Error