onlinetest 4 سال پیش
والد
کامیت
7f1221863f
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 1
      app/Modules/Book/Services/BookService.php

+ 4 - 1
app/Modules/Book/Services/BookService.php

@@ -170,7 +170,7 @@ class BookService
         if($channel_calculate_price_type){
             $calculate_price_type = $channel_calculate_price_type;
         }
-
+	 $distribution_channel_id_price = Redis::hget('channel:price:setting:'.$distribution_channel_id,$book_info->bid);
         //固定价格
         if(strtolower($calculate_price_type) == 'const'){
             $price = (int)$book_info->unit_price;
@@ -191,6 +191,9 @@ class BookService
         if($book_info->unit_price){
             $price_rate = $book_info->unit_price;
         }
+	if($distribution_channel_id_price){
+            $price_rate = $distribution_channel_id_price;
+        }
 
         $fee = ceil($size * $price_rate);
         if($fee >189) $fee = 189;