判断只判断三平台
This commit is contained in:
@@ -1159,6 +1159,10 @@ func AddStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, vendorID int, vend
|
||||
} else {
|
||||
err = ErrCanNotFindVendor
|
||||
}
|
||||
storeDetail, _ := dao.GetStoreDetailByVendorStoreID(db, storeMap.VendorStoreID, storeMap.VendorID)
|
||||
if storeDetail != nil {
|
||||
return nil, fmt.Errorf("此平台门店ID已在京西有绑定,请先解除绑定,平台门店ID :[%v]", storeMap.VendorStoreID)
|
||||
}
|
||||
} else if vendorID == model.VendorIDJX {
|
||||
ReCalculateJxPriceLight(db, ctx, storeID)
|
||||
} else if vendorID == model.VendorIDYB {
|
||||
@@ -1186,10 +1190,6 @@ 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