WIN-2308041133\Administrator před 3 měsíci
rodič
revize
6678aa502f

+ 9 - 6
app/common/repositories/user/AwardIntegralPriceRepository.php

@@ -44,6 +44,7 @@ class AwardIntegralPriceRepository extends BaseRepository
 
     public function awardIntegralPrice($day = '')
     {
+        try {
         if (!$day) {
             $day = date('Y-m-d', strtotime('-1 day'));
         }
@@ -77,7 +78,7 @@ class AwardIntegralPriceRepository extends BaseRepository
         $rise = $num > 0 ? bcdiv($sum_achievement, $num, 6) : 0;
         $add_price = 0;
         if ($rise > 0) {
-            try {
+
                 //       增长值分成25份
                 $day_25_rise = bcdiv($rise, 25, 6);
                 /** @var AwardIntegralPriceDayDao $AwardIntegralPriceDayDao */
@@ -85,16 +86,18 @@ class AwardIntegralPriceRepository extends BaseRepository
                 $AwardIntegralPriceDayDao->create(['day' => strtotime('-25 day'), 'price' => $rise, 'add_price' => $day_25_rise]);  //保存今天增长的总价格和每日增长价格
                 $day_25 = strtotime('-25 day');
                 $add_price = $AwardIntegralPriceDayDao->search(['day' => $day_25])->sum('price');
-            } catch (\Exception $e) {
-                @file_put_contents('quanju4.txt', $e->getMessage() . "-积分价格报错内容\r\n", 8);
-                @file_put_contents('quanju4.txt', $e->getFile() . "-文件\r\n", 8);
-                @file_put_contents('quanju4.txt', $e->getLine() . "-位置\r\n", 8);
-            }
+
 
         }
         $price = bcadd($add_price, $basePrice, 6);
 
         @file_put_contents('quanju4.txt', time() . "-正常获取走的到这里吗\r\n", 8);
+
+                    } catch (\Exception $e) {
+        @file_put_contents('quanju4.txt', $e->getMessage() . "-积分价格报错内容\r\n", 8);
+        @file_put_contents('quanju4.txt', $e->getFile() . "-文件\r\n", 8);
+        @file_put_contents('quanju4.txt', $e->getLine() . "-位置\r\n", 8);
+    }
         return compact('basePrice', 'price', 'rise', 'achievement', 'commission', 'num', 'add_price');
     }