- comment of RetailCatUpdate
This commit is contained in:
@@ -5,9 +5,42 @@ import (
|
||||
)
|
||||
|
||||
func TestOrderViewStatus(t *testing.T) {
|
||||
result, err := api.OrderViewStatus(9)
|
||||
result, err := api.OrderViewStatus(33762863658107006)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log(result)
|
||||
}
|
||||
|
||||
func TestOrderGetOrderDetail(t *testing.T) {
|
||||
result, err := api.OrderGetOrderDetail(33762863658107006, false)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if len(result) == 0 {
|
||||
t.Fatal("result should have value")
|
||||
}
|
||||
// t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
func TestOrderLogisticsStatus(t *testing.T) {
|
||||
result, err := api.OrderLogisticsStatus(33762863658107006)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if len(result) == 0 {
|
||||
t.Fatal("result should have value")
|
||||
}
|
||||
// t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
func TestOrderBatchPullPhoneNumber(t *testing.T) {
|
||||
result, err := api.OrderBatchPullPhoneNumber(testPoiCode, 0, 10)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if len(result) == 0 {
|
||||
t.Fatal("result should have value")
|
||||
}
|
||||
// t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
@@ -15,12 +15,11 @@ type RetailCategoryInfo struct {
|
||||
|
||||
// 美团分类没有ID,就以名字为唯一标识,不论级别都必须不能重名
|
||||
// name(和originName)的长度不能超过10个字符(字符,不是字节)
|
||||
// 首次创建分类时,如果secondaryName不为空,会把一级(如果不存在)及二级分类创建起来,
|
||||
// 如果一级分类已经存在时,要创建二级分类,则要求originName与name都不为空,且值是一样的
|
||||
// 大概逻辑是:
|
||||
// 如果originName不存在,则是创建一级分类,如果secondaryName相应还要创建二级分类,此时的sequence指的是二级的,一级的sequence就没有指定了
|
||||
// 如果originName存在,则指的是更新,一级分类就必须存在,如果不想改名,将name填成与originName一样的即可
|
||||
// todo 但这个函数好像就无法实现变更二级分类的名字及sequence
|
||||
// 创建一级分类,originName为空,name为新分类名,secondaryName为空
|
||||
// 修改一级分类,originName为分类名,name为分类新名,secondaryName为空
|
||||
// 创建二级分类,secondaryName为二级分类名,
|
||||
// (如果originName为空,同时创建一级分类,所以如果只是创建二级分类,originName与name要填一样的,此时sequence指的二级分类的sequence,一级分类的sequence为缺省值)
|
||||
// 修改二级分类,originName为二级分类名,name为二级分类新名,secondaryName为空
|
||||
func (a *API) RetailCatUpdate(poiCode, originName, name, secondaryName string, sequence int) (err error) {
|
||||
params := map[string]interface{}{
|
||||
KeyAppPoiCode: poiCode,
|
||||
|
||||
Reference in New Issue
Block a user