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

View File

@@ -13,11 +13,13 @@ func Init(r *gin.Engine) {
user.GET("/getTokenInfo", controllers.GetTokenInfo)
user.POST("/logout", controllers.Logout)
user.POST("/updateUser", controllers.UpdateUser)
//app
app := v2.Group("/app")
app.GET("/getApps", controllers.GetApps)
app.POST("/addApp", controllers.AddApp)
app.POST("/delApp", controllers.DelApp)
//print
print := v2.Group("/print")
print.POST("/addPrinters", controllers.AddPrinters)
@@ -27,6 +29,7 @@ func Init(r *gin.Engine) {
print.POST("/testPrint", controllers.TestPrint)
print.GET("/getPrintMessages", controllers.GetPrintMessages)
print.GET("/getPrinterReport", controllers.GetPrinterReport)
//order
order := v2.Group("/order")
order.POST("/createOrder", controllers.CreateOrder)

15
services/list_test.go Normal file
View File

@@ -0,0 +1,15 @@
package services
import (
"fmt"
"sort"
"testing"
)
func Test_list(b *testing.T) {
//aa := []string{"app_key", "format", "jd_param_json", "timestamp", "token", "v"}
aa := []string{"format", "jd_param_json", "app_key", "timestamp", "token", "v"}
fmt.Println(aa)
sort.Strings(aa)
fmt.Println(aa)
}