jds ware
This commit is contained in:
@@ -839,14 +839,14 @@ type WareSaveParam struct {
|
|||||||
CatIDLevel4 int `json:"catIdLevel4"`
|
CatIDLevel4 int `json:"catIdLevel4"`
|
||||||
CategoryID int `json:"categoryId"`
|
CategoryID int `json:"categoryId"`
|
||||||
CharacteristicService []interface{} `json:"characteristicService"`
|
CharacteristicService []interface{} `json:"characteristicService"`
|
||||||
ColType int `json:"colType,omitempty"`
|
ColType int `json:"colType"`
|
||||||
CostPrice string `json:"costPrice"`
|
CostPrice string `json:"costPrice"`
|
||||||
Delivery int `json:"delivery"`
|
Delivery int `json:"delivery"`
|
||||||
DeliveryID1 int `json:"deliveryId1"`
|
DeliveryID1 int `json:"deliveryId1"`
|
||||||
Density string `json:"density"`
|
Density string `json:"density"`
|
||||||
DesignConcept string `json:"designConcept"`
|
DesignConcept string `json:"designConcept"`
|
||||||
ExtendFeatures []interface{} `json:"extendFeatures"`
|
ExtendFeatures []interface{} `json:"extendFeatures"`
|
||||||
Features []WareSaveSkusFea `json:"features,omitempty"`
|
Features []WareSaveSkusFea `json:"features"`
|
||||||
FitmentNote string `json:"fitmentNote"`
|
FitmentNote string `json:"fitmentNote"`
|
||||||
FitmentNoteMobile string `json:"fitmentNoteMobile"`
|
FitmentNoteMobile string `json:"fitmentNoteMobile"`
|
||||||
HasWareBoot bool `json:"hasWareBoot"`
|
HasWareBoot bool `json:"hasWareBoot"`
|
||||||
|
|||||||
@@ -206,23 +206,25 @@ func TestShopList(t *testing.T) {
|
|||||||
func TestWareSave(t *testing.T) {
|
func TestWareSave(t *testing.T) {
|
||||||
// desc := `<p>因生鲜比较脆弱,发货途中如果有磕碰损坏,请收到联系客服,闪电赔付。请核对好地址,发货后不可修改地址,因改地址导致损坏不能赔付,谢谢理解</p><p><img style="width:auto;height:auto;max-width:100%;" src="//img10.360buyimg.com/imgzone/jfs/t1/126814/22/1326/472568/5ebb888dEa2cfb5f6/c0c81db660994246.jpg"><br></p><p><br></p>`
|
// desc := `<p>因生鲜比较脆弱,发货途中如果有磕碰损坏,请收到联系客服,闪电赔付。请核对好地址,发货后不可修改地址,因改地址导致损坏不能赔付,谢谢理解</p><p><img style="width:auto;height:auto;max-width:100%;" src="//img10.360buyimg.com/imgzone/jfs/t1/126814/22/1326/472568/5ebb888dEa2cfb5f6/c0c81db660994246.jpg"><br></p><p><br></p>`
|
||||||
params := &WareSaveParam{
|
params := &WareSaveParam{
|
||||||
WareID: 10020528071531,
|
WareID: 0,
|
||||||
Height: 120,
|
Height: 100,
|
||||||
CategoryID: 12247,
|
// CatIDLevel1: 12218,
|
||||||
VenderID: 10569615,
|
CategoryID: 12247,
|
||||||
BrandID: 44259,
|
LastCategoryID: 12247,
|
||||||
Length: 200,
|
VenderID: 10569615,
|
||||||
Wide: 100,
|
BrandID: 44259,
|
||||||
// WareStatus: 2,
|
Length: 200,
|
||||||
Title: "三线肉",
|
Wide: 100,
|
||||||
Weight: "3",
|
WareStatus: 8,
|
||||||
ShopCategorys: []int{15602360},
|
Title: "三线肉测试2",
|
||||||
// Notes: desc,
|
Weight: "3",
|
||||||
|
ShopCategorys: []int{15602360},
|
||||||
|
Notes: "123",
|
||||||
Skus: []*WareSaveSkus{
|
Skus: []*WareSaveSkus{
|
||||||
&WareSaveSkus{
|
&WareSaveSkus{
|
||||||
SkuID: 10024685331653,
|
// SkuID: 10024685331653,
|
||||||
JdPrice: "15",
|
JdPrice: "15",
|
||||||
StockNum: 5,
|
StockNum: 0,
|
||||||
Props: []*WareSaveSkusProp{
|
Props: []*WareSaveSkusProp{
|
||||||
&WareSaveSkusProp{
|
&WareSaveSkusProp{
|
||||||
AttrID: 1000022043,
|
AttrID: 1000022043,
|
||||||
@@ -230,35 +232,52 @@ func TestWareSave(t *testing.T) {
|
|||||||
AttrValueAlias: "250g",
|
AttrValueAlias: "250g",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
// SkuProps: []interface{}{},
|
||||||
|
// Features: []interface{}{},
|
||||||
},
|
},
|
||||||
&WareSaveSkus{
|
// &WareSaveSkus{
|
||||||
JdPrice: "31",
|
// JdPrice: "31",
|
||||||
StockNum: 5,
|
// StockNum: 5,
|
||||||
Props: []*WareSaveSkusProp{
|
// Props: []*WareSaveSkusProp{
|
||||||
&WareSaveSkusProp{
|
// &WareSaveSkusProp{
|
||||||
AttrID: 1000022043,
|
// AttrID: 1000022043,
|
||||||
AttrValues: 2515430634,
|
// AttrValues: 2515430634,
|
||||||
AttrValueAlias: "500g",
|
// AttrValueAlias: "500g",
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
},
|
},
|
||||||
PromiseID: -1,
|
PromiseID: 0,
|
||||||
MultiCateProps: []interface{}{},
|
MultiCateProps: []interface{}{},
|
||||||
PropsSet: []interface{}{},
|
PropsSet: []interface{}{},
|
||||||
SaleAttrs: []interface{}{},
|
SaleAttrs: []interface{}{},
|
||||||
|
TransparentImageAudit: []interface{}{},
|
||||||
|
OptionType: 1,
|
||||||
|
// MoreImage: true,
|
||||||
|
AvailableFeatures: []interface{}{},
|
||||||
|
CharacteristicService: []interface{}{},
|
||||||
|
ExtendFeatures: []interface{}{},
|
||||||
|
// ZhuangBaID: "5fbf1031e4b0a19aa0904724",
|
||||||
|
// MobileZhuangBaID: "5fbf1031e4b0a19aa0904724",
|
||||||
|
TempID: "10569615110055200",
|
||||||
}
|
}
|
||||||
// params.ImageMap.Num0000000000 = append(params.ImageMap.Num0000000000, &CreateSkuParamImages{
|
// params.HouseInfo.Flag = 2
|
||||||
// ColorID: "0000000000",
|
// params.HouseInfo.PresaleList = []interface{}{}
|
||||||
// ImgIndex: 1,
|
// params.RentSpuVO.SkuList = []interface{}{}
|
||||||
// ImgURL: "jfs/t1/142006/30/15024/504060/5fb636d4Ef12079f7/2adad323cbcf7c52.jpg",
|
// params.PwMarketingLabelVo.PwBdsLabelBindVos = []interface{}{}
|
||||||
// // ImgZoneID: "0000000000",
|
// params.PwMarketingLabelVo.PwBdsProposalVos = []interface{}{}
|
||||||
// }, &CreateSkuParamImages{
|
params.ImageMap.Num0000000000 = append(params.ImageMap.Num0000000000, &CreateSkuParamImages{
|
||||||
|
ColorID: "0000000000",
|
||||||
|
ImgIndex: 1,
|
||||||
|
ImgURL: "jfs/t1/125015/17/19753/558326/5fbe4eadEa2563b45/ddc311be97c4493a.jpg",
|
||||||
|
ImgZoneID: "17gev-7a9bbcff176-ml",
|
||||||
|
})
|
||||||
|
// , &CreateSkuParamImages{
|
||||||
// ColorID: "0000000000",
|
// ColorID: "0000000000",
|
||||||
// ImgIndex: 2,
|
// ImgIndex: 2,
|
||||||
// ImgURL: "jfs/t1/142006/30/15024/504060/5fb636d4Ef12079f7/2adad323cbcf7c52.jpg",
|
// ImgURL: "jfs/t1/142006/30/15024/504060/5fb636d4Ef12079f7/2adad323cbcf7c52.jpg",
|
||||||
// // ImgZoneID: "0000000000",
|
// // ImgZoneID: "0000000000",
|
||||||
// })
|
// }
|
||||||
result, err := api.WareSave(params)
|
result, err := api.WareSave(params)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
@@ -275,10 +294,11 @@ func TestWareDoUpdate(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestStoreWareDoUpdate(t *testing.T) {
|
func TestStoreWareDoUpdate(t *testing.T) {
|
||||||
err := api.StoreWareDoUpdate(1, 10024685331653, "1000063128")
|
fmt.Println(len(utils.GetUUID()))
|
||||||
if err != nil {
|
// err := api.StoreWareDoUpdate(1, 10024685331653, "1000063128")
|
||||||
t.Fatal(err)
|
// if err != nil {
|
||||||
}
|
// t.Fatal(err)
|
||||||
|
// }
|
||||||
// t.Log(utils.Format4Output(result, false))
|
// t.Log(utils.Format4Output(result, false))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user