1
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"git.rosy.net.cn/baseapi/platformapi/tiktok_shop/tiktok_api"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"strings"
|
||||
@@ -14,8 +15,13 @@ import (
|
||||
//更新抖店电子围栏
|
||||
func (c *DeliveryHandler) UpdateStore(ctx *jxcontext.Context, storeDetail *dao.StoreDetail2) (err error) {
|
||||
var (
|
||||
db = dao.GetDB()
|
||||
vertex []warehouse_setFence_request.VerticesItem
|
||||
)
|
||||
if _, err := dao.GetStoresMapList(db, []int{model.VendorIDDD}, []int{storeDetail.Store.ID}, nil, model.StoreStatusAll, model.StoreIsSyncYes, "", "", ""); err != nil {
|
||||
|
||||
}
|
||||
|
||||
if globals.EnableStoreWrite {
|
||||
param := &warehouse_setFence_request.WarehouseSetFenceParam{
|
||||
FenceInfo: &warehouse_setFence_request.FenceInfo{
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
package tiktok_store
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"github.com/golang/tools/go/ssa/interp/testdata/src/fmt"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestStoreUpdateFence(t *testing.T) {
|
||||
tempStr := strings.Split("104.111331,30.67964544419017;104.13348225189759,30.671752134736078;104.14265760085712,30.652696;104.13348225189759,30.63363986526392;104.111331,30.625746555809826;104.08917974810242,30.63363986526392;104.0800043991429,30.652696;104.08917974810242,30.671752134736078", ";")
|
||||
fmt.Println("%d", len(tempStr))
|
||||
for v := len(tempStr) - 1; v >= 0; v-- {
|
||||
s2 := strings.Split(tempStr[v], ",")
|
||||
Longitude := utils.Str2Float64(s2[0])
|
||||
Latitude := utils.Str2Float64(s2[1])
|
||||
fmt.Sprintf("%s,%s", Longitude, Latitude)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user