This commit is contained in:
邹宗楠
2024-02-27 10:58:13 +08:00
parent 0c8c6b9d3e
commit c067af71b6
5 changed files with 3 additions and 19 deletions

View File

@@ -984,13 +984,13 @@ func (s *DefScheduler) createWaybillOn3rdProviders(savedOrderInfo *WatchOrderInf
excludeVendorIDs = []int{model.VendorIDFengNiao, model.VendorIDMTPS, model.VendorIDUUPT, model.VendorIDSFPS}
vendorID = model.VendorIDDada
case model.VendorIDMTPS:
excludeVendorIDs = []int{model.VendorIDDada, model.VendorIDMTPS, model.VendorIDUUPT, model.VendorIDSFPS}
excludeVendorIDs = []int{model.VendorIDDada, model.VendorIDFengNiao, model.VendorIDUUPT, model.VendorIDSFPS}
vendorID = model.VendorIDMTPS
case model.VendorIDUUPT:
excludeVendorIDs = []int{model.VendorIDDada, model.VendorIDMTPS, model.VendorIDUUPT, model.VendorIDSFPS}
excludeVendorIDs = []int{model.VendorIDDada, model.VendorIDMTPS, model.VendorIDFengNiao, model.VendorIDSFPS}
vendorID = model.VendorIDUUPT
case model.VendorIDSFPS:
excludeVendorIDs = []int{model.VendorIDDada, model.VendorIDMTPS, model.VendorIDUUPT, model.VendorIDSFPS}
excludeVendorIDs = []int{model.VendorIDDada, model.VendorIDMTPS, model.VendorIDUUPT, model.VendorIDFengNiao}
vendorID = model.VendorIDSFPS
case model.VendorIDFengNiao:
excludeVendorIDs = []int{model.VendorIDDada, model.VendorIDMTPS, model.VendorIDUUPT, model.VendorIDSFPS}

View File

@@ -1917,8 +1917,6 @@ func UpdateStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendor
valid["address"] = address
}
globals.SugarLogger.Debugf("=valid============ : %s", utils.Format4Output(valid, false))
globals.SugarLogger.Debugf("=valid============ : %s", utils.Format4Output(isUpdateStoreNeedSync(valid), false))
if isUpdateStoreNeedSync(valid) { // 同步修改门店已经配送门店
_, err = CurVendorSync.SyncStore(ctx, db, vendorID, storeID, false, userName) // address原来的userName 因为storeMap无法保存address,所以美团暂时使用该参数代替
//updateCourierStores(ctx, storeID)

View File

@@ -149,12 +149,9 @@ func GetActStoreSkuVendorList(db *DaoDB, actID int, vendorIDs, storeIDs, skuIDs
sqlParams = append(sqlParams, pageSize, offset)
txDB, _ := Begin(db)
defer Commit(db, txDB)
globals.SugarLogger.Debugf("========sql := %s", sql)
globals.SugarLogger.Debugf("========sql := %s", utils.Format4Output(sqlParams, false))
if err = GetRowsTx(txDB, &actStoreSkuList, sql, sqlParams...); err == nil {
totalCount = GetLastTotalRowCount2(db, txDB)
}
globals.SugarLogger.Debugf("========actStoreSkuList := %s", utils.Format4Output(actStoreSkuList, false))
return totalCount, actStoreSkuList, err
}

View File

@@ -337,7 +337,6 @@ func (p *PurchaseHandler) GetStoreStatus(ctx *jxcontext.Context, vendorOrgCode s
// 当前京东的storeCrud消息不会在门店状态改变时发送所以意义不大先放在这里
func (c *PurchaseHandler) OnStoreMsg(vendorOrgCode string, msg *jdapi.CallbackOrderMsg) (response *jdapi.CallbackResponse) {
globals.SugarLogger.Debugf("OnStoreMsg========= %s", utils.Format4Output(msg, false))
var err error
if msg.StatusID == jdapi.StatusIDUpdateStore {
var storeStatus int

View File

@@ -141,11 +141,6 @@ func cancelOneShopAct(act *model.Act2, vendorStoreID string, actStoreSku []*mode
if list := storeSku2ActData4Delete(actStoreSku, nil /*model.IsSyncStatusNeedDelete*/); len(list) > 0 {
if globals.EnableMtwmStoreWrite {
failedList2, err2 := api.MtwmAPI.RetailDiscountDelete2(vendorStoreID, jxActType2Mtwm(act.Type), list)
globals.SugarLogger.Debugf("==============failedList2 := %s", utils.Format4Output(failedList2, false))
globals.SugarLogger.Debugf("==============err2 := %v", err2)
globals.SugarLogger.Debugf("==============vendorStoreID := %s", utils.Format4Output(vendorStoreID, false))
globals.SugarLogger.Debugf("============== jxActType2Mtwm(act.Type) := %s", utils.Format4Output(jxActType2Mtwm(act.Type), false))
globals.SugarLogger.Debugf("==============list := %s", utils.Format4Output(list, false))
actStoreSkuMap := make(map[string]*model.ActStoreSku2)
for _, v := range actStoreSku {
actStoreSkuMap[v.VendorActID] = v
@@ -233,26 +228,21 @@ func (c *PurchaseHandler) SyncAct(ctx *jxcontext.Context, parentTask tasksch.ITa
}
}
}
globals.SugarLogger.Debugf("=========actStoreSkuList4Create := %s", utils.Format4Output(actStoreSkuList4Create, false))
err = func() (err error) {
globals.SugarLogger.Debugf("=========act := %s", utils.Format4Output(act, false))
if model.IsSyncStatusDelete(act.SyncStatus) {
globals.SugarLogger.Debugf("=========act := %s", "delete")
canceledList, err2 := cancelSkuAct(ctx, nil, act, actStoreSkuList)
updateItems = append(updateItems, partner.ActStoreSku2Update(ctx, canceledList, model.SyncFlagModifiedMask)...)
if err = err2; err == nil {
updateItems = append(updateItems, partner.Act2Update(ctx, act, model.SyncFlagModifiedMask))
}
} else if model.IsSyncStatusNew(act.SyncStatus) {
globals.SugarLogger.Debugf("=========act := %s", "create")
createdList, err2 := createSkuAct(ctx, nil, act, actStoreSkuList4Create)
updateItems = append(updateItems, partner.ActStoreSku2Update(ctx, createdList, model.SyncFlagNewMask)...)
if err = err2; err == nil {
updateItems = append(updateItems, partner.Act2Update(ctx, act, model.SyncFlagNewMask))
}
} else if model.IsSyncStatusUpdate(act.SyncStatus) {
globals.SugarLogger.Debugf("=========act := %s", "update")
if len(actStoreSkuList4Create) > 0 {
addedList, err2 := createSkuAct(ctx, nil, act, actStoreSkuList4Create)
updateItems = append(updateItems, partner.ActStoreSku2Update(ctx, addedList, model.SyncFlagNewMask)...)