shish il y a 3 ans
Parent
commit
b7570e6261
2 fichiers modifiés avec 1 ajouts et 39 suppressions
  1. 0 39
      app-hd/controllers/GoodsController.php
  2. 1 0
      console/controllers/MtController.php

+ 0 - 39
app-hd/controllers/GoodsController.php

@@ -9,56 +9,17 @@ use bizHd\goods\services\CategoryService;
 use bizHd\goods\services\GoodsCategoryService;
 use bizHd\goods\services\GoodsSettingService;
 use bizHd\saas\services\FestRiseService;
-use common\components\dict;
-use common\components\mtUtil;
 use common\components\printUtil;
 use Yii;
 use common\components\util;
 use bizHd\goods\services\GoodsService;
 use bizHd\order\services\OrderService;
-use Shishaoqi\MeituanFlashPurchase\Application;
 
 class GoodsController extends BaseController
 {
 
     public $guestAccess = ['detail'];
 
-    public function actionSetSh()
-    {
-        $get = Yii::$app->request->get();
-        $id = $get['id'] ?? 0;
-        $goods = GoodsClass::getById($id, true);
-        if (empty($goods)) {
-            util::fail('没有找到商品');
-        }
-        GoodsClass::valid($goods, $this->mainId);
-        $goods->sh = 1;
-        $goods->save();
-        $spu = $goods->spu ?? '';
-        if (empty($spu)) {
-            util::fail('非美团商品');
-        }
-        $shopId = $this->shopId ?? 0;
-        $ext = ShopExtClass::getByCondition(['shopId' => $shopId], true);
-        if (empty($ext)) {
-            util::fail('没有找到门店拓展信息');
-        }
-        $appSpuCode = $goods->spu ?? '';
-        if (empty($appSpuCode)) {
-            util::fail('商品有问题');
-        }
-
-        $config = dict::getDict('mtConfig');
-        $app = new Application($config);
-        $accessToken = mtUtil::getAccessToken($ext);
-
-        $params = ['app_poi_code' => $shopId, 'app_spu_code' => $appSpuCode, 'access_token' => $accessToken, 'skus' => '[{isSh:1}]'];
-        $r = $app->retail->initData($params);
-        print_r($r);
-
-        util::complete();
-    }
-
     //商品打印 ssh 20220602
     public function actionPrint()
     {

+ 1 - 0
console/controllers/MtController.php

@@ -17,6 +17,7 @@ class MtController extends Controller
 {
 
     //美团里有的商品,但没同步到系统的进行同步;同时美团没有app_spu_code的,补充app_spu_code ssh 20220914
+    // ./yii mt/sync-goods
     public function actionSyncGoods()
     {
         global $argv;