1
This commit is contained in:
@@ -1919,6 +1919,7 @@ func UpdateStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendor
|
||||
valid["address"] = address
|
||||
}
|
||||
|
||||
globals.SugarLogger.Debugf("===============aa:= %s", utils.Format4Output(isUpdateStoreNeedSync(valid), false))
|
||||
if isUpdateStoreNeedSync(valid) { // 同步修改门店已经配送门店
|
||||
_, err = CurVendorSync.SyncStore(ctx, db, vendorID, storeID, false, userName)
|
||||
//updateCourierStores(ctx, storeID)
|
||||
|
||||
@@ -249,6 +249,7 @@ func (v *VendorSync) SyncStore2(ctx *jxcontext.Context, db *dao.DaoDB, vendorIDs
|
||||
db2 = dao.GetDB()
|
||||
}
|
||||
if model.IsSyncStatusNew(storeMap.SyncStatus) {
|
||||
globals.SugarLogger.Debugf("==============storeMap.SyncStatus1 %d", storeMap.SyncStatus)
|
||||
storeDetail, _ := dao.GetStoreDetail(db, storeMap.StoreID, storeMap.VendorID, storeMap.VendorOrgCode)
|
||||
if vendorStoreID, err = handler.CreateStore2(db2, storeMap.StoreID, userName, nil, storeDetail); err == nil {
|
||||
resultList = append(resultList, 1)
|
||||
@@ -256,12 +257,14 @@ func (v *VendorSync) SyncStore2(ctx *jxcontext.Context, db *dao.DaoDB, vendorIDs
|
||||
failedList = putils.GetErrMsg2FailedSingleList(nil, err, storeMap.StoreID, model.VendorChineseNames[storeMap.VendorID], "创建门店")
|
||||
}
|
||||
} else if model.IsSyncStatusDelete(storeMap.SyncStatus) {
|
||||
globals.SugarLogger.Debugf("==============storeMap.SyncStatus2 %d", storeMap.SyncStatus)
|
||||
if err = handler.DeleteStore(db2, storeMap.StoreID, userName); err == nil {
|
||||
resultList = append(resultList, 1)
|
||||
} else {
|
||||
failedList = putils.GetErrMsg2FailedSingleList(nil, err, storeMap.StoreID, model.VendorChineseNames[storeMap.VendorID], "删除门店")
|
||||
}
|
||||
} else {
|
||||
globals.SugarLogger.Debugf("==============storeMap.SyncStatus3 %d", storeMap.SyncStatus)
|
||||
if err = handler.UpdateStore(db2, storeMap.StoreID, userName); err == nil {
|
||||
resultList = append(resultList, 1)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user