This commit is contained in:
richboo111
2023-02-23 17:17:13 +08:00
7 changed files with 18 additions and 16 deletions

View File

@@ -7,7 +7,7 @@ import (
)
func TestOrderGet(t *testing.T) {
result, err := api.OrderGet("5034788341689687660")
result, err := api.OrderGet("4071470101033382467")
if err != nil {
t.Fatal(err)
} else {
@@ -51,7 +51,7 @@ func TestOrderListAll(t *testing.T) {
}
func TestOrderPartRefundGet(t *testing.T) {
result, err := api.OrderPartRefundGet("115082650031169457")
result, err := api.OrderPartRefundGet("4071470101033382467")
if err != nil {
t.Fatal(err)
} else {

View File

@@ -34,7 +34,7 @@ func init() {
//api = New("0e12f461-2e6b-49ca-bce6-935c6672362d", "f2ed33075faf4773a47e065acd79532b", "aed14cbbecac4456843570e90c5f46ec")
// 京东超市 381564
api = New("fe07cad2-d366-424b-8e85-9b81d7987cba", "8376b3071c5b49fb96a4c82be0dbc104", "a55b47042d5845018834f42d42ffafb7")
api = New("f99d25b8-33a6-4251-a97c-5e24b80b0005", "d2d1e2e3213d4320bc2712a684307831", "1750f5b9848d4a6492c1c20b487074da")
//prod zs
// api = New("6f8d3290-0120-4ad7-8b53-943c67c84f3f", "789279b9ae814ba091ac52815566b54d", "5d668cd227644637bb0fd73ed8118ec8")
// const cookieValue = "YYJV3NHVBPHLD36FWP6F3EM5PTXJ2XZQS7U4HWRIDPP4IWGUKUIB4XG5N26CZRDLDF7PKOXBPD6BNTUAJLETLZOIWMCVFI3K6MYZIY4QBIXIMXYDJNUKFGJVQTN5356SAD6WPCIHWNQAG7DDMF7L7S3SHCT3RM3CQG7IJIPUQ3THS5UIUYWMKINM7ETUOQB7OBPOPZVCT3ZJY55243TDVXLO25PP4UYSPTTPMNQ7HPMWOJKJ3BJWGVHD243MXH7NZWW264TKN5UOCJBSSSOKD2QQII"

View File

@@ -132,7 +132,7 @@ func TestOrderQuery2(t *testing.T) {
// PageSize: 99999,
//})
orderList, _, err := api.OrderQuery2(&OrderQueryParam{
OrderID: 2227217383000174,
OrderID: 2304566038000691,
})
t.Log(utils.Format4Output(orderList, false))
if err != nil {

View File

@@ -28,18 +28,18 @@ func TestShopQuery(t *testing.T) {
func TestShopCreate(t *testing.T) {
shopInfo := &ShopInfo{
ShopID: "668752",
ShopName: "创新百货超市(江津玉观店)",
Category: ShopCategoryFruit,
SecondCategory: ShopCategoryFruitFruit,
ShopID: "668840",
ShopName: "创新百货(和泰家园店)",
Category: ShopCategoryMarket,
SecondCategory: ShopCategoryMarketConvenience,
ContactName: "店主",
ContactPhone: "15019883393",
ShopAddress: "重庆市江津区龙珠街31号附14号",
ShopLng: 106463489,
ShopLat: 29316689,
ContactPhone: "13101061593",
ShopAddress: "重庆市渝北区龙溪街道红锦大道68号",
ShopLng: 106557092,
ShopLat: 29784067,
CoordinateType: CoordinateTypeMars,
DeliveryServiceCodes: utils.Int2Str(DeliveryServiceCodeRapid),
BusinessHours: "[{\"beginTime\":\"08:00\",\"endTime\":\"22:0\"}]",
BusinessHours: "[{\"beginTime\":\"07:00\",\"endTime\":\"23:59\"}]",
}
_, err := api.ShopCreate(shopInfo)
if err != nil {

View File

@@ -11,7 +11,7 @@ import (
)
func TestRetailCatList(t *testing.T) {
result, err := api.RetailCatList("13262158")
result, err := api.RetailCatList("8061767")
if err != nil {
t.Fatal(err)
}

View File

@@ -9,7 +9,7 @@ import (
func TestBillDetail(t *testing.T) {
a.GetSettleBillDetailV3(&order_getSettleBillDetailV3_request.OrderGetSettleBillDetailV3Param{
Size: 10,
OrderId: "5006155889577954309",
OrderId: "5035210591285239695",
})
}

View File

@@ -25,9 +25,11 @@ func (a *API) GetSettleBillDetailV3(param *order_getSettleBillDetailV3_request.O
}
var totalShopMoney int64 = 0
var postAmount int64 = 0
for _, v := range result.Data.Data {
totalShopMoney += v.SettleAmount
postAmount += v.PostAmount
}
return totalShopMoney, result.Data.NextStartIndex, nil
return totalShopMoney - postAmount, result.Data.NextStartIndex, nil
}