1
This commit is contained in:
@@ -171,7 +171,6 @@ func (p *PurchaseHandler) UpdateStoreSkusPrice(ctx *jxcontext.Context, vendorOrg
|
||||
}
|
||||
|
||||
func (p *PurchaseHandler) UpdateStoreSkusStock(ctx *jxcontext.Context, vendorOrgCode string, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (failedList []*partner.StoreSkuInfoWithErr, err error) {
|
||||
globals.SugarLogger.Debugf("-----------storeskuList %s", utils.Format4Output(storeSkuList, false))
|
||||
if len(storeSkuList) == 1 && vendorOrgCode != apimanager.FakeJdOrgCode {
|
||||
if globals.EnableJdStoreWrite {
|
||||
err = getAPI(vendorOrgCode).UpdateCurrentQty(ctx.GetTrackInfo(), vendorStoreID, utils.Str2Int64WithDefault(storeSkuList[0].VendorSkuID, 0), storeSkuList[0].Stock)
|
||||
@@ -189,10 +188,7 @@ func (p *PurchaseHandler) UpdateStoreSkusStock(ctx *jxcontext.Context, vendorOrg
|
||||
var responseList []*jdapi.StoreSkuBatchUpdateResponse
|
||||
var err2 error
|
||||
if vendorOrgCode != apimanager.FakeJdOrgCode {
|
||||
globals.SugarLogger.Debugf("-----------skuStockList %s", utils.Format4Output(skuStockList, false))
|
||||
responseList, err2 = getAPI(vendorOrgCode).BatchUpdateCurrentQtys(ctx.GetTrackInfo(), "", vendorStoreID, skuStockList, ctx.GetUserName())
|
||||
globals.SugarLogger.Debugf("-----------responseList %s", utils.Format4Output(responseList, false))
|
||||
globals.SugarLogger.Debugf("-----------err2 %v", err2)
|
||||
} else {
|
||||
responseList, err2 = getAPI(vendorOrgCode).FakeBatchUpdateCurrentQtys(ctx.GetTrackInfo(), "", vendorStoreID, skuStockList, ctx.GetUserName())
|
||||
}
|
||||
|
||||
@@ -83,7 +83,6 @@ func OnOrderMsg(msgId string, msg interface{}) (response *tiktokShop.CallbackRes
|
||||
|
||||
// HttpToGuoYuan 暂时还未开通果园和宠物的抖音
|
||||
func HttpToGuoYuan(param map[string]interface{}, requestType string, serverType string) (*http.Response, error) {
|
||||
return nil, nil
|
||||
var paramData []byte
|
||||
var err error
|
||||
if requestType == "order" || requestType == "waybill" {
|
||||
@@ -134,6 +133,8 @@ func HttpToGuoYuan(param map[string]interface{}, requestType string, serverType
|
||||
}
|
||||
|
||||
httpReq.Header.Set("Content-Type", "application/json")
|
||||
//httpReq.Header.Set("Content-Type", "application/x-www-form-urlencoded")
|
||||
httpReq.Header.Set("accept", "application/json, text/plain, */*")
|
||||
|
||||
httpRes, err := http.DefaultClient.Do(httpReq)
|
||||
return httpRes, err
|
||||
|
||||
Reference in New Issue
Block a user