This commit is contained in:
邹宗楠
2022-11-14 16:06:31 +08:00
parent 3a4c16bce8
commit 7ffeb7dcab
2 changed files with 23 additions and 1 deletions

View File

@@ -7828,7 +7828,9 @@ func (a *API) CreateStoreCommodity(skuParam *product_addV2_request.ProductAddV2P
if err != nil {
return nil, err
}
globals.SugarLogger.Debugf("新增总部商品URL=========:%s", request.GetUrlPath())
globals.SugarLogger.Debugf("新增总部商品result:=%s", utils.Format4Output(result, false))
globals.SugarLogger.Debugf("新增总部商品param:=%s", utils.Format4Output(result, false))
if result.Code != RequestSuccessCode {
return nil, errors.New(result.SubMsg)
}
@@ -8130,3 +8132,19 @@ func (a *API) GetProductUpdateRule(categoryId int64) bool {
}
return result.Data.AfterSaleRule.SupplyDayReturnRule.Enable
}
// GetProductUpdateRule2 查询分类是否支持七天无理由退货
func (a *API) GetProductUpdateRule2(categoryId int64) bool {
request := product_getProductUpdateRule_request.New()
param := request.GetParams()
param.CategoryId = categoryId
result, err := request.Execute(a.accessTokenObj)
if err != nil {
return false
}
if result.Code != RequestSuccessCode {
return false
}
return result.Data.AfterSaleRule.SupplyDayReturnRule.Enable
}

View File

@@ -381,3 +381,7 @@ func TestNameeeee(t *testing.T) {
aa := `667278_/image/4229fbb12a40ddcc7a2d42728f`
fmt.Println(strings.Contains(aa, "detail_"))
}
func TestGetProductUpdateRule2(t *testing.T) {
a.GetProductUpdateRule2(20219)
}