From b33f4e333b5833f0d948aef1487c6f10acff81d0 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 17:53:32 +0800 Subject: [PATCH] 1 --- business/jxstore/cms/store.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index 3a5c3432a..851ec951d 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -210,6 +210,7 @@ var ( "freightDeductionPack": 1, "vendorStoreName": 1, "boxFee": 1, + "address": 1, } WatchVendorStoreTimeList = []string{ @@ -1792,6 +1793,21 @@ func UpdateStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendor // } syncStatus |= model.SyncFlagStoreName } + + // 增加门店地址修改同步 + storeDetail, err := dao.GetStoreBaseByVendorStoreID(storeMap.VendorStoreID, storeMap.VendorID) + if err != nil || storeDetail == nil { + return 0, fmt.Errorf("基础门店信息异常,请联系管理员") + } + if storeDetail != nil && payload["address"].(string) != storeDetail.Address { + // 修改门店地址 + storeDetail.Address = payload["address"].(string) + dao.UpdateEntity(db, storeDetail, "Address") + // 添加同步 + valid["address"] = payload["address"].(string) + syncStatus |= model.SyncFlagStoreName + } + //增加同步到抖店厂商的同步标志 DDFlag := false errList := errlist.ErrList{} @@ -1886,6 +1902,7 @@ func UpdateStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendor } } dao.Commit(db, txDB) + if isStoreMapNeedSync(vendorID, valid) { _, err = CurVendorSync.SyncStore(ctx, db, vendorID, storeID, false, userName) }