1
This commit is contained in:
@@ -61,7 +61,7 @@ func GetSimFlowIncomeSum(db *sqlx.DB, iccid string, createdAtBegin, createdAtEnd
|
|||||||
SELECT SUM(
|
SELECT SUM(
|
||||||
IF(flow_unit = 'KB', flow,
|
IF(flow_unit = 'KB', flow,
|
||||||
IF(flow_unit = 'MB', ROUND(flow * 1024),
|
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
|
) flow, icc_id, 'KB' flow_unit
|
||||||
|
|||||||
@@ -13,11 +13,13 @@ func Init(r *gin.Engine) {
|
|||||||
user.GET("/getTokenInfo", controllers.GetTokenInfo)
|
user.GET("/getTokenInfo", controllers.GetTokenInfo)
|
||||||
user.POST("/logout", controllers.Logout)
|
user.POST("/logout", controllers.Logout)
|
||||||
user.POST("/updateUser", controllers.UpdateUser)
|
user.POST("/updateUser", controllers.UpdateUser)
|
||||||
|
|
||||||
//app
|
//app
|
||||||
app := v2.Group("/app")
|
app := v2.Group("/app")
|
||||||
app.GET("/getApps", controllers.GetApps)
|
app.GET("/getApps", controllers.GetApps)
|
||||||
app.POST("/addApp", controllers.AddApp)
|
app.POST("/addApp", controllers.AddApp)
|
||||||
app.POST("/delApp", controllers.DelApp)
|
app.POST("/delApp", controllers.DelApp)
|
||||||
|
|
||||||
//print
|
//print
|
||||||
print := v2.Group("/print")
|
print := v2.Group("/print")
|
||||||
print.POST("/addPrinters", controllers.AddPrinters)
|
print.POST("/addPrinters", controllers.AddPrinters)
|
||||||
@@ -27,6 +29,7 @@ func Init(r *gin.Engine) {
|
|||||||
print.POST("/testPrint", controllers.TestPrint)
|
print.POST("/testPrint", controllers.TestPrint)
|
||||||
print.GET("/getPrintMessages", controllers.GetPrintMessages)
|
print.GET("/getPrintMessages", controllers.GetPrintMessages)
|
||||||
print.GET("/getPrinterReport", controllers.GetPrinterReport)
|
print.GET("/getPrinterReport", controllers.GetPrinterReport)
|
||||||
|
|
||||||
//order
|
//order
|
||||||
order := v2.Group("/order")
|
order := v2.Group("/order")
|
||||||
order.POST("/createOrder", controllers.CreateOrder)
|
order.POST("/createOrder", controllers.CreateOrder)
|
||||||
|
|||||||
15
services/list_test.go
Normal file
15
services/list_test.go
Normal 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)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user