|
|
@@ -177,11 +177,13 @@ class WxOpenController extends PublicController
|
|
|
|
|
|
$wxOpenId = configDict::getConfig('openId');
|
|
|
$open = xhWxOpenService::getById($wxOpenId);
|
|
|
- if (isset($open['merchantId']) && !empty($open['merchantId'])) {
|
|
|
+ $platform = 0;
|
|
|
+ if (isset($open['merchantId']) && empty($open['merchantId'])) {
|
|
|
xhWxOpenService::updateById($wxOpenId, ['merchantId' => $merchantId]);
|
|
|
+ $platform = 1;
|
|
|
}
|
|
|
|
|
|
- $data = ['merchantId' => $merchantId, 'platform' => 1];
|
|
|
+ $data = ['merchantId' => $merchantId, 'platform' => $platform];
|
|
|
$producer = Yii::$app->rabbitmq->getProducer('openShopInitProducer');
|
|
|
$msg = serialize($data);
|
|
|
$producer->publish($msg, 'openShopInitExchange', 'openShopInitRoute');
|