“1”
This commit is contained in:
@@ -6334,6 +6334,22 @@ func SetStoreAutoCallRider(vendorOrgCode string, openIDs, closeIDs []int64) (str
|
||||
return "", nil
|
||||
}
|
||||
|
||||
// CreateDDWarehouse 创建抖音门店区域仓
|
||||
func CreateDDWarehouse(vendorOrgCode string, vendorStoreID, storeID int64) error {
|
||||
bind, err := tiktok_store.GetWarehouseByStore(vendorOrgCode, vendorStoreID)
|
||||
if err == nil && bind[utils.Int64ToStr(storeID)][0].WarehouseId > 0 {
|
||||
return nil
|
||||
}
|
||||
if warehouseID, err := tiktok_store.CreateWarehouse(vendorOrgCode, storeID); err != nil || warehouseID == 0 {
|
||||
return fmt.Errorf("门店(%d) 创建仓库失败:%v", storeID, err)
|
||||
} else {
|
||||
if err = tiktok_store.BindStoreWarehouse(vendorOrgCode, utils.Int64ToStr(storeID), vendorStoreID); err != nil { //仓库绑定通过自定义外部ID
|
||||
return fmt.Errorf("门店(%d) 绑定仓库%d 失败:%v", storeID, warehouseID, err)
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
type MtRelInfo struct {
|
||||
PoiCode string `json:"poi_code"`
|
||||
PicUrl string `json:"pic_url"`
|
||||
|
||||
@@ -83,11 +83,9 @@ func ReadMsgFromClient(vendorID int, elmAppID string, msg interface{}) error {
|
||||
LatestTime: pushContent.Cts,
|
||||
OrderID: "",
|
||||
}
|
||||
globals.SugarLogger.Debugf("ReadMsgFromClient pushContent.OrderID=%d", pushContent.OrderID)
|
||||
if pushContent.OrderID != 0 {
|
||||
userList.OrderID = utils.Int2Str(pushContent.OrderID)
|
||||
}
|
||||
globals.SugarLogger.Debugf("ReadMsgFromClient userList=%s", utils.Format4Output(userList, false))
|
||||
}
|
||||
if vendorID == VendorIDELM {
|
||||
var ElmData = ebaiapi.ImMessageSend{}
|
||||
@@ -147,13 +145,10 @@ func ReadMsgFromVendor(vendorID int, elmAppID string, msg []byte) error {
|
||||
LatestTime: PushContentReq.Cts,
|
||||
OrderID: "",
|
||||
}
|
||||
globals.SugarLogger.Debugf("ReadMsgFromVendor PushContentReq.OrderID=%d", PushContentReq.OrderID)
|
||||
|
||||
vendorStoreID = PushContentReq.AppPoiCode
|
||||
if PushContentReq.OrderID != 0 {
|
||||
userList.OrderID = utils.Int2Str(PushContentReq.OrderID)
|
||||
}
|
||||
globals.SugarLogger.Debugf("ReadMsgFromVendor userList=%s", utils.Format4Output(userList, false))
|
||||
}
|
||||
if vendorID == VendorIDELM {
|
||||
var ElmData = ebaiapi.ImMessageSend{}
|
||||
|
||||
Reference in New Issue
Block a user