This commit is contained in:
邹宗楠
2022-11-14 15:20:50 +08:00
parent 76dcfaa33f
commit 0b0e4902bd
2 changed files with 10 additions and 7 deletions

View File

@@ -13,12 +13,12 @@ var a = New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", token
// 查询售后单详情
func TestAfsOrder(t *testing.T) {
a.QueryAfsOrderDetail("7154266161041899779", true)
a.QueryAfsOrderDetail("7165706329204670732", true)
}
// 同意/拒绝售后单
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)
}

View File

@@ -62,8 +62,9 @@ func TestCreateStoreCommodity(t *testing.T) {
FreightId: 11111, // 运费模板id
//Weight: 0,
//WeightUnit: 0,
DeliveryDelayDay: DeliveryDelayDayToDay, // 现货发货(presell_type=0)和阶梯发货模式(presell_type=2)时必填
PresellType: SendGoodsTypeNow, // 0现发货/1预售发货/2阶梯发货
DeliveryDelayDay: DeliveryDelayDayTomorrow, // 现货发货(presell_type=0)和阶梯发货模式(presell_type=2)时必填
PresellType: 1, // 0现发货/1预售发货/2阶梯发货
PresellConfigLevel: 1, // 0现发货/1预售发货/2阶梯发货
//PresellDelay: 0,
//PresellEndTime: "",
//Supply7dayReturn: 0,
@@ -116,13 +117,16 @@ func TestCreateStoreCommodity(t *testing.T) {
category, err := a.GetCatePropertyV2(param.CategoryLeafId)
format := make(map[string][]*ProductFormatNewList, 0)
for _, v := range category.Data.Data {
if v.Required != 1 {
continue
}
for _, d := range v.Options {
formateNew := &ProductFormatNewList{
Value: utils.Str2Int64(d.Value),
Name: d.Name,
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)
@@ -268,12 +272,11 @@ func TestEditStoreCommodity(t *testing.T) {
data, _ := a.GetSkuDetail("3580251132888538614", "")
globals.SugarLogger.Debugf("=============%s", data.ProductFormatNew)
specPrice, _ := json.Marshal(data.SpecPrices)
specs, _ := json.Marshal(data.Specs)
a.EditStoreCommodity(&product_editV2_request.ProductEditV2Param{
ProductId: 1748169491056643,
ProductFormatNew: data.ProductFormatNew,
SpecPrices: string(specPrice),
Specs: string(specs),
Specs: "重量|250g",
Commit: true,
})
}