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
|
||||||
|
|||||||
@@ -107,11 +107,11 @@ func TestEditStoreCommodity(t *testing.T) {
|
|||||||
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,
|
||||||
@@ -122,7 +122,7 @@ func TestEditStoreCommodity(t *testing.T) {
|
|||||||
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
|
||||||
|
if action != OnLineAddterm {
|
||||||
params["randomstr"] = utils.GetUUID()
|
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