1
This commit is contained in:
@@ -46,6 +46,7 @@ func splicingTimeToDoudian(openTime1, closeTime1, openTime2, closeTime2 int16) (
|
||||
if openTime1 != 0 && closeTime1 != 0 {
|
||||
tOpenTime1 := utils.Int64ToStr(int64(openTime1))
|
||||
len1 := len(tOpenTime1) - 2
|
||||
globals.SugarLogger.Debug("len1====", len1)
|
||||
if utils.Str2Int(tOpenTime1[:len1]) <= 9 {
|
||||
s1 += "0"
|
||||
}
|
||||
@@ -134,10 +135,22 @@ func (P *PurchaseHandler) CreateStore2(db *dao.DaoDB, storeID int, userName stri
|
||||
ShopBatchCreateStoreParam = &shop_batchCreateStore_request.ShopBatchCreateStoreParam{
|
||||
StoreList: lists,
|
||||
}
|
||||
|
||||
if resp, err := getAPI(storeDetail.VendorOrgCode, storeID, storeDetail.VendorStoreID).BatchCreateStore(ShopBatchCreateStoreParam); err != nil {
|
||||
return "", err
|
||||
} else {
|
||||
//if len(resp.ResultList) == 0 {
|
||||
// return "", errors.New("创建店铺失败")
|
||||
//}
|
||||
////创建成功即创建并绑定电子围栏
|
||||
//fences := []string{}
|
||||
//if fenceID, err := CreateFenceByStore(int(resp.ResultList[0].Store.StoreId)); err != nil {
|
||||
// return "", err
|
||||
//} else {
|
||||
// fences = append(fences, fenceID)
|
||||
// if err := BindFenceByStore(resp.ResultList[0].Store.StoreId, fences); err != nil {
|
||||
// return "", err
|
||||
// }
|
||||
//}
|
||||
for k, v := range resp.ResultList {
|
||||
if k != len(resp.ResultList) {
|
||||
storeIDs += utils.Int64ToStr(v.Store.StoreId) + ","
|
||||
|
||||
@@ -13,7 +13,6 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
// todo
|
||||
// /warehouse/createBatch 批量创建区域仓
|
||||
func (P *PurchaseHandler) BatchCreateWarehouse(param warehouse_createBatch_request.WarehouseCreateBatchParam) error {
|
||||
infos := []warehouse_createBatch_request.OutWarehouseListItem{}
|
||||
@@ -62,7 +61,7 @@ type LocalStore struct {
|
||||
}
|
||||
|
||||
// /warehouse/createFence 以门店方式创建电子围栏
|
||||
func (P *PurchaseHandler) CreateFenceByStore(storeID int) (fenceID string, err error) {
|
||||
func CreateFenceByStore(storeID int) (fenceID string, err error) {
|
||||
var (
|
||||
db *dao.DaoDB
|
||||
localStore *LocalStore
|
||||
@@ -132,7 +131,7 @@ func (P *PurchaseHandler) CreateFenceDirectly(param warehouse_createFence_reques
|
||||
}
|
||||
|
||||
//门店直接绑定围栏
|
||||
func (P *PurchaseHandler) BindFenceByStore(storeID int64, addOutFenceIDs []string) error {
|
||||
func BindFenceByStore(storeID int64, addOutFenceIDs []string) error {
|
||||
param := &warehouse_bindFencesByStore_request.WarehouseBindFencesByStoreParam{
|
||||
StoreId: storeID,
|
||||
AddOutFenceIds: addOutFenceIDs,
|
||||
|
||||
Reference in New Issue
Block a user