1
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user