This commit is contained in:
邹宗楠
2024-11-29 11:48:16 +08:00
parent a97853133e
commit fe6639186e
5 changed files with 2 additions and 9 deletions

View File

@@ -359,7 +359,6 @@ func IsSkuCanSale(saleStatus int) bool {
func CompareJxAndVendor(vendorID int, storeIDStr, vendorStoreID, storeName string, filterJxSkuInfoMap map[int]*dao.StoreSkuNameExt, filterVendorSkuInfoMap map[int]*partner.SkuNameInfo, isJd int) {
//utils.Writelog("进入 CompareJxAndVendor 方法")
var vendorMap map[string]string
baseapi.SugarLogger.Debugf("-----------------------------------------------------------------------------------------------------")
if vendorID == 0 {
//TO DO 进行查询 select count(*) from sku_vendor_category where vendor_id=0; 一共3047 数据一次connection查询出来 组成一个map {categoryID,name}
vendorMap = getJDVendorCategoryMap()

View File

@@ -612,7 +612,6 @@ func (v *VendorSync) SyncStoresSkus(ctx *jxcontext.Context, parentTask tasksch.I
setSyncStatus = model.SyncFlagStoreSkuModifiedMask
}
//权限
globals.SugarLogger.Debugf("---------permission.IsRoled(ctx) : %s", utils.Format4Output(permission.IsRoled(ctx), false))
if permission.IsRoled(ctx) {
if storeIDsMap, err := permission.GetUserStoresResultMap(ctx.GetUserID()); err == nil {
var storeIDs2 []int

View File

@@ -224,6 +224,8 @@ func SyncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag
func SyncStoreSkuNew2(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag int, vendorID, storeID int, vendorStoreID, vendorOrgCode string, nameIDs, skuIDs, excludeSkuIDs []int, useVendorPriceDirectly, isAsync, isContinueWhenError bool) (hint string, err error) {
singleStoreHandler, _ := partner.GetPurchasePlatformFromVendorID(vendorID).(partner.ISingleStoreStoreSkuHandler)
if singleStoreHandler != nil { // 本地创建商品分类
globals.SugarLogger.Debugf("-------------------singleStoreHandler := %s", utils.Format4Output(111111, false))
globals.SugarLogger.Debugf("-------------------singleStoreHandler := %s", utils.Format4Output(singleStoreHandler, false))
if err = CreateStoreCategoryByStoreSku(ctx, vendorID, storeID, vendorStoreID, nameIDs, skuIDs); err != nil {
return "", err
}
@@ -521,7 +523,6 @@ func isSkuLockTimeValid(sku *dao.StoreSkuSyncInfo) bool {
}
func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag int, isFull bool, vendorID, storeID int, vendorOrgCode string, nameIDs, skuIDs, excludeSkuIDs []int, useVendorPriceDirectly, isContinueWhenError bool) (err error) {
globals.SugarLogger.Debugf("---------------111111")
db := dao.GetDB()
storeDetail, err := dao.GetStoreDetail(db, storeID, vendorID, vendorOrgCode)
if err != nil {
@@ -755,10 +756,6 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag
}
globals.SugarLogger.Debugf("---------create:= %s", utils.Format4Output(createList, false))
globals.SugarLogger.Debugf("---------update:= %s", utils.Format4Output(updateList, false))
globals.SugarLogger.Debugf("---------stock:= %s", utils.Format4Output(stockList, false))
globals.SugarLogger.Debugf("---------online:= %s", utils.Format4Output(onlineList, false))
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)

View File

@@ -200,7 +200,6 @@ func CopyMtToMT(ctx *jxcontext.Context, fromStore, toStore *dao.StoreDetail, isA
} else {
toApi = partner.CurAPIManager.GetAPI(model.VendorIDMTWM, toStore.VendorOrgCode).(*mtwmapi.API)
}
globals.SugarLogger.Debugf("--------------1")
taskName := fmt.Sprintf("将美团平台门店[%s],分类和商品复制到[%s]", fromStore.VendorStoreID, toStore.VendorStoreID)
config := tasksch.NewParallelConfig().SetParallelCount(1).SetIsContinueWhenError(false)
work := func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {

View File

@@ -143,7 +143,6 @@ func InitVendorCategory(ctx *jxcontext.Context, vendorID int, isAsync bool) (hin
switch step {
case 0:
cats, err = handler.GetVendorCategories(ctx)
globals.SugarLogger.Debugf("----------------cats := %d", len(cats))
if err != nil {
return nil, err
}