This commit is contained in:
邹宗楠
2023-09-22 11:34:25 +08:00
parent ae11ff5483
commit 9b487de1ef
3 changed files with 8 additions and 8 deletions

View File

@@ -20,13 +20,13 @@ func init() {
baseapi.Init(sugarLogger)
// 菜市
//api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "")
api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "")
// 果园
//api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "")
//商超
api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_nngsVP37s-HXY86xe85H7Q") //token_n4TwqCntWWuvQwAawzxC0w
//api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_nngsVP37s-HXY86xe85H7Q") //token_n4TwqCntWWuvQwAawzxC0w
//api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_r36FEse6_ywebQI65FNNWA") //token_n4TwqCntWWuvQwAawzxC0w
cookieStr := `
acctId=57396785; token=0bWbK5VbK50E2BmIhIH2zHB-am_y7mB37yXHm6RLZWx4*; wmPoiId=-1;

View File

@@ -189,7 +189,6 @@ func (a *API) RetailCatUpdate(poiCode, catName string, updateParams *Param4Updat
params["category_name"] = catName
time.Sleep(200 * time.Millisecond)
globals.SugarLogger.Debugf("=======params : %s", utils.Format4Output(params, false))
revtel, err := a.AccessAPI("retailCat/update", false, params)
if err != nil {
globals.SugarLogger.Debugf("=======RetailCatUpdate : %v", err)

View File

@@ -13,11 +13,12 @@ import (
// 测试添加分类
func TestRetailCatUpdate(t *testing.T) {
err := api.RetailCatUpdate("17250949", "火腿罐头", &Param4UpdateCat{
CategoryNameOrigin: "",
CategoryCodeOrigin: "",
CategoryCode: "",
Sequence: 0,
err := api.RetailCatUpdate("19120530", "海鲜火锅丸", &Param4UpdateCat{
CategoryNameOrigin: "海鲜火锅丸",
CategoryCodeOrigin: "",
CategoryCode: "",
SecondaryCategoryName: "贝壳类",
Sequence: 3,
})
if err != nil {
t.Fatal(err)