1
This commit is contained in:
@@ -58,10 +58,9 @@ func (P *PurchaseHandler) BatchCreateWarehouse(param warehouse_createBatch_reque
|
||||
|
||||
// /warehouse/bindStore 仓库绑定门店
|
||||
func (P *PurchaseHandler) BindStoreWarehouse(storeIDs []int64, outWarehouseID, appOrgCode string) error {
|
||||
tempWarehouseID := "门店编码:" + outWarehouseID + "的仓库"
|
||||
param := &warehouse_bindStore_request.WarehouseBindStoreParam{
|
||||
StoreIds: storeIDs,
|
||||
OutWarehouseId: tempWarehouseID,
|
||||
OutWarehouseId: outWarehouseID,
|
||||
}
|
||||
if _, err := getAPI(appOrgCode, 0, "").StoreBindWarehouse(param); err != nil {
|
||||
return err
|
||||
@@ -99,7 +98,7 @@ func CreateFenceByStore(storeID int) (fenceID string, err error) {
|
||||
if err = dao.GetRow(db, &localStore, sqlStr, sqlParam...); err == nil {
|
||||
param := &warehouse_createFence_request.WarehouseCreateFenceParam{
|
||||
FenceInfo: &warehouse_createFence_request.FenceInfo{
|
||||
OutFenceId: "京西门店:" + utils.Int2Str(storeID) + " 的电子围栏",
|
||||
OutFenceId: utils.Int2Str(storeID), //绑定基于此id
|
||||
Shape: int32(localStore.DeliveryRangeType),
|
||||
},
|
||||
}
|
||||
@@ -136,7 +135,7 @@ func CreateFenceByStore(storeID int) (fenceID string, err error) {
|
||||
}
|
||||
|
||||
//直接创建电子围栏方式
|
||||
func (P *PurchaseHandler) CreateFenceDirectly(param warehouse_createFence_request.WarehouseCreateFenceParam) (fenceID string, err error) {
|
||||
func CreateFenceDirectly(param warehouse_createFence_request.WarehouseCreateFenceParam) (fenceID string, err error) {
|
||||
info := &warehouse_createFence_request.WarehouseCreateFenceParam{
|
||||
FenceInfo: param.FenceInfo,
|
||||
}
|
||||
@@ -169,8 +168,8 @@ func UpdateFenceByStore(storeID int) error {
|
||||
if err := dao.GetRow(db, &localStore, sqlStr, sqlParam...); err == nil {
|
||||
param := &warehouse_createFence_request.WarehouseCreateFenceParam{
|
||||
FenceInfo: &warehouse_createFence_request.FenceInfo{
|
||||
//OutFenceId: "京西门店:" + utils.Int2Str(storeID) + " 的电子围栏",
|
||||
Shape: int32(localStore.DeliveryRangeType),
|
||||
OutFenceId: utils.Int2Str(storeID),
|
||||
Shape: int32(localStore.DeliveryRangeType),
|
||||
},
|
||||
}
|
||||
if localStore.DeliveryRangeType == tiktok_api.ShapeCircular {
|
||||
@@ -197,12 +196,11 @@ func UpdateFenceByStore(storeID int) error {
|
||||
_, err := getAPI("", 0, "").CreateFence(param)
|
||||
if err != nil {
|
||||
return err
|
||||
} else {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
//门店直接绑定围栏
|
||||
|
||||
Reference in New Issue
Block a user