1
This commit is contained in:
@@ -43,8 +43,8 @@ func TestPoiSave(t *testing.T) {
|
|||||||
//}
|
//}
|
||||||
poiParams := map[string]interface{}{}
|
poiParams := map[string]interface{}{}
|
||||||
//utils.FilterMapNilMembers(utils.Struct2FlatMap(result[0]))
|
//utils.FilterMapNilMembers(utils.Struct2FlatMap(result[0]))
|
||||||
poiParams["name"] = "京西果园·果切·水果捞(金碧园店)"
|
poiParams["address"] = "云南省楚雄彝族自治州楚雄市鹿城镇陈家槽子村小吃一条街B21号"
|
||||||
err := api.PoiSave("9410009", poiParams)
|
err := api.PoiSave("15467875", poiParams)
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -271,6 +271,7 @@ func handleRetailBatchResultByRegexp(result interface{}) (failedFoodList []*AppF
|
|||||||
// https://developer.waimai.meituan.com/home/myquestionDetail/6716
|
// https://developer.waimai.meituan.com/home/myquestionDetail/6716
|
||||||
// 另外这个接口即使不指定operate_type为1,也可能报错:”商品spu名称在该店内分类中已存在“,原因就是已经存在两个相同的SKU了
|
// 另外这个接口即使不指定operate_type为1,也可能报错:”商品spu名称在该店内分类中已存在“,原因就是已经存在两个相同的SKU了
|
||||||
func (a *API) RetailInitData(trackInfo, poiCode, foodCode string, params map[string]interface{}) (err error) {
|
func (a *API) RetailInitData(trackInfo, poiCode, foodCode string, params map[string]interface{}) (err error) {
|
||||||
|
globals.SugarLogger.Debugf("===========create sku mt : %s,%s,%s,%s", trackInfo, poiCode, foodCode, utils.Format4Output(params, false))
|
||||||
_, err = a.AccessAPI2("retail/initdata", false, utils.MergeMaps(map[string]interface{}{
|
_, err = a.AccessAPI2("retail/initdata", false, utils.MergeMaps(map[string]interface{}{
|
||||||
KeyAppPoiCode: poiCode,
|
KeyAppPoiCode: poiCode,
|
||||||
KeyAppFoodCode: foodCode,
|
KeyAppFoodCode: foodCode,
|
||||||
|
|||||||
32
platformapi/tiktok_shop/tiktok_api/delete_test.go
Normal file
32
platformapi/tiktok_shop/tiktok_api/delete_test.go
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
package tiktok_api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestDeleteSku(t *testing.T) {
|
||||||
|
var tiktokId = []int64{
|
||||||
|
3589392977455372474,
|
||||||
|
}
|
||||||
|
for _, v := range tiktokId {
|
||||||
|
if err := a.DeleteStoreCommodity(v); err != nil {
|
||||||
|
fmt.Println(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func TestTryCatName2Code(t *testing.T) {
|
||||||
|
code := tryCatName2Code("3039")
|
||||||
|
fmt.Println(code)
|
||||||
|
}
|
||||||
|
|
||||||
|
func tryCatName2Code(originName string) (catCodeStr string) {
|
||||||
|
if intValue := utils.Str2Int64WithDefault(originName, 0); intValue > 0 {
|
||||||
|
catCodeStr = utils.Int64ToStr(intValue)
|
||||||
|
if catCodeStr != originName {
|
||||||
|
catCodeStr = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return catCodeStr
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user