shish пре 2 година
родитељ
комит
b217fa3eae
2 измењених фајлова са 8 додато и 8 уклоњено
  1. 3 3
      biz/wx/classes/WxMessageClass.php
  2. 5 5
      console/controllers/MqController.php

+ 3 - 3
biz/wx/classes/WxMessageClass.php

@@ -1367,7 +1367,7 @@ class WxMessageClass extends BaseClass
         $itemName = $bookItemCustomRes->name ?? '';
         $customName = $bookItemCustomRes->customName ?? '';
         $seatSn = $bookItemCustomRes->seatSn ?? 0;
-        $seatName = empty($seatSn) ? '无' : '货位' . $seatSn;
+        $seatName = empty($seatSn) ? '无货位' : '货位' . $seatSn;
         foreach ($adminList as $admin) {
             $openId = isset($admin['openId']) ? $admin['openId'] : '';
             if ($ptStyle == dict::getDict('ptStyle', 'ghs')) {
@@ -1379,8 +1379,8 @@ class WxMessageClass extends BaseClass
                 "url" => Yii::$app->params['ghsDomain'],
                 "data" => [
                     "thing8" => ["value" => $customName],
-                    "thing10" => ["value" => $seatName],
-                    "thing7" => ["value" => $itemName . ' ' . $num . '份'],
+                    "thing10" => ["value" => $seatName . ' 下架' . $num . '份'],
+                    "thing7" => ["value" => $itemName],
                 ]
             ];
             $data['miniprogram']['appid'] = $wx['miniAppId'];

+ 5 - 5
console/controllers/MqController.php

@@ -16,10 +16,10 @@ class MqController extends Controller
     //预订变化下架花材 ssh 20240729
     public function actionBookChangeOutStock()
     {
-//        $noticeKey = "bookChangeOffItem";
-//        while ($count = Yii::$app->redis->executeCommand('LLEN', [$noticeKey])) {
-//            $json = Yii::$app->redis->executeCommand('RPOP', [$noticeKey]);
-            $json = '{"id":163,"num":"1","shopId":36523}';
+        $noticeKey = "bookChangeOffItem";
+        while ($count = Yii::$app->redis->executeCommand('LLEN', [$noticeKey])) {
+            $json = Yii::$app->redis->executeCommand('RPOP', [$noticeKey]);
+            //$json = '{"id":163,"num":"1","shopId":36523}';
             if (!empty($json)) {
                 $arr = json_decode($json, true);
                 $id = $arr['id'] ?? 0;
@@ -31,7 +31,7 @@ class MqController extends Controller
                     WxMessageClass::bookChangeOutStockInform($shop, $res, $num);
                 }
             }
-//        }
+        }
     }
 
     //花店采购通知供货商 ssh 20230805