|
@@ -375,6 +375,29 @@ class WxOpenController extends PublicController
|
|
|
WxOpenService::updateOpen(['wxBaseId' => $wxBaseId]);
|
|
WxOpenService::updateOpen(['wxBaseId' => $wxBaseId]);
|
|
|
util::stop('开放平台成功绑定公众号');
|
|
util::stop('开放平台成功绑定公众号');
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ //查询是否零售或供货商使用的公众号
|
|
|
|
|
+ $hasChange = false;
|
|
|
|
|
+ $wxBase = WxBaseClass::getAllByCondition(['id>' => 0], null, '*');
|
|
|
|
|
+ if (!empty($wxBase)) {
|
|
|
|
|
+ foreach ($wxBase as $wx) {
|
|
|
|
|
+ if (isset($wx['wxAppId']) && $wx['wxAppId'] == $authorizeAppId) {
|
|
|
|
|
+ $id = $wx['id'];
|
|
|
|
|
+ WxBaseClass::updateById($id, [
|
|
|
|
|
+ 'wxAccessToken' => $authorize_access_token,
|
|
|
|
|
+ 'wxRefreshToken' => $authorize_refresh_token,
|
|
|
|
|
+ 'wxAccessTokenTime' => date("Y-m-d H:i:s", (time() + $expires_in - 100))
|
|
|
|
|
+ ]);
|
|
|
|
|
+ $hasChange = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if ($hasChange) {
|
|
|
|
|
+ echo 'ok';
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
$wxData['status'] = 1;//审核通过
|
|
$wxData['status'] = 1;//审核通过
|
|
|
xhMerchantService::updateById($id, $wxData);
|
|
xhMerchantService::updateById($id, $wxData);
|
|
|
MerchantExtendClass::updateByCondition(['merchantId' => $id], ['wxAppId' => $authorizeAppId, 'wxAuth' => 1]);
|
|
MerchantExtendClass::updateByCondition(['merchantId' => $id], ['wxAppId' => $authorizeAppId, 'wxAuth' => 1]);
|