This commit is contained in:
邹宗楠
2023-08-22 16:20:36 +08:00
parent 0802af86e4
commit fe68387bf9
4 changed files with 16 additions and 14 deletions

View File

@@ -13,11 +13,12 @@ const (
//#region 获取门店订单的结算信息 bill/list //#region 获取门店订单的结算信息 bill/list
type Bill struct { type Bill struct {
AppPoiCode string `json:"app_poi_code"` // APP方门店id传商家中台系统里门店的编码。如商家在操作绑定门店至开放平台应用中时未绑定三方门店id信息则默认APP方门店id与美团门店id相同。 AppPoiCode string `json:"app_poi_code"` // APP方门店id传商家中台系统里门店的编码。如商家在操作绑定门店至开放平台应用中时未绑定三方门店id信息则默认APP方门店id与美团门店id相同。
StartDate int64 `json:"start_date"` // 秒级时间戳 StartDate int64 `json:"start_date"` // 秒级时间戳
EndDate int64 `json:"end_date"` // 秒级时间戳 EndDate int64 `json:"end_date"` // 秒级时间戳
Offset int64 `json:"offset"` Offset int64 `json:"offset"`
Limit int64 `json:"limit"` Limit int64 `json:"limit"`
AccessToken string `json:"access_token"`
} }
// GetStoreBillList 获取门店的订单账单 // GetStoreBillList 获取门店的订单账单

View File

@@ -8,14 +8,15 @@ import (
func TestBillList(t *testing.T) { func TestBillList(t *testing.T) {
now := time.Now() now := time.Now()
from := time.Date(now.Year(), now.Month(), now.Day()-7, 0, 0, 0, 0, time.Local) from := time.Date(now.Year(), now.Month(), now.Day()-2, 0, 0, 0, 0, time.Local)
to := time.Date(now.Year(), now.Month(), now.Day()-1, 23, 59, 59, 59, time.Local) to := time.Date(now.Year(), now.Month(), now.Day()-1, 23, 59, 59, 59, time.Local)
param := &Bill{ param := &Bill{
AppPoiCode: "9202390", AppPoiCode: "18833517",
StartDate: from.Unix(), StartDate: from.Unix(),
EndDate: to.Unix(), EndDate: to.Unix(),
Offset: 0, Offset: 0,
Limit: 200, Limit: 200,
AccessToken: api.token,
} }
data, settleId, err := api.GetStoreBillList(param) data, settleId, err := api.GetStoreBillList(param)

View File

@@ -26,7 +26,7 @@ func init() {
//api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "") //api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "")
//商超 //商超
api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_uV2meUDlxZ1pYj9Uiu9OTw") //token_n4TwqCntWWuvQwAawzxC0w api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_qLqTxHqWzajT7ep19a1Duw") //token_n4TwqCntWWuvQwAawzxC0w
cookieStr := ` cookieStr := `
acctId=57396785; token=0bWbK5VbK50E2BmIhIH2zHB-am_y7mB37yXHm6RLZWx4*; wmPoiId=-1; acctId=57396785; token=0bWbK5VbK50E2BmIhIH2zHB-am_y7mB37yXHm6RLZWx4*; wmPoiId=-1;
` `

View File

@@ -19,7 +19,7 @@ func TestOrderViewStatus(t *testing.T) {
} }
func TestOrderGetOrderDetail(t *testing.T) { func TestOrderGetOrderDetail(t *testing.T) {
result, err := api.OrderGetOrderDetail(900658760944919842, false) result, err := api.OrderGetOrderDetail(1100687990339131759, false)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
@@ -35,7 +35,7 @@ func TestOrderGetOrderDetail(t *testing.T) {
} }
func TestOrderGetOrderDetail2(t *testing.T) { func TestOrderGetOrderDetail2(t *testing.T) {
result, err := api.OrderGetOrderDetail2(1000533651036489997, false) result, err := api.OrderGetOrderDetail2(1100687990339131759, false)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }