This commit is contained in:
suyl
2021-06-21 18:58:57 +08:00
parent 8ce4c93c5f
commit fbb0e8a840
7 changed files with 54 additions and 42 deletions

View File

@@ -191,3 +191,14 @@ func (a *API) FindStoreInfoByExtStoreId(storeID int) (queryEntityStoreResult *Qu
return queryEntityStoreResult, err
}
//更新门店状态
//https://open.jd.com/home/home#/doc/api?apiCateId=351&apiId=6418&apiName=jingdong.updateStoreStatus
// 停启状态 1.启用2.停用
func (a *API) UpdateStoreStatusAPI(storeID, status int) (err error) {
_, err = a.AccessAPI("jingdong.updateStoreStatus", prodURL, map[string]interface{}{
"storeStatus": status,
"id": storeID,
})
return err
}

View File

@@ -2,7 +2,6 @@ package jdshopapi
import (
"encoding/base64"
"fmt"
"testing"
"git.rosy.net.cn/baseapi/utils"
@@ -111,38 +110,10 @@ func TestFindStoreInfoByExtStoreId(t *testing.T) {
t.Log(utils.Format4Output(result, false))
}
func TestWIREHL(t *testing.T) {
fmt.Println(largeGroupPositions("abcdddeeeeaabbbcd"))
}
func largeGroupPositions(s string) (result [][]int) {
var (
l = 0
r = 1
count int
)
fmt.Println(len(s))
for {
fmt.Println(l, r, count)
if r == len(s) {
if count > 1 {
result = append(result, []int{l, r - 1})
count = 0
}
break
}
if s[l] != s[r] {
if count > 1 {
result = append(result, []int{l, r - 1})
count = 0
}
l = r
r++
count = 0
} else {
count++
r++
}
func TestUpdateStoreStatusAPI(t *testing.T) {
err := api.UpdateStoreStatusAPI(69353633443, 0)
if err != nil {
t.Fatal(err)
}
return result
// t.Log(utils.Format4Output(result, false))
}