xieruidong 2 years ago
parent
commit
476846ba61

+ 1 - 1
application/common/model/GoodsSku.php

@@ -53,7 +53,7 @@ class GoodsSku Extends Model
     public function calcAmount($num,$col){
         $amount=0;
         foreach ($this[$col] as $ladder){
-            if($num>=$ladder['min'] && $num<$ladder['max']){
+            if($num>=$ladder['min'] && $num<=$ladder['max']){
                 $amount=$ladder['amount'];
                 break;
             }

+ 3 - 1
application/common/service/OrderService.php

@@ -278,7 +278,9 @@ class OrderService extends BaseService {
 
         return $info;
     }
-
+    /**
+     * @param $sku GoodsSku
+     */
     protected function getAmount($sku,$goods,$num){
         #价格,秒杀优惠金额
         $amount=$sku->calcAmount($num,'amount_ladder');