فهرست منبع

彩票投注订单合并

lip 1 هفته پیش
والد
کامیت
98e428c8c6
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      app/Services/BetService.php

+ 3 - 0
app/Services/BetService.php

@@ -822,6 +822,7 @@ class BetService extends BaseService
             $item = [];
             $item['id'] = $v['id'];
             $item['lottery_status'] = self::model()::STATUS_LOSS;//未中奖
+            $item['profit_and_loss'] = -$v['amount'];
 
             if (in_array($v['number'], $awards)) {
                 $amount = $v['amount'];
@@ -845,6 +846,7 @@ class BetService extends BaseService
                     $profit = 1000000; // 单注最高奖金1000000
                 }
 
+                $item['lottery_status'] = self::model()::STATUS_WIN;//中奖
                 $item['win_amount'] = $profit;
                 $yl = bcsub($profit, $amount, 2); // 盈利
                 $item['profit_and_loss'] = $yl;
@@ -924,6 +926,7 @@ class BetService extends BaseService
                         $profit = 1000000; // 单注最高奖金1000000
                     }
 
+                    $item['lottery_status'] = self::model()::STATUS_WIN;//中奖
                     $item['win_amount'] = $profit;
 
                     $yl = bcsub($profit, $amount, 2); // 盈利