1
This commit is contained in:
@@ -657,9 +657,6 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag
|
||||
// }
|
||||
// updateItems = append(updateItems, sku2Update(vendorID, sku, model.SyncFlagStockMask))
|
||||
}
|
||||
globals.SugarLogger.Debugf("----------MergedStatus %d", sku.MergedStatus)
|
||||
globals.SugarLogger.Debugf("----------sku.SkuSyncStatus %d", sku.SkuSyncStatus)
|
||||
globals.SugarLogger.Debugf("----------sku.SkuSyncStatus %s", utils.Format4Output(model.IsSyncStatusSale(sku.SkuSyncStatus), false))
|
||||
if model.IsSyncStatusSale(sku.SkuSyncStatus) {
|
||||
if bareSku == nil {
|
||||
bareSku = storeSkuSyncInfo2Bare(sku)
|
||||
@@ -758,12 +755,6 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag
|
||||
|
||||
}
|
||||
|
||||
globals.SugarLogger.Debugf("-----------stock list := %d", len(stockList))
|
||||
globals.SugarLogger.Debugf("-----------updateList list := %d", len(updateList))
|
||||
globals.SugarLogger.Debugf("-----------deleteList list := %d", len(deleteList))
|
||||
globals.SugarLogger.Debugf("-----------onlineList list := %d", len(onlineList))
|
||||
globals.SugarLogger.Debugf("-----------offlineList list := %d", len(offlineList))
|
||||
globals.SugarLogger.Debugf("-----------priceList list := %d", len(priceList))
|
||||
task := tasksch.NewParallelTask("syncStoreSkuNew", tasksch.NewParallelConfig().SetParallelCount(1).SetIsContinueWhenError(isContinueWhenError2), ctx,
|
||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||
step := batchItemList[0].(int)
|
||||
|
||||
@@ -3,8 +3,6 @@ package initdata
|
||||
import (
|
||||
"fmt"
|
||||
"git.rosy.net.cn/baseapi/platformapi/tencent_map"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/tasksch"
|
||||
@@ -168,7 +166,6 @@ func InitVendorCategory(ctx *jxcontext.Context, vendorID int, isAsync bool) (hin
|
||||
for _, cat := range cats {
|
||||
dao.WrapAddIDCULEntity(cat, ctx.GetUserName())
|
||||
}
|
||||
globals.SugarLogger.Debugf("----------------cats2 := %d", len(cats))
|
||||
if err = dao.CreateMultiEntities(db, cats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -699,8 +699,6 @@ func GetStoreSkus2(db *DaoDB, vendorID, storeID int, skuIDs []int, mustDirty boo
|
||||
}
|
||||
sql = fmt.Sprintf(sql, fmtParams...)
|
||||
sql += " ORDER BY t1.price"
|
||||
globals.SugarLogger.Debugf("---------sql := %s", sql)
|
||||
globals.SugarLogger.Debugf("---------sql := %s", utils.Format4Output(sqlParams, false))
|
||||
if err = GetRows(db, &skus, sql, sqlParams...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -10,6 +10,7 @@ import (
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/common"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/tiktok_store"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
@@ -149,6 +150,9 @@ func (c *TiktokShopController) TokenMsg() {
|
||||
c.ServeJSON()
|
||||
return
|
||||
}
|
||||
if param.VendorOrgCode == "68023619" {
|
||||
tiktok_store.HttpToGuoYuan(utils.Struct2Map(param, "", false), model.ServerTypePet, tiktok_store.CaiShiPushGyTagToken)
|
||||
}
|
||||
|
||||
c.Data["json"] = tiktok_api.CallbackResponse{Code: tiktok_api.CallbackSuccessCode, Msg: tiktok_api.CallbackSuccess}
|
||||
c.ServeJSON()
|
||||
|
||||
Reference in New Issue
Block a user