1
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
package ebaiapi
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
)
|
||||
|
||||
func TestOrderGet(t *testing.T) {
|
||||
result, err := api.OrderGet("4013840036319612596")
|
||||
result, err := api.OrderGet("4040400104793805400")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
} else {
|
||||
@@ -165,3 +166,83 @@ func TestAggrent(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestForAA(t *testing.T) {
|
||||
|
||||
var a = []int64{6044969,
|
||||
6043622,
|
||||
6044971,
|
||||
6042562,
|
||||
31728,
|
||||
31729,
|
||||
32143,
|
||||
32142,
|
||||
6043605,
|
||||
6043604,
|
||||
6042743,
|
||||
30226,
|
||||
30225,
|
||||
6043959,
|
||||
6043960,
|
||||
6042349,
|
||||
6042296,
|
||||
31882,
|
||||
31871,
|
||||
6042704,
|
||||
6039499,
|
||||
30415,
|
||||
30414,
|
||||
32364,
|
||||
32363,
|
||||
6043603,
|
||||
6043602,
|
||||
30224,
|
||||
30223,
|
||||
6042284,
|
||||
30215,
|
||||
30214,
|
||||
6039424,
|
||||
31235,
|
||||
30368,
|
||||
30370,
|
||||
30369,
|
||||
30183,
|
||||
30182,
|
||||
6042733,
|
||||
6042737,
|
||||
30237,
|
||||
30236,
|
||||
6042287,
|
||||
30213,
|
||||
6042288,
|
||||
30233,
|
||||
30207,
|
||||
30206,
|
||||
30190,
|
||||
30189,
|
||||
6042167,
|
||||
6042166,
|
||||
30413}
|
||||
|
||||
var cc = ""
|
||||
for _, v := range a {
|
||||
if v != 30413 {
|
||||
cc += utils.Int64ToStr(v) + ","
|
||||
}
|
||||
cc += utils.Int64ToStr(v)
|
||||
}
|
||||
fmt.Println(cc)
|
||||
}
|
||||
|
||||
func TestOnline(t *testing.T) {
|
||||
fmt.Println(0&(2|4|32) != 0)
|
||||
fmt.Println(MergeStoreStatus(-2, 1))
|
||||
}
|
||||
|
||||
// 合并得到最终的门店状态
|
||||
func MergeStoreStatus(status int, vendorStatus int) int {
|
||||
if status < vendorStatus {
|
||||
return status
|
||||
}
|
||||
return vendorStatus
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ package jdapi
|
||||
import (
|
||||
"encoding/json"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -337,6 +338,7 @@ func (a *API) GetStoreInfoByStationNo2(storeNo string) (storeDetail *StoreDetail
|
||||
// }
|
||||
|
||||
func (a *API) UpdateStoreInfo4Open2(updateParams *OpStoreParams, modifyCloseStatus bool) (err error) {
|
||||
globals.SugarLogger.Debugf("====UpdateStoreInfo4Open2 : %s", utils.Format4Output(updateParams, false))
|
||||
updateParams.Operator = utils.GetAPIOperator(updateParams.Operator)
|
||||
mapData := utils.Struct2MapByJson(updateParams)
|
||||
if !modifyCloseStatus {
|
||||
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
// "authority_id": ""
|
||||
//}`
|
||||
|
||||
var token = `{"access_token":"c2e78f4f-fb23-4729-b9b1-8330209df50b","expires_in":1679259342,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"83548fb9-d9ea-4665-bd8c-4dbb949338de","authority_id":""}`
|
||||
var token = `{"access_token":"2edc427e-9ab8-430b-a502-6802f1dee387","expires_in":1679861437,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"dda56ad5-521b-4b87-9d74-bd6df13df1aa","authority_id":""}`
|
||||
|
||||
//var token = `{"access_token":"e3173e9f-266f-4d87-88e7-e7cd837bc9d9","expires_in":1672882632,"scope":"SCOPE","shop_id":68023619,"shop_name":"京西到家","refresh_token":"5070aae2-493f-46bd-b5d6-6ea0cd64729f","authority_id":""}`
|
||||
|
||||
|
||||
@@ -7,10 +7,22 @@ import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestN2ame(t *testing.T) {
|
||||
polay := make(map[string]interface{}, 0)
|
||||
polay["a"] = ""
|
||||
polay["b"] = "1"
|
||||
|
||||
fmt.Println(polay["a"].(string))
|
||||
fmt.Println(polay["b"].(string))
|
||||
fmt.Println(polay["c"].(string))
|
||||
}
|
||||
|
||||
func TestGetRecommendCategory(t *testing.T) {
|
||||
img, _, err := GetTiktokImgListTest(a, "668707", "", "", "http://img20.360buyimg.com/vc/jfs/t1/8979/39/8591/236012/5c0e45f3E1537c120/a66aafc95cf66977.jpg", "http://img20.360buyimg.com/vc/jfs/t1/23027/3/955/82830/5c0e45f3E0855eeae/ae65ee9555a29579.jpg")
|
||||
fmt.Println(err)
|
||||
a.GetRecommendCategory(strings.Split(img, "|"))
|
||||
data, err := a.GetRecommendCategory(strings.Split(img, "|"))
|
||||
fmt.Println(data)
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
// GetTiktokImgList 获取抖音图片链接
|
||||
|
||||
Reference in New Issue
Block a user