shish 11 tháng trước cách đây
mục cha
commit
9d5af88c91

+ 2 - 2
app-mall/controllers/ChatController.php

@@ -178,13 +178,13 @@ class ChatController extends BaseController
         $userId = $callbackData['userId'] ?? '';
         $userId = $callbackData['userId'] ?? '';
         $key = 'has_remind_' . $shopId . '_' . $userId;
         $key = 'has_remind_' . $shopId . '_' . $userId;
         if (!empty($shopId) && !empty($userId)) {
         if (!empty($shopId) && !empty($userId)) {
-            //5秒不重复通知
+            //10秒不重复通知
             $hasRemind = Yii::$app->redis->executeCommand('GET', [$key]);
             $hasRemind = Yii::$app->redis->executeCommand('GET', [$key]);
             if (empty($hasRemind)) {
             if (empty($hasRemind)) {
                 $shop = ShopClass::getById($shopId, true);
                 $shop = ShopClass::getById($shopId, true);
                 if (!empty($shop)) {
                 if (!empty($shop)) {
                     WxMessageClass::newMessageInform($shop, "商城上客户有留言");
                     WxMessageClass::newMessageInform($shop, "商城上客户有留言");
-                    Yii::$app->redis->executeCommand('SETEX', [$key, 5, 'has']);
+                    Yii::$app->redis->executeCommand('SETEX', [$key, 10, 'has']);
                     $time = time();
                     $time = time();
                     noticeUtil::push("客户留言已通知花店,shopId:" . $shopId . ' userId:' . $userId . ' time:' . $time, '15280215347');
                     noticeUtil::push("客户留言已通知花店,shopId:" . $shopId . ' userId:' . $userId . ' time:' . $time, '15280215347');
                 }
                 }