添加美团服务商,和自动获取品牌

This commit is contained in:
邹宗楠
2023-02-28 14:14:26 +08:00
parent 855ba4e00d
commit 462334d0c1
7 changed files with 129 additions and 38 deletions

View File

@@ -187,7 +187,7 @@ func (a *API) RetailCatUpdate(poiCode, catName string, updateParams *Param4Updat
// 删除商品分类
// 当分类下存在子级分类或商品时,不允许直接删除此分类。
func (a *API) RetailCatDelete(poiCode, code, name string) (err error) {
func (a *API) RetailCatDelete(poiCode, code, name string, moveProductToUncate int) (err error) {
params := map[string]interface{}{
KeyAppPoiCode: poiCode,
}
@@ -196,6 +196,10 @@ func (a *API) RetailCatDelete(poiCode, code, name string) (err error) {
} else {
params["category_name"] = name
}
if moveProductToUncate != 0 {
params["move_product_to_uncate"] = 1 // 分类存在商品时将商品转移到未分类当中
}
_, err = a.AccessAPI("retailCat/delete", false, params)
return err