1
This commit is contained in:
@@ -34,7 +34,9 @@ func init() {
|
|||||||
// 京东白货
|
// 京东白货
|
||||||
//api = New("9053e4fd-4e0e-4e9e-8ab1-f348e5cbf3e7", "4602bd4b84984186815dbc03299c7094", "386ab19719d9470487011217d0c57349")
|
//api = New("9053e4fd-4e0e-4e9e-8ab1-f348e5cbf3e7", "4602bd4b84984186815dbc03299c7094", "386ab19719d9470487011217d0c57349")
|
||||||
// 果切 379599
|
// 果切 379599
|
||||||
api = New("8a843f5c-6c75-4604-9976-04c1aae3decc", "f2ed33075faf4773a47e065acd79532b", "aed14cbbecac4456843570e90c5f46ec")
|
//api = New("8a843f5c-6c75-4604-9976-04c1aae3decc", "f2ed33075faf4773a47e065acd79532b", "aed14cbbecac4456843570e90c5f46ec")
|
||||||
|
// 李氏水果 346254
|
||||||
|
api = New("c7c41cb6-6db4-4f67-a864-ca5f524653d0", "13493b4a951945f689dcc989b6693631", "7e28a37be43a430bb5928c835e482fe2")
|
||||||
// 381564
|
// 381564
|
||||||
//api = New("4d0c707a-54eb-4f05-8187-6cedf95827c7", "d2d1e2e3213d4320bc2712a684307831", "1750f5b9848d4a6492c1c20b487074da")
|
//api = New("4d0c707a-54eb-4f05-8187-6cedf95827c7", "d2d1e2e3213d4320bc2712a684307831", "1750f5b9848d4a6492c1c20b487074da")
|
||||||
// 390558
|
// 390558
|
||||||
|
|||||||
@@ -149,8 +149,9 @@ type ProductEditV2Param struct {
|
|||||||
// 商家可见备注
|
// 商家可见备注
|
||||||
Remark string `json:"remark"`
|
Remark string `json:"remark"`
|
||||||
// 外部product_id
|
// 外部product_id
|
||||||
OutProductId int64 `json:"out_product_id"`
|
//OutProductId int64 `json:"out_product_id"`
|
||||||
// 资质信息,可通过/product/qualificationConfig获取
|
// 外部product id
|
||||||
|
//OuterProductId string `json:"outer_product_id"` // 资质信息,可通过/product/qualificationConfig获取
|
||||||
QualityList []QualityListItem `json:"quality_list"`
|
QualityList []QualityListItem `json:"quality_list"`
|
||||||
// 如果不填,则规格名为各级规格名用 \"-\" 自动生成
|
// 如果不填,则规格名为各级规格名用 \"-\" 自动生成
|
||||||
SpecName string `json:"spec_name"`
|
SpecName string `json:"spec_name"`
|
||||||
@@ -178,8 +179,6 @@ type ProductEditV2Param struct {
|
|||||||
Extra string `json:"extra"`
|
Extra string `json:"extra"`
|
||||||
// src
|
// src
|
||||||
Src string `json:"src"`
|
Src string `json:"src"`
|
||||||
// 外部product id
|
|
||||||
OuterProductId string `json:"outer_product_id"`
|
|
||||||
// standard_brand_id,通过/brand/list获取,无品牌id则传596120136
|
// standard_brand_id,通过/brand/list获取,无品牌id则传596120136
|
||||||
StandardBrandId int64 `json:"standard_brand_id"`
|
StandardBrandId int64 `json:"standard_brand_id"`
|
||||||
// 卡券类型需要传true
|
// 卡券类型需要传true
|
||||||
|
|||||||
@@ -82,47 +82,47 @@ func TestEiduPrice(t *testing.T) {
|
|||||||
// s上架1
|
// s上架1
|
||||||
func TestEditStoreCommodity(t *testing.T) {
|
func TestEditStoreCommodity(t *testing.T) {
|
||||||
err := a.EditStoreCommodity(&product_editV2_request.ProductEditV2Param{
|
err := a.EditStoreCommodity(&product_editV2_request.ProductEditV2Param{
|
||||||
ProductId: 3605562143317059130,
|
ProductId: 3605562143317059130,
|
||||||
ProductType: 0,
|
ProductType: 0,
|
||||||
CategoryLeafId: 32241,
|
CategoryLeafId: 32241,
|
||||||
ProductFormat: "",
|
ProductFormat: "",
|
||||||
Name: "三线肉约500g/份【同城配送】",
|
Name: "三线肉约500g/份【同城配送】",
|
||||||
RecommendRemark: "",
|
RecommendRemark: "",
|
||||||
Pic: "https://p3-aio.ecombdimg.com/obj/ecom-shop-material/VqGYBUaL_m_4bf295c4d3b6466138c5650a4d433935_sx_504060_www800-800",
|
Pic: "https://p3-aio.ecombdimg.com/obj/ecom-shop-material/VqGYBUaL_m_4bf295c4d3b6466138c5650a4d433935_sx_504060_www800-800",
|
||||||
Description: "https://p3-aio.ecombdimg.com/obj/ecom-shop-material/VqGYBUaL_m_2e3b9a6bbf7649895bff131393b42b4c_sx_463917_www750-3527",
|
Description: "https://p3-aio.ecombdimg.com/obj/ecom-shop-material/VqGYBUaL_m_2e3b9a6bbf7649895bff131393b42b4c_sx_463917_www750-3527",
|
||||||
PayType: 1,
|
PayType: 1,
|
||||||
DeliveryMethod: 0,
|
DeliveryMethod: 0,
|
||||||
CdfCategory: "",
|
CdfCategory: "",
|
||||||
ReduceType: 2,
|
ReduceType: 2,
|
||||||
AssocIds: "",
|
AssocIds: "",
|
||||||
FreightId: 0,
|
FreightId: 0,
|
||||||
Weight: 500,
|
Weight: 500,
|
||||||
WeightUnit: 1,
|
WeightUnit: 1,
|
||||||
DeliveryDelayDay: 9999,
|
DeliveryDelayDay: 9999,
|
||||||
PresellType: 0,
|
PresellType: 0,
|
||||||
PresellDelay: 0,
|
PresellDelay: 0,
|
||||||
PresellEndTime: "",
|
PresellEndTime: "",
|
||||||
Supply7dayReturn: 0,
|
Supply7dayReturn: 0,
|
||||||
Mobile: "18598908808",
|
Mobile: "18598908808",
|
||||||
Commit: true,
|
Commit: true,
|
||||||
BrandId: 0,
|
BrandId: 0,
|
||||||
Remark: "",
|
Remark: "",
|
||||||
OutProductId: 0,
|
//OutProductId: 0,
|
||||||
QualityList: nil,
|
QualityList: nil,
|
||||||
SpecName: "",
|
SpecName: "",
|
||||||
Specs: "重量|500g",
|
Specs: "重量|500g",
|
||||||
SpecPrices: "[{\"spec_detail_name1\":\"500g\",\"spec_detail_name2\":\"\",\"spec_detail_name3\":\"\",\"stock_num\":999999,\"price\":3500,\"code\":\"22700\",\"step_stock_num\":0,\"supplier_id\":\"\",\"outer_sku_id\":\"22700\",\"sku_type\":1,\"stock_num_map\":{\"173965249\":999999},\"delivery_infos\":[{\"info_type\":\"weight\",\"info_value\":\"500\",\"info_unit\":\"g\"}]}]",
|
SpecPrices: "[{\"spec_detail_name1\":\"500g\",\"spec_detail_name2\":\"\",\"spec_detail_name3\":\"\",\"stock_num\":999999,\"price\":3500,\"code\":\"22700\",\"step_stock_num\":0,\"supplier_id\":\"\",\"outer_sku_id\":\"70122700701\",\"sku_type\":1,\"stock_num_map\":{\"173965249\":999999},\"delivery_infos\":[{\"info_type\":\"weight\",\"info_value\":\"500\",\"info_unit\":\"g\"}]}]",
|
||||||
SpecPic: "",
|
SpecPic: "",
|
||||||
MaximumPerOrder: 0,
|
MaximumPerOrder: 0,
|
||||||
LimitPerBuyer: 0,
|
LimitPerBuyer: 0,
|
||||||
MinimumPerOrder: 0,
|
MinimumPerOrder: 0,
|
||||||
ProductFormatNew: "{\n\t\"1687\": [\n\t\t{\n\t\t\t\"diy_type\": 0,\n\t\t\t\"name\": \"品牌\",\n\t\t\t\"value\": 596120136\n\t\t}\n\t],\n\t\"1758\": [\n\t\t{\n\t\t\t\"diy_type\": 1,\n\t\t\t\"name\": \"包装方式\",\n\t\t\t\"value\": 8197\n\t\t}\n\t],\n\t\"1880\": [\n\t\t{\n\t\t\t\"diy_type\": 0,\n\t\t\t\"name\": \"产地\",\n\t\t\t\"value\": 13850\n\t\t}\n\t],\n\t\"2130\": [\n\t\t{\n\t\t\t\"diy_type\": 0,\n\t\t\t\"name\": \"生鲜储存温度\",\n\t\t\t\"value\": 2808\n\t\t}\n\t]\n}",
|
ProductFormatNew: "{\n\t\"1687\": [\n\t\t{\n\t\t\t\"diy_type\": 0,\n\t\t\t\"name\": \"品牌\",\n\t\t\t\"value\": 596120136\n\t\t}\n\t],\n\t\"1758\": [\n\t\t{\n\t\t\t\"diy_type\": 1,\n\t\t\t\"name\": \"包装方式\",\n\t\t\t\"value\": 8197\n\t\t}\n\t],\n\t\"1880\": [\n\t\t{\n\t\t\t\"diy_type\": 0,\n\t\t\t\"name\": \"产地\",\n\t\t\t\"value\": 13850\n\t\t}\n\t],\n\t\"2130\": [\n\t\t{\n\t\t\t\"diy_type\": 0,\n\t\t\t\"name\": \"生鲜储存温度\",\n\t\t\t\"value\": 2808\n\t\t}\n\t]\n}",
|
||||||
SpuId: 0,
|
SpuId: 0,
|
||||||
AppointDeliveryDay: 0,
|
AppointDeliveryDay: 0,
|
||||||
ThirdUrl: "",
|
ThirdUrl: "",
|
||||||
Extra: "",
|
Extra: "",
|
||||||
Src: "",
|
Src: "",
|
||||||
OuterProductId: "",
|
//OuterProductId: "",
|
||||||
StandardBrandId: 596120136,
|
StandardBrandId: 596120136,
|
||||||
NeedCheckOut: false,
|
NeedCheckOut: false,
|
||||||
PoiResource: nil,
|
PoiResource: nil,
|
||||||
|
|||||||
@@ -157,7 +157,9 @@ func (a *API) AccessAPI2(action string, bizParams map[string]interface{}) (retVa
|
|||||||
params := make(map[string]interface{})
|
params := make(map[string]interface{})
|
||||||
params["appid"] = a.appID
|
params["appid"] = a.appID
|
||||||
params["cusid"] = a.cusID
|
params["cusid"] = a.cusID
|
||||||
params["randomstr"] = utils.GetUUID()
|
if action != OnLineAddterm {
|
||||||
|
params["randomstr"] = utils.GetUUID()
|
||||||
|
}
|
||||||
params["version"] = "12"
|
params["version"] = "12"
|
||||||
params = utils.MergeMaps(params, bizParams)
|
params = utils.MergeMaps(params, bizParams)
|
||||||
sign, err := a.signParamRSA(params, RSAPrivateKeyNotJava)
|
sign, err := a.signParamRSA(params, RSAPrivateKeyNotJava)
|
||||||
|
|||||||
@@ -99,3 +99,19 @@ func TestOrderRefund(t *testing.T) {
|
|||||||
_, _, err := api.OrderRefund(param)
|
_, _, err := api.OrderRefund(param)
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestTLAddTerm(t *testing.T) {
|
||||||
|
param := &AddTermReq{
|
||||||
|
Termno: fmt.Sprintf("%d_1", 668470),
|
||||||
|
Devicetype: "10",
|
||||||
|
Termsn: fmt.Sprintf("%d_1", 668470),
|
||||||
|
Operation: "00",
|
||||||
|
Termstate: "",
|
||||||
|
Termaddress: fmt.Sprintf("%s-%s-%s-%s", "四川省", "成都市", "金牛区", "圃圆小筑"),
|
||||||
|
Signtype: "RSA",
|
||||||
|
Sign: "",
|
||||||
|
}
|
||||||
|
param.Termstate = "00"
|
||||||
|
|
||||||
|
api.TLAddTerm(param)
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user