From 6e9372ef3b4b59aada591dd87ae73fc78fcd7833 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Tue, 29 Aug 2023 18:14:49 +0800 Subject: [PATCH] 1 --- business/jxstore/cms/store.go | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index d70b5c60c..a295fd12d 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -210,7 +210,6 @@ var ( "freightDeductionPack": 1, "vendorStoreName": 1, "boxFee": 1, - "address": 1, } WatchVendorStoreTimeList = []string{ @@ -1862,20 +1861,18 @@ func UpdateStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendor }() // storeMap 不包含address参数 - if valid["address"] == nil { - if isStoreMapNeedSync(vendorID, valid) { // 对于store vendor map,只有Status改变才需要同步到厂商 - num, err = dao.UpdateEntityLogicallyAndUpdateSyncStatus(db, storeMap, valid, userName, map[string]interface{}{ - model.FieldStoreID: storeID, - model.FieldVendorID: vendorID, - //"VendorOrgCode": vendorOrgCode, - }, model.FieldSyncStatus, syncStatus) - } else { - num, err = dao.UpdateEntityLogically(db, storeMap, valid, userName, map[string]interface{}{ - model.FieldStoreID: storeID, - model.FieldVendorID: vendorID, - //"VendorOrgCode": vendorOrgCode, - }) - } + if isStoreMapNeedSync(vendorID, valid) { // 对于store vendor map,只有Status改变才需要同步到厂商 + num, err = dao.UpdateEntityLogicallyAndUpdateSyncStatus(db, storeMap, valid, userName, map[string]interface{}{ + model.FieldStoreID: storeID, + model.FieldVendorID: vendorID, + //"VendorOrgCode": vendorOrgCode, + }, model.FieldSyncStatus, syncStatus) + } else { + num, err = dao.UpdateEntityLogically(db, storeMap, valid, userName, map[string]interface{}{ + model.FieldStoreID: storeID, + model.FieldVendorID: vendorID, + //"VendorOrgCode": vendorOrgCode, + }) } if err != nil { @@ -1907,7 +1904,7 @@ func UpdateStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendor } dao.Commit(db, txDB) - if isStoreMapNeedSync(vendorID, valid) { + if isStoreMapNeedSync(vendorID, valid) || valid["address"] != nil { _, err = CurVendorSync.SyncStore(ctx, db, vendorID, storeID, false, userName) }