不能重复绑定平台门店
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user