Răsfoiți Sursa

限购数量

shish 1 zi în urmă
părinte
comite
4703c04a46

+ 1 - 1
app-mall/controllers/HdController.php

@@ -155,7 +155,7 @@ class HdController extends BaseController
             $respond = HdClass::getHdList($where);
         }
 
-        //请搜索关键词 on_warning
+        //请搜索关键词 on_warning;mallApp 个人首页 recent 展示公告红条
         $warning = '';
         $warningUrl = '';
         //$warning = '挂账和结账重大调整';

+ 2 - 1
biz-ghs/product/classes/ProductClass.php

@@ -3007,6 +3007,7 @@ class ProductClass extends BaseClass
         }
 
         $productId = $product['productId'];
+        $productName = $product['name']??'';
         $limitKey = self::LIMIT_BUY_KEY . $productId;
         $has = Yii::$app->redis->executeCommand('HEXISTS', [$limitKey, $customId]);
         if (!empty($has)) {
@@ -3020,7 +3021,7 @@ class ProductClass extends BaseClass
                     return;
                 }
 
-                util::error(-1, '累计已超出限购数', ['productId' => $productId, 'limitBuy' => $limitBuy, 'exceed' => $lastNum - $limitBuy]);
+                util::error(-1, $productName.' 已超出限购数', ['productId' => $productId, 'limitBuy' => $limitBuy, 'exceed' => $lastNum - $limitBuy]);
             }
             Yii::$app->redis->executeCommand('HSET', [$limitKey, $customId, $lastNum]);
         } else {