Files
baseapi/platformapi/mtwmapi/bill_list_test.go
邹宗楠 fe68387bf9 1
2023-08-22 16:20:36 +08:00

33 lines
855 B
Go

package mtwmapi
import (
"git.rosy.net.cn/jx-callback/globals"
"testing"
"time"
)
func TestBillList(t *testing.T) {
now := time.Now()
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)
param := &Bill{
AppPoiCode: "18833517",
StartDate: from.Unix(),
EndDate: to.Unix(),
Offset: 0,
Limit: 200,
AccessToken: api.token,
}
data, settleId, err := api.GetStoreBillList(param)
if err != nil {
globals.SugarLogger.Debugf("err := %v", err)
return
}
globals.SugarLogger.Debugf("settleId := %d", settleId)
for _, v := range data {
globals.SugarLogger.Debugf("OrderId : %s , TimingFee : %d , DeliveryFee : %d , PlatformSettlement : %d ", v.OrderId, v.TimingFee, v.DeliveryFee, v.PlatformSettlement)
}
}