From b9c5369fb39368ee13901320170a8db665780571 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Thu, 20 Aug 2020 08:56:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E8=83=BD=E9=87=8D=E5=A4=8D=E7=BB=91?= =?UTF-8?q?=E5=AE=9A=E5=B9=B3=E5=8F=B0=E9=97=A8=E5=BA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index 659d9e8d2..ff91ee17b 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -1186,6 +1186,10 @@ func AddStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, vendorID int, vend } } } + storeDetail, _ := dao.GetStoreDetailByVendorStoreID(db, storeMap.VendorStoreID, storeMap.VendorID) + if storeDetail != nil { + return nil, fmt.Errorf("此平台门店ID已在京西有绑定,请先解除绑定,平台门店ID :[%v]", storeMap.VendorStoreID) + } storeMapList, err := dao.GetStoresMapList2(db, []int{vendorID}, []int{storeID}, nil, model.StoreStatusAll, model.StoreIsSyncAll, "", "", true) if len(storeMapList) > 0 { _, err = CurVendorSync.SyncStore(ctx, db, storeMap.VendorID, storeID, false, userName)