|
|
@@ -40,7 +40,8 @@ class MtController extends PublicController
|
|
|
try {
|
|
|
if (isset($post['retail_data']) == false) {
|
|
|
noticeUtil::push("美团添加商品,通知我们时出错了,没有获取到请求的具体信息", '15280215347');
|
|
|
- return Json::encode(['data' => 'ok']);
|
|
|
+ //return Json::encode(['data' => 'ok']);
|
|
|
+ return '';
|
|
|
}
|
|
|
$retailData = $post['retail_data'];
|
|
|
$retail = urldecode(urldecode($retailData));
|
|
|
@@ -50,18 +51,21 @@ class MtController extends PublicController
|
|
|
$shop = ShopClass::getById($shopId, true);
|
|
|
if (empty($shop)) {
|
|
|
noticeUtil::push("美团添加商品,通知我们时出错了,没有找到门店", '15280215347');
|
|
|
- return Json::encode(['data' => 'ok']);
|
|
|
+ //return Json::encode(['data' => 'ok']);
|
|
|
+ return '';
|
|
|
}
|
|
|
$sjId = $shop->sjId ?? 0;
|
|
|
$ext = ShopExtClass::getByCondition(['shopId' => $shopId], true);
|
|
|
if (empty($ext)) {
|
|
|
noticeUtil::push("美团添加商品,通知我们时出错了,没有找到门店拓展信息", '15280215347');
|
|
|
- return Json::encode(['data' => 'ok']);
|
|
|
+ //return Json::encode(['data' => 'ok']);
|
|
|
+ return '';
|
|
|
}
|
|
|
$mainId = $shop->mainId ?? 0;
|
|
|
if (empty($mainId)) {
|
|
|
noticeUtil::push("美团添加商品,通知我们时出错了,没有main信息", '15280215347');
|
|
|
- return Json::encode(['data' => 'ok']);
|
|
|
+ //return Json::encode(['data' => 'ok']);
|
|
|
+ return '';
|
|
|
}
|
|
|
$mtCategory = CategoryClass::getByCondition(['mainId' => $mainId, 'style' => 1], true);
|
|
|
if (empty($mtCategory)) {
|
|
|
@@ -70,7 +74,8 @@ class MtController extends PublicController
|
|
|
$catId = $mtCategory->id ?? 0;
|
|
|
if (empty($catId)) {
|
|
|
noticeUtil::push("美团添加商品,通知我们时出错了,没有美团的分类id", '15280215347');
|
|
|
- return Json::encode(['data' => 'ok']);
|
|
|
+ //return Json::encode(['data' => 'ok']);
|
|
|
+ return '';
|
|
|
}
|
|
|
|
|
|
$config = dict::getDict('mtConfig');
|
|
|
@@ -81,7 +86,8 @@ class MtController extends PublicController
|
|
|
$hasGoods = GoodsClass::getByCondition(['mainId' => $mainId, 'spu' => $appSpuCode], true);
|
|
|
if (!empty($hasGoods)) {
|
|
|
noticeUtil::push("美团添加商品,通知我们时,发现已经有这个商品了,mainId:{$mainId} spu:{$appSpuCode}", '15280215347');
|
|
|
- return Json::encode(['data' => 'ok']);
|
|
|
+ //return Json::encode(['data' => 'ok']);
|
|
|
+ return '';
|
|
|
}
|
|
|
|
|
|
$params = ['app_poi_code' => $shopId, 'app_spu_code' => $appSpuCode, 'access_token' => $accessToken];
|
|
|
@@ -146,7 +152,8 @@ class MtController extends PublicController
|
|
|
$transaction->rollBack();
|
|
|
$msg = $e->getMessage();
|
|
|
noticeUtil::push("美团添加商品,通知我们时出错了,错误信息:{$msg}", '15280215347');
|
|
|
- return Json::encode(['data' => 'ok']);
|
|
|
+ //return Json::encode(['data' => 'ok']);
|
|
|
+ return '';
|
|
|
}
|
|
|
|
|
|
}
|