1
This commit is contained in:
@@ -4,6 +4,8 @@ import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
util2 "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/util"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
@@ -92,6 +94,7 @@ func (client *TopClient) ExecuteWithSession(method string, data map[string]inter
|
||||
if session != "" {
|
||||
publicParam["session"] = session
|
||||
}
|
||||
globals.SugarLogger.Debugf("参数校验publicParam=%s", utils.Format4Output(publicParam, false))
|
||||
sign := util2.GetSign(publicParam, data, client.AppSecret)
|
||||
// 构建url
|
||||
serverUrl, _ := url.Parse(client.ServerUrl)
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"go.uber.org/zap"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@@ -83,3 +84,26 @@ func TestAbc(t *testing.T) {
|
||||
c := float64(a) / float64(100)
|
||||
fmt.Println(c)
|
||||
}
|
||||
|
||||
func TestShopUpdateInfo(t *testing.T) {
|
||||
start := "00:00"
|
||||
end := "24:00"
|
||||
err := apiTao.ShopUpdateInfo("JX668998", start, end)
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
func TestShopUpdateRange(t *testing.T) {
|
||||
str := "116.508455,39.97171144419017;116.51455900796353,39.97130202157785;116.52047754873387,39.970086193839784;116.52603079044462,39.968100903286555;116.5310500006565,39.96540647196702;116.53538267320705,39.96208476881338;116.53889716203328,39.95823672209508;116.54148668117058,39.95397925276447;116.54307254939037,39.94944172187276;116.54360658088925,39.944762;116.54307254939037,39.940082278127235;116.54148668117058,39.935544747235525;116.53889716203328,39.931287277904914;116.53538267320705,39.92743923118662;116.5310500006565,39.92411752803297;116.52603079044462,39.92142309671344;116.52047754873387,39.91943780616021;116.51455900796353,39.918221978422146;116.508455,39.917812555809824;116.50235099203647,39.918221978422146;116.49643245126613,39.91943780616021;116.49087920955537,39.92142309671344;116.48585999934349,39.92411752803297;116.48152732679294,39.92743923118662;116.47801283796672,39.931287277904914;116.47542331882941,39.935544747235525;116.47383745060962,39.940082278127235;116.47330341911075,39.944762;116.47383745060962,39.94944172187276;116.47542331882941,39.95397925276447;116.47801283796672,39.95823672209508;116.48152732679294,39.96208476881338;116.48585999934349,39.96540647196702;116.49087920955537,39.968100903286555;116.49643245126613,39.970086193839784;116.50235099203647,39.97130202157785"
|
||||
temp := strings.Split(str, ";")
|
||||
points := make([]Points, 0)
|
||||
for _, v := range temp {
|
||||
s := strings.Split(v, ",")
|
||||
point := Points{
|
||||
Lng: s[0],
|
||||
Lat: s[1],
|
||||
}
|
||||
points = append(points, point)
|
||||
}
|
||||
err := apiTao.ShopUpdateRange("JX668998", points)
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user