1
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package tiktok_store
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
@@ -172,19 +173,23 @@ func CreateFenceByStore(appOrgCode string, storeID int64) (fenceID string, err e
|
||||
}
|
||||
}
|
||||
|
||||
// 通过门店更新电子围栏
|
||||
func UpdateFenceByStore(appOrgCode, outFenceID string, storeID int) error {
|
||||
// 通过围栏id更新电子围栏
|
||||
func UpdateFenceByStore(appOrgCode, outFenceID, storeID string) error {
|
||||
var (
|
||||
db *dao.DaoDB
|
||||
localStore *LocalStore
|
||||
vertex []warehouse_setFence_request.VerticesItem
|
||||
param = &warehouse_setFence_request.WarehouseSetFenceParam{}
|
||||
)
|
||||
localID, err := dao.GetStoreDetail(db, utils.Str2Int(storeID), 0, "")
|
||||
if err != nil {
|
||||
return errors.New("获取门店id失败")
|
||||
}
|
||||
sqlParam := []interface{}{}
|
||||
sqlStr := `SELECT t.lng,t.lat,t.delivery_range_type,t.delivery_range FROM store t`
|
||||
if storeID != 0 {
|
||||
if localID.Store.ID != 0 {
|
||||
sqlStr += " WHERE t.id = ? "
|
||||
sqlParam = append(sqlParam, storeID)
|
||||
sqlParam = append(sqlParam, localID.Store.ID)
|
||||
} else {
|
||||
return fmt.Errorf("storeID必填")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user