|
|
@@ -48,7 +48,7 @@ class IntraCityController extends BaseController
|
|
|
util::checkRepeatCommit($adminId, 4);
|
|
|
|
|
|
$storeData = [
|
|
|
- 'out_store_id' => $this->mainId, //自定义门店编号 -- 从 shopId 改为 dmainId
|
|
|
+ 'out_store_id' => $this->mainId, //自定义门店编号 -- 从 shopId 改为 mainId
|
|
|
'store_name' => $name,
|
|
|
'address_info' => [
|
|
|
'province' => $shop->province,
|
|
|
@@ -69,21 +69,20 @@ class IntraCityController extends BaseController
|
|
|
util::fail("缺少必填参数:{$field}");
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
// 创建门店前,检查是否已经 开通门店权限 (有wxStoreId,即说明开通了)
|
|
|
//$shopExt = ShopExtClass::getByCondition(['shopId' => $shopId], true, false, 'id, wxStoreId');
|
|
|
$shopExt = MainClass::getById($this->mainId, true, 'id, wxStoreId');
|
|
|
|
|
|
// 查询是否存在 wx_store_id,不存在则执行apply
|
|
|
if ($shopExt->wxStoreId == '') {
|
|
|
- $re = IntraCityExpress::applyStore();
|
|
|
- if (!is_array($re)) {
|
|
|
- $re = Json::decode($re, true);
|
|
|
- }
|
|
|
- if ($re['errcode'] != 0) {
|
|
|
- Yii::error("开通门店权限失败:" . $re['errmsg']);
|
|
|
- util::fail('开通门店权限失败');
|
|
|
- }
|
|
|
+// $re = IntraCityExpress::applyStore();
|
|
|
+// if (!is_array($re)) {
|
|
|
+// $re = Json::decode($re, true);
|
|
|
+// }
|
|
|
+// if ($re['errcode'] != 0) {
|
|
|
+// Yii::error("开通门店权限失败:" . $re['errmsg']);
|
|
|
+// util::fail('开通门店权限失败');
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
$result = IntraCityExpress::createStore($storeData);
|
|
|
@@ -95,6 +94,8 @@ class IntraCityController extends BaseController
|
|
|
util::success($result, "门店创建成功");
|
|
|
} else {
|
|
|
Yii::error("门店创建失败:" . $result['errmsg']);
|
|
|
+ $errMsg = $result['errmsg'] ?? '';
|
|
|
+ noticeUtil::push("报错内容:" . $errMsg, '15280215347');
|
|
|
util::fail($result['errmsg']);
|
|
|
}
|
|
|
} catch (\Exception $e) {
|