瀏覽代碼

book price

onlinetest 4 年之前
父節點
當前提交
1527849ff4
共有 2 個文件被更改,包括 8 次插入2 次删除
  1. 3 1
      app/Modules/Book/Models/BookConfig.php
  2. 5 1
      app/Modules/Book/Services/BookService.php

+ 3 - 1
app/Modules/Book/Models/BookConfig.php

@@ -419,7 +419,9 @@ class BookConfig extends Model
                 'book_configs.promotion_domain',
                 'books.name as old_name',
                 'book_configs.recommend_cid',
-                'book_configs.is_high_quality'
+                'book_configs.is_high_quality',
+		'book_configs.unit_price',
+		'book_configs.calculate_price_type'
             )->where('book_configs.bid', $bid)->first();
     }
 

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

@@ -174,7 +174,11 @@ class BookService
         //固定价格
         if(strtolower($calculate_price_type) == 'const'){
             $price = (int)$book_info->unit_price;
-            return $price < 37 ? 37 : $price;
+	    if($distribution_channel_id_price){
+                $price = (int)$distribution_channel_id_price;
+            }
+
+            return $price < 30 ? 30 : $price;
         }
         //千字价格
         $channel_fee = self::getChapterPrice($distribution_channel_id);