|
|
@@ -10,6 +10,7 @@ namespace common\components\rabbitmq\consumer;
|
|
|
|
|
|
|
|
|
use biz\merchant\services\MerchantService;
|
|
|
+use biz\weixin\services\WxOpenService;
|
|
|
use common\components\sms;
|
|
|
use mikemadisonweb\rabbitmq\components\ConsumerInterface;
|
|
|
use PhpAmqpLib\Message\AMQPMessage;
|
|
|
@@ -20,7 +21,6 @@ class openShopInitConsumer implements ConsumerInterface
|
|
|
//开店初始化
|
|
|
public function execute(AMQPMessage $msg)
|
|
|
{
|
|
|
- echo 'aaa';
|
|
|
$data = unserialize($msg->body);
|
|
|
$merchantId = isset($data['merchantId']) ? $data['merchantId'] : 0;
|
|
|
$return = MerchantService::openShopInit(['merchantId' => $merchantId]);
|
|
|
@@ -28,11 +28,10 @@ class openShopInitConsumer implements ConsumerInterface
|
|
|
//没有初始化成功短信通知管理员
|
|
|
$merchant = MerchantService::getMerchantById($merchantId);
|
|
|
$merchantName = $merchant['merchantName'];
|
|
|
- sms::freeSend(15280215347, "花店:{$merchantName}({$merchantId})初始化没有成功。", $merchant);
|
|
|
+ $adminMobile = WxOpenService::getAdminMobile();
|
|
|
+ sms::freeSend($adminMobile, "花店:{$merchantName}({$merchantId})初始化没有成功。", $merchant);
|
|
|
}
|
|
|
- print_r($data);
|
|
|
- //return ConsumerInterface::MSG_REQUEUE;
|
|
|
return ConsumerInterface::MSG_ACK;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|