This commit is contained in:
richboo111
2023-03-28 14:39:34 +08:00
parent da93ae79da
commit 09959ccddb
9 changed files with 592 additions and 21 deletions

View File

@@ -18,7 +18,7 @@ import (
// "authority_id": ""
//}`
var token = `{"access_token":"c2e78f4f-fb23-4729-b9b1-8330209df50b","expires_in":1679259342,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"83548fb9-d9ea-4665-bd8c-4dbb949338de","authority_id":""}`
var token = `{"access_token":"2edc427e-9ab8-430b-a502-6802f1dee387","expires_in":1679861437,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"dda56ad5-521b-4b87-9d74-bd6df13df1aa","authority_id":""}`
//var token = `{"access_token":"e3173e9f-266f-4d87-88e7-e7cd837bc9d9","expires_in":1672882632,"scope":"SCOPE","shop_id":68023619,"shop_name":"京西到家","refresh_token":"5070aae2-493f-46bd-b5d6-6ea0cd64729f","authority_id":""}`

View File

@@ -379,19 +379,27 @@ func TestGetAns(t *testing.T) {
//运费模板
//创建运费模板
//func TestCreateFreightTemplate(t *testing.T) {
// param := &freightTemplate_create_request.FreightTemplateCreateParam{
// Template: &freightTemplate_create_request.Template{
// TemplateName: "这是一个测试固定运费模板",
// ProductProvince: utils.Str2Int64(utils.Int2Str(storeDetail.ProvinceCode)[:2]),
// ProductCity: int64(storeDetail.CityCode),
// CalculateType: 2, //计价方式-1.按重量 2.按数量
// TransferType: 1,
// RuleType: 1, //固定运费&卖家包邮
// FixedAmount: 500, //固定运费 单位:分
// },
// }
//}
func TestCreateFreightTemplate(t *testing.T) {
param := &freightTemplate_create_request.FreightTemplateCreateParam{
Template: &freightTemplate_create_request.Template{
TemplateName: "这是一个测试满减运费模板0323",
ProductProvince: 31,
ProductCity: 310000,
CalculateType: 2, //计价方式-1.按重量 2.按数量
TransferType: 1,
RuleType: 1, //固定运费&卖家包邮
FixedAmount: 500, //固定运费 单位:分
},
Columns: []freightTemplate_create_request.ColumnsItem{{
IsOverFree: true,
IsLimited: false,
OverAmount: 12,
}},
}
freightID, err := a.FreightTemplateCreate(param)
fmt.Println(freightID)
fmt.Println(err)
}
//更新运费模板
func TestUpdateFreightTemplate(t *testing.T) {