diff --git a/platformapi/mtpsapi/shop_test.go b/platformapi/mtpsapi/shop_test.go index c4e9d052..40550f12 100644 --- a/platformapi/mtpsapi/shop_test.go +++ b/platformapi/mtpsapi/shop_test.go @@ -49,9 +49,10 @@ func TestShopCreate(t *testing.T) { func TestShopUpdate(t *testing.T) { shopInfo := &ShopInfo{ - ShopID: "667018", - ShopLng: 113015935, - ShopLat: 25776427, + ShopID: "667071", + ShopLng: 117122952, + ShopLat: 34244733, + ShopAddress: "徐州市泉山区临湖路与乐雅路湖西雅苑C区6栋扎堆地酒店对面", } _, err := api.ShopUpdate(shopInfo) if err != nil { diff --git a/platformapi/mtwmapi/act_test.go b/platformapi/mtwmapi/act_test.go index 085e3300..eb3cedf6 100644 --- a/platformapi/mtwmapi/act_test.go +++ b/platformapi/mtwmapi/act_test.go @@ -66,15 +66,39 @@ func TestFulllDiscountShippingFeeList(t *testing.T) { } func TestRetailDiscountBatchSave(t *testing.T) { - result, _, err := api.RetailDiscountBatchSave2("18822904", 0, []*RetailDiscountActData{ + result, _, err := api.RetailDiscountBatchSave2("18702580", RetailActTypeDirectDown, []*RetailDiscountActData{ &RetailDiscountActData{ - AppFoodCode: "6094573", - StartTime: time.Now().Unix(), - EndTime: time.Now().Add(24 * time.Hour).Unix(), - OrderLimit: 1, - DayLimit: 9999, - SettingType: SettingTypeAsDiscount, - DiscountCoefficient: 9, + AppFoodCode: "6045386", + UserType: 0, + StartTime: 1705593600, + EndTime: 1717171199, + OrderLimit: 1, + DayLimit: -1, + SettingType: 1, + ActPrice: 0.5, + Sequence: 1, + }, + &RetailDiscountActData{ + AppFoodCode: "30700", + UserType: 0, + StartTime: 1705593600, + EndTime: 1717171199, + OrderLimit: 1, + DayLimit: -1, + SettingType: 1, + ActPrice: 0.8, + Sequence: 2, + }, + &RetailDiscountActData{ + AppFoodCode: "30686", + UserType: 0, + StartTime: 1705593600, + EndTime: 1717171199, + OrderLimit: 1, + DayLimit: -1, + SettingType: 1, + ActPrice: 1, + Sequence: 3, }, }) if err != nil { diff --git a/platformapi/mtwmapi/mtwmapi_test.go b/platformapi/mtwmapi/mtwmapi_test.go index 5d2a6458..2d39bbea 100644 --- a/platformapi/mtwmapi/mtwmapi_test.go +++ b/platformapi/mtwmapi/mtwmapi_test.go @@ -20,13 +20,13 @@ func init() { baseapi.Init(sugarLogger) // 菜市 - //api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "") + api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "") // 果园 //api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "") //商超 - api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_qO_Kv9pX4lHVTb2IX19JzQ") //token_n4TwqCntWWuvQwAawzxC0w + //api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_qO_Kv9pX4lHVTb2IX19JzQ") //token_n4TwqCntWWuvQwAawzxC0w cookieStr := ` acctId=57396785; token=0bWbK5VbK50E2BmIhIH2zHB-am_y7mB37yXHm6RLZWx4*; wmPoiId=-1; ` diff --git a/platformapi/mtwmapi/order_test.go b/platformapi/mtwmapi/order_test.go index 0f837856..31236471 100644 --- a/platformapi/mtwmapi/order_test.go +++ b/platformapi/mtwmapi/order_test.go @@ -29,7 +29,7 @@ func getTimeFromTimestamp(timeStamp int64) time.Time { } func TestOrderGetOrderDetail(t *testing.T) { - result, err := api.OrderGetOrderDetail(1100830463015735279, false) + result, err := api.OrderGetOrderDetail(3800909491353265371, false) if err != nil { t.Fatal(err) } diff --git a/platformapi/mtwmapi/shipping.go b/platformapi/mtwmapi/shipping.go index 2770a509..55a98369 100644 --- a/platformapi/mtwmapi/shipping.go +++ b/platformapi/mtwmapi/shipping.go @@ -13,19 +13,20 @@ const ( ) const ( - PeiSongTypeSelf = "0000" // 商家自配 - PeiSongTypeQuHuo = "0002" // 趣活 - PeiSongTypeDada = "0016" // 达达 - PeiSongTypeE = "0033" // E代送 - PeiSongTypeMTZSJM = "1001" // 美团专送-加盟 - PeiSongTypeMTZSZJ = "1002" // 美团专送-自建 - PeiSongTypeMTZSPT = "1003" // 美团跑腿(原众包) - PeiSongTypeMTZSDL = "1004" // 美团专送-城市代理 - PeiSongTypeJiaoMa = "2001" // 角马 - PeiSongTypeKuaiDi = "2002" // 快送 - PeiSongTypeWholeCity = "2010" // 全城送 - PeiSongTypeMixed = "3001" // 混合送(即美团专送+快送) - PeiSongTypeQiKe = "4015" // 企客远距离配送 + PeiSongTypeSelf = "0000" // 商家自配 + PeiSongTypeQuHuo = "0002" // 趣活 + PeiSongTypeDada = "0016" // 达达 + PeiSongTypeE = "0033" // E代送 + PeiSongTypeMTZSJM = "1001" // 美团专送-加盟 + PeiSongTypeMTZSZJ = "1002" // 美团专送-自建 + PeiSongTypeMTZSPT = "1003" // 美团跑腿(原众包) + PeiSongTypeMTZSDL = "1004" // 美团专送-城市代理 + PeiSongTypeJiaoMa = "2001" // 角马 + PeiSongTypeKuaiDi = "2002" // 快送 + PeiSongTypeWholeCity = "2010" // 全城送 + PeiSongTypeMixed = "3001" // 混合送(即美团专送+快送) + PeiSongTypeQiKe = "4015" // 企客远距离配送 + PeiSongTypeMixedExpressQiKe = "30012002" // 混合快送 ) func (a *API) ShippingSave(poiCode string, area string, minPrice, shippingFee float32) (err error) {