|
|
@@ -147,7 +147,7 @@ class CustomController extends BaseController
|
|
|
if (getenv('YII_ENV') == 'production') {
|
|
|
//小向花卉
|
|
|
if (in_array($this->shopId, [23580, 24713])) {
|
|
|
- if (!in_array($this->adminId, [24043, 23960, 4,77951])) {
|
|
|
+ if (!in_array($this->adminId, [24043, 23960, 4, 77951])) {
|
|
|
util::fail('不能销单哦!!');
|
|
|
}
|
|
|
}
|
|
|
@@ -681,7 +681,7 @@ class CustomController extends BaseController
|
|
|
$producer = Yii::$app->rabbitmq->getProducer('customProducer');
|
|
|
$msg = serialize(['type' => 'add_custom', 'name' => $name, 'mobile' => $mobile, 'sjId' => $this->sjId,
|
|
|
'shopId' => $this->shop->id, 'sjName' => $this->sj->name, 'staffId' => $this->shopAdminId]);
|
|
|
- $producer->publish($msg, 'customExchange', 'customRoute',['delivery_mode' => 2, 'content_type' => 'application/octet-stream']);
|
|
|
+ $producer->publish($msg, 'customExchange', 'customRoute', ['delivery_mode' => 2, 'content_type' => 'application/octet-stream']);
|
|
|
} catch (\Exception $e) {
|
|
|
$msg = $e->getMessage();
|
|
|
$remind = "供货商创建新客户,生产消息报错 {$name} {$mobile} {$this->sj->name} {$msg}";
|
|
|
@@ -730,7 +730,7 @@ class CustomController extends BaseController
|
|
|
try {
|
|
|
$producer = Yii::$app->rabbitmq->getProducer('customProducer');
|
|
|
$msg = serialize(['type' => 'pull_custom_from_other_shop', 'toShopId' => $toShopId, 'fromShopId' => $fromShopId]);
|
|
|
- $producer->publish($msg, 'customExchange', 'customRoute',['delivery_mode' => 2, 'content_type' => 'application/octet-stream']);
|
|
|
+ $producer->publish($msg, 'customExchange', 'customRoute', ['delivery_mode' => 2, 'content_type' => 'application/octet-stream']);
|
|
|
} catch (\Exception $e) {
|
|
|
$msg = $e->getMessage();
|
|
|
$remind = "供货商拉取其他门店客户,生产消息报错 {$toShopId} {$fromShopId} {$msg}";
|
|
|
@@ -1195,4 +1195,23 @@ class CustomController extends BaseController
|
|
|
util::complete('删除成功');
|
|
|
}
|
|
|
|
|
|
+ public function actionChangeDebtLimitPay()
|
|
|
+ {
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $customId = $get['customId'] ?? 0;
|
|
|
+ $debtLimitPay = $get['pay'] ?? 0;
|
|
|
+ $custom = CustomClass::getById($customId, true);
|
|
|
+ CustomClass::valid($custom, $this->shopId);
|
|
|
+ $ghsId = $custom->ghsId ?? 0;
|
|
|
+ $ghs = GhsClass::getById($ghsId, true);
|
|
|
+ if (empty($ghs)) {
|
|
|
+ util::fail('客户信息有问题');
|
|
|
+ }
|
|
|
+ $custom->debtLimitPay = $debtLimitPay;
|
|
|
+ $custom->save();
|
|
|
+ $ghs->debtLimitPay = $debtLimitPay;
|
|
|
+ $ghs->save();
|
|
|
+ util::complete('修改成功');
|
|
|
+ }
|
|
|
+
|
|
|
}
|