aa
This commit is contained in:
34
platformapi/mtunionapi/order.go
Normal file
34
platformapi/mtunionapi/order.go
Normal file
@@ -0,0 +1,34 @@
|
||||
package mtunionapi
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
MtUnionOrderTypeTG=0 //团购订单
|
||||
MtUnionOrderTypeJD=2 //酒店订单
|
||||
MtUnionOrderTypeWM=4 //外卖订单
|
||||
MtUnionOrderTypeHF=5 //话费订单
|
||||
MtUnionOrderTypeSG=6 //闪购订单
|
||||
)
|
||||
|
||||
func (a *API) OrderList(orderType int, startTime,endTime int64,page int) (url string, err error) {
|
||||
result, err := a.AccessAPI("orderList", false, map[string]interface{}{
|
||||
"ts": time.Now().Unix(),
|
||||
"type": orderType,
|
||||
"startTime": startTime,
|
||||
"endTime":endTime,
|
||||
"page":page,
|
||||
"limit":100,
|
||||
})
|
||||
if err == nil {
|
||||
if utils.MustInterface2Int64(result["status"]) != 0 {
|
||||
return "",fmt.Errorf(result["des"].(string))
|
||||
}else {
|
||||
return result["data"].(string),err
|
||||
}
|
||||
}
|
||||
return url, err
|
||||
}
|
||||
1
platformapi/mtunionapi/order_test.go
Normal file
1
platformapi/mtunionapi/order_test.go
Normal file
@@ -0,0 +1 @@
|
||||
package mtunionapi
|
||||
Reference in New Issue
Block a user