|
|
@@ -285,13 +285,19 @@ class CustomController extends BaseController
|
|
|
if (empty($fromShop)) {
|
|
|
util::fail('门店不存在');
|
|
|
}
|
|
|
+ $fromShopName = $fromShop->shopName ?? '';
|
|
|
+ if ($fromShop->syncCustom == 0) {
|
|
|
+ util::fail('不允许从' . $fromShopName . '同步客户');
|
|
|
+ }
|
|
|
$toShopId = $this->shopId;
|
|
|
-
|
|
|
if ($fromShopId == $toShopId) {
|
|
|
util::fail('本店无需同步');
|
|
|
}
|
|
|
-
|
|
|
$toShop = $this->shop;
|
|
|
+ $toShopName = $toShop->shopName ?? '';
|
|
|
+ if ($toShop->syncCustom == 0) {
|
|
|
+ util::fail($toShopName . '已关闭同步功能');
|
|
|
+ }
|
|
|
$toSjId = $toShop->sjId ?? 0;
|
|
|
$fromSjId = $fromShop->sjId ?? 0;
|
|
|
if ($toSjId != $fromSjId) {
|