Browse Source

销量不能是false

lizhen_gitee 5 months ago
parent
commit
0a2f0f92d5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      addons/shopro/library/activity/traits/ActivityRedis.php

+ 1 - 1
addons/shopro/library/activity/traits/ActivityRedis.php

@@ -124,7 +124,7 @@ trait ActivityRedis
 
         $stock = $goods['stock'] - $cacheSale;
         $goods['stock'] = $stock > 0 ? $stock : 0;
-        $goods['sales'] = $cacheSale;
+        $goods['sales'] = $cacheSale ? : 0; //销量不能是false
 
         return $goods;
     }