1
This commit is contained in:
@@ -521,19 +521,19 @@ func (a *API) OrderUserInfoSensitive(orderId, name, tel, address string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GetProductUpdateRule 查询分类是否支持七天无理由退货
|
// GetProductUpdateRule 查询分类是否支持七天无理由退货
|
||||||
func (a *API) GetProductUpdateRule(categoryId int64) bool {
|
func (a *API) GetProductUpdateRule(categoryId int64) (bool, string) {
|
||||||
request := product_getProductUpdateRule_request.New()
|
request := product_getProductUpdateRule_request.New()
|
||||||
param := request.GetParams()
|
param := request.GetParams()
|
||||||
param.CategoryId = categoryId
|
param.CategoryId = categoryId
|
||||||
|
|
||||||
result, err := request.Execute(a.accessTokenObj)
|
result, err := request.Execute(a.accessTokenObj)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false
|
return false, ""
|
||||||
}
|
}
|
||||||
if result.Code != RequestSuccessCode {
|
if result.Code != RequestSuccessCode {
|
||||||
return false
|
return false, ""
|
||||||
}
|
}
|
||||||
return result.Data.AfterSaleRule.SupplyDayReturnRule.Enable
|
return result.Data.AfterSaleRule.SupplyDayReturnRule.Enable, result.Data.AfterSaleRule.SupplyDayReturnRule.Options[0].Value
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetProductUpdateRule2 查询分类是否支持七天无理由退货
|
// GetProductUpdateRule2 查询分类是否支持七天无理由退货
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ func TestEditStoreCommodity(t *testing.T) {
|
|||||||
WhiteBackGroundPicUrl: "https://p3-aio.ecombdimg.com/obj/ecom-shop-material/VqGYBUaL_m_4bf295c4d3b6466138c5650a4d433935_sx_504060_www800-800",
|
WhiteBackGroundPicUrl: "https://p3-aio.ecombdimg.com/obj/ecom-shop-material/VqGYBUaL_m_4bf295c4d3b6466138c5650a4d433935_sx_504060_www800-800",
|
||||||
LongPicUrl: "",
|
LongPicUrl: "",
|
||||||
AfterSaleService: map[string]string{
|
AfterSaleService: map[string]string{
|
||||||
"supply_day_return_selector": "7",
|
"supply_day_return_selector": "7-0",
|
||||||
},
|
},
|
||||||
SellChannel: []int64{0},
|
SellChannel: []int64{0},
|
||||||
DelayRule: nil,
|
DelayRule: nil,
|
||||||
@@ -151,13 +151,6 @@ func TestEditStoreCommodity(t *testing.T) {
|
|||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestStoreName(t *testing.T) {
|
|
||||||
address := `闵庄南路京泉馨苑便民市场卖菜的第二家`
|
|
||||||
subStr := "海淀区"
|
|
||||||
index := strings.LastIndex(address, subStr)
|
|
||||||
fmt.Println(address[index+len(subStr):])
|
|
||||||
}
|
|
||||||
|
|
||||||
// 上架2
|
// 上架2
|
||||||
func TestEditStoreCommodity2(t *testing.T) {
|
func TestEditStoreCommodity2(t *testing.T) {
|
||||||
a.EditStoreCommodityCommit(&product_editV2_commit_request.ProductEditV2Param2{
|
a.EditStoreCommodityCommit(&product_editV2_commit_request.ProductEditV2Param2{
|
||||||
|
|||||||
Reference in New Issue
Block a user