瀏覽代碼

book price

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;