1
This commit is contained in:
@@ -57,13 +57,15 @@ var (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
DeliveryServiceCodeSuperRapid = 4002 // 飞速达
|
DeliveryServiceCodeSuperRapid = 4002 // 飞速达
|
||||||
DeliveryServiceCodeRapid = 100004 // 快速达
|
DeliveryServiceCodeRapid = 100029 // 快速达,时效型
|
||||||
DeliveryServiceCodeIntime = 100006 // 及时达
|
DeliveryServiceLocalDa = 100009 // 同城达
|
||||||
|
DeliveryServiceCodeIntime = 100006 // 及时达(这个暂时没用)
|
||||||
DeliveryServiceCodeTogether = 4013 // 集中送
|
DeliveryServiceCodeTogether = 4013 // 集中送
|
||||||
//DeliveryServiceCodeSuperRapid = 4002 // 飞速达
|
//DeliveryServiceCodeSuperRapid = 4002 // 飞速达
|
||||||
//DeliveryServiceCodeRapid = 4011 // 快速达
|
//DeliveryServiceCodeRapid = 4011 // 快速达
|
||||||
//DeliveryServiceCodeIntime = 100006 // 及时达
|
//DeliveryServiceCodeIntime = 100006 // 及时达
|
||||||
//DeliveryServiceCodeTogether = 4013 // 集中送
|
//DeliveryServiceCodeTogether = 4013 // 集中送
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ func TestCreateOrderByShop(t *testing.T) {
|
|||||||
OrderID: "order_123456789",
|
OrderID: "order_123456789",
|
||||||
// 设置测试门店 id,测试门店的坐标地址为 97235456,31065079(高德坐标),配送范围3km
|
// 设置测试门店 id,测试门店的坐标地址为 97235456,31065079(高德坐标),配送范围3km
|
||||||
ShopID: "test_0001",
|
ShopID: "test_0001",
|
||||||
DeliveryServiceCode: DeliveryServiceCodeIntime,
|
//DeliveryServiceCode: DeliveryServiceCodeIntime,
|
||||||
ReceiverName: "xjh",
|
ReceiverName: "xjh",
|
||||||
ReceiverAddress: "九里堤",
|
ReceiverAddress: "九里堤",
|
||||||
ReceiverPhone: "18112345678",
|
ReceiverPhone: "18112345678",
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
var token = `{"access_token":"c4afc5bc-7ddf-4244-b35a-0c393f3dca32","expires_in":1667203717,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"5a4f9dfe-306b-4bca-8b35-2ae9afc0245e","authority_id":""}`
|
var token = `{"access_token":"d590b649-0dd9-4988-a5e2-bf7e06e2f105","expires_in":1667808519,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"f57c6a55-af5f-45ca-8ade-b2282be86341","authority_id":""}`
|
||||||
var a = New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", "")
|
var a = New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", token)
|
||||||
|
|
||||||
// 查询售后单详情
|
// 查询售后单详情
|
||||||
func TestAfsOrder(t *testing.T) {
|
func TestAfsOrder(t *testing.T) {
|
||||||
|
|||||||
@@ -153,6 +153,7 @@ func (a *API) AfterSaleOperate(refundType int32, refundId, remark string, storeI
|
|||||||
param.Items = refundListParam
|
param.Items = refundListParam
|
||||||
// 同意退货
|
// 同意退货
|
||||||
result, err := request.Execute(a.accessTokenObj)
|
result, err := request.Execute(a.accessTokenObj)
|
||||||
|
globals.SugarLogger.Debugf("====AfterSaleOperate:=%s", utils.Format4Output(result, false))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -141,6 +141,7 @@ func (a *API) EditStoreCommodity(sku *product_editV2_request.ProductEditV2Param)
|
|||||||
request.Param = sku
|
request.Param = sku
|
||||||
|
|
||||||
result, err := request.Execute(a.accessTokenObj)
|
result, err := request.Execute(a.accessTokenObj)
|
||||||
|
globals.SugarLogger.Debugf("编辑门店============%s", utils.Format4Output(result, false))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -211,7 +212,6 @@ func (a *API) GetSkuDetail(productId, outProductId string) (*product_detail_resp
|
|||||||
}
|
}
|
||||||
|
|
||||||
result, err := request.Execute(a.accessTokenObj)
|
result, err := request.Execute(a.accessTokenObj)
|
||||||
globals.SugarLogger.Debugf("%s", utils.Format4Output(result, false))
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ func TestInt16(t *testing.T) {
|
|||||||
|
|
||||||
// 查询商品详情(抖音平台id)
|
// 查询商品详情(抖音平台id)
|
||||||
func TestGetSkuDetail(t *testing.T) {
|
func TestGetSkuDetail(t *testing.T) {
|
||||||
data, err := a.GetSkuDetail("3579136668340475469", "")
|
data, err := a.GetSkuDetail("3580251132888538614", "")
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
globals.SugarLogger.Debugf("====%s", utils.Format4Output(data, false))
|
globals.SugarLogger.Debugf("====%s", utils.Format4Output(data, false))
|
||||||
}
|
}
|
||||||
@@ -263,18 +263,21 @@ func TestEiduPrice(t *testing.T) {
|
|||||||
|
|
||||||
// s上架1
|
// s上架1
|
||||||
func TestEditStoreCommodity(t *testing.T) {
|
func TestEditStoreCommodity(t *testing.T) {
|
||||||
accesstoken := `{"access_token":"60f530b2-9ab6-4723-b487-c094918f0d21","expires_in":1666257163,"scope":"SCOPE","shop_id":"","shop_name":"小时达开放平台对接专用店","refresh_token":"1220666a-5e88-458c-a8c0-06d949fbbd3f","authority_id":""}`
|
data, _ := a.GetSkuDetail("3580251132888538614", "")
|
||||||
a := New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", accesstoken)
|
globals.SugarLogger.Debugf("=============%s", data.ProductFormatNew)
|
||||||
|
specPrice, _ := json.Marshal(data.SpecPrices)
|
||||||
|
specs, _ := json.Marshal(data.Specs)
|
||||||
a.EditStoreCommodity(&product_editV2_request.ProductEditV2Param{
|
a.EditStoreCommodity(&product_editV2_request.ProductEditV2Param{
|
||||||
ProductId: 3576377564144516403,
|
ProductId: 1748169491056643,
|
||||||
|
ProductFormatNew: data.ProductFormatNew,
|
||||||
|
SpecPrices: string(specPrice),
|
||||||
|
Specs: string(specs),
|
||||||
Commit: true,
|
Commit: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 上架2
|
// 上架2
|
||||||
func TestEditStoreCommodity2(t *testing.T) {
|
func TestEditStoreCommodity2(t *testing.T) {
|
||||||
token := `{"access_token":"a1746210-a8a3-4497-a87b-09d1f10dbb95","expires_in":1665652230,"scope":"SCOPE","shop_id":"","shop_name":"小时达开放平台对接专用店","refresh_token":"c1cf8d88-0983-4f2a-b969-3746fae6b0cd","authority_id":""}`
|
|
||||||
a := New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", token)
|
|
||||||
a.EditStoreCommodityCommit(&product_editV2_commit_request.ProductEditV2Param2{
|
a.EditStoreCommodityCommit(&product_editV2_commit_request.ProductEditV2Param2{
|
||||||
ProductId: 3576377564144516403,
|
ProductId: 3576377564144516403,
|
||||||
Commit: true,
|
Commit: true,
|
||||||
|
|||||||
@@ -236,12 +236,10 @@ func TestUnsuspendStore(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestUpdateStore(t *testing.T) {
|
func TestUpdateStore(t *testing.T) {
|
||||||
accesstoken := `{"access_token":"60f530b2-9ab6-4723-b487-c094918f0d21","expires_in":1666257163,"scope":"SCOPE","shop_id":"","shop_name":"小时达开放平台对接专用店","refresh_token":"1220666a-5e88-458c-a8c0-06d949fbbd3f","authority_id":""}`
|
|
||||||
a := New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", accesstoken)
|
|
||||||
param := &shop_editStore_request.ShopEditStoreParam{
|
param := &shop_editStore_request.ShopEditStoreParam{
|
||||||
StoreId: 65312663,
|
StoreId: 65402632,
|
||||||
StoreCode: "",
|
StoreCode: "",
|
||||||
Name: "测试门店修改1019",
|
Name: "",
|
||||||
Province: "",
|
Province: "",
|
||||||
City: "",
|
City: "",
|
||||||
District: "",
|
District: "",
|
||||||
@@ -250,7 +248,7 @@ func TestUpdateStore(t *testing.T) {
|
|||||||
Longitude: "",
|
Longitude: "",
|
||||||
Latitude: "",
|
Latitude: "",
|
||||||
OpenTime: &shop_editStore_request.OpenTime{DayMap: map[int64]string{
|
OpenTime: &shop_editStore_request.OpenTime{DayMap: map[int64]string{
|
||||||
1: "07:00-12:00 14:00-18:00",
|
1: "07:00-20:00", 2: "07:00-20:00", 3: "07:00-20:00", 4: "07:00-20:00", 5: "07:00-20:00", 6: "07:00-20:00", 7: "07:00-20:00",
|
||||||
}},
|
}},
|
||||||
}
|
}
|
||||||
err := a.EditStore(param)
|
err := a.EditStore(param)
|
||||||
|
|||||||
Reference in New Issue
Block a user