1
This commit is contained in:
@@ -13,12 +13,12 @@ var a = New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", token
|
|||||||
|
|
||||||
// 查询售后单详情
|
// 查询售后单详情
|
||||||
func TestAfsOrder(t *testing.T) {
|
func TestAfsOrder(t *testing.T) {
|
||||||
a.QueryAfsOrderDetail("7154266161041899779", true)
|
a.QueryAfsOrderDetail("7165706329204670732", true)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 同意/拒绝售后单
|
// 同意/拒绝售后单
|
||||||
func TestAggreOrNotAggreAfs(t *testing.T) {
|
func TestAggreOrNotAggreAfs(t *testing.T) {
|
||||||
a.AfterSaleOperate(int32(202), "7161251923629179177", "1", 0)
|
a.AfterSaleOperate(int32(201), "7165706329204670732", "1", 0)
|
||||||
fmt.Println("11", 8|16|32|1)
|
fmt.Println("11", 8|16|32|1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,8 +62,9 @@ func TestCreateStoreCommodity(t *testing.T) {
|
|||||||
FreightId: 11111, // 运费模板id
|
FreightId: 11111, // 运费模板id
|
||||||
//Weight: 0,
|
//Weight: 0,
|
||||||
//WeightUnit: 0,
|
//WeightUnit: 0,
|
||||||
DeliveryDelayDay: DeliveryDelayDayToDay, // 现货发货(presell_type=0)和阶梯发货模式(presell_type=2)时必填
|
DeliveryDelayDay: DeliveryDelayDayTomorrow, // 现货发货(presell_type=0)和阶梯发货模式(presell_type=2)时必填
|
||||||
PresellType: SendGoodsTypeNow, // 0现发货/1预售发货/2阶梯发货
|
PresellType: 1, // 0现发货/1预售发货/2阶梯发货
|
||||||
|
PresellConfigLevel: 1, // 0现发货/1预售发货/2阶梯发货
|
||||||
//PresellDelay: 0,
|
//PresellDelay: 0,
|
||||||
//PresellEndTime: "",
|
//PresellEndTime: "",
|
||||||
//Supply7dayReturn: 0,
|
//Supply7dayReturn: 0,
|
||||||
@@ -116,13 +117,16 @@ func TestCreateStoreCommodity(t *testing.T) {
|
|||||||
category, err := a.GetCatePropertyV2(param.CategoryLeafId)
|
category, err := a.GetCatePropertyV2(param.CategoryLeafId)
|
||||||
format := make(map[string][]*ProductFormatNewList, 0)
|
format := make(map[string][]*ProductFormatNewList, 0)
|
||||||
for _, v := range category.Data.Data {
|
for _, v := range category.Data.Data {
|
||||||
|
if v.Required != 1 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
for _, d := range v.Options {
|
for _, d := range v.Options {
|
||||||
formateNew := &ProductFormatNewList{
|
formateNew := &ProductFormatNewList{
|
||||||
Value: utils.Str2Int64(d.Value),
|
Value: utils.Str2Int64(d.Value),
|
||||||
Name: d.Name,
|
Name: d.Name,
|
||||||
DiyType: v.DiyType,
|
DiyType: v.DiyType,
|
||||||
}
|
}
|
||||||
format[utils.Int64ToStr(v.CategoryId)] = append(format[utils.Int64ToStr(v.CategoryId)], formateNew)
|
format[utils.Int64ToStr(v.PropertyId)] = append(format[utils.Int64ToStr(v.PropertyId)], formateNew)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
productFormatNew, err := json.Marshal(format)
|
productFormatNew, err := json.Marshal(format)
|
||||||
@@ -268,12 +272,11 @@ func TestEditStoreCommodity(t *testing.T) {
|
|||||||
data, _ := a.GetSkuDetail("3580251132888538614", "")
|
data, _ := a.GetSkuDetail("3580251132888538614", "")
|
||||||
globals.SugarLogger.Debugf("=============%s", data.ProductFormatNew)
|
globals.SugarLogger.Debugf("=============%s", data.ProductFormatNew)
|
||||||
specPrice, _ := json.Marshal(data.SpecPrices)
|
specPrice, _ := json.Marshal(data.SpecPrices)
|
||||||
specs, _ := json.Marshal(data.Specs)
|
|
||||||
a.EditStoreCommodity(&product_editV2_request.ProductEditV2Param{
|
a.EditStoreCommodity(&product_editV2_request.ProductEditV2Param{
|
||||||
ProductId: 1748169491056643,
|
ProductId: 1748169491056643,
|
||||||
ProductFormatNew: data.ProductFormatNew,
|
ProductFormatNew: data.ProductFormatNew,
|
||||||
SpecPrices: string(specPrice),
|
SpecPrices: string(specPrice),
|
||||||
Specs: string(specs),
|
Specs: "重量|250g",
|
||||||
Commit: true,
|
Commit: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user