Ken пре 5 дана
родитељ
комит
7029919efc
2 измењених фајлова са 14 додато и 9 уклоњено
  1. 7 8
      app/Services/BetService.php
  2. 7 1
      app/Services/RebateService.php

+ 7 - 8
app/Services/BetService.php

@@ -842,10 +842,9 @@ class BetService extends BaseService
                     'profit' => $yl,
                 ]);
 
-                //笔笔返改为隔天统一返,不在每次结算的时候返了
-//                if (!in_array('13操', $awards) && !in_array('14操', $awards)) {
-//                    RebateService::BibiReturn($rebate, $v['amount']);
-//                }
+                if (!in_array('13操', $awards) && !in_array('14操', $awards)) {
+                    RebateService::updateEffectiveBettingAmount($rebate, $v['amount']);
+                }
 
 
                 $memberList[$v['member_id']][] = [
@@ -890,10 +889,10 @@ class BetService extends BaseService
                     'profit' => ($v['amount'] * -1),
                 ]);
 
-                //笔笔返改为隔天统一返,不在每次结算的时候返了
-//                if (!in_array('13操', $awards) && !in_array('14操', $awards)) {
-//                    RebateService::BibiReturn($rebate, $v['amount']);
-//                }
+
+                if (!in_array('13操', $awards) && !in_array('14操', $awards)) {
+                    RebateService::updateEffectiveBettingAmount($rebate, $v['amount']);
+                }
 
                 $profit = 0;
 //                玩 大单 小单 大双 小双 :如果开出13和14 总注小于10000 1.5赔率含本,大于等于10000退本金。

+ 7 - 1
app/Services/RebateService.php

@@ -35,7 +35,7 @@ class RebateService extends BaseService
             $where[] = ['username', '=', $search['username']];
         }
 
-        if (isset($search['status']) && $search['status'] !='') {
+        if (isset($search['status']) && $search['status'] != '') {
             $where[] = ['status', '=', $search['status']];
         }
 
@@ -87,6 +87,12 @@ class RebateService extends BaseService
     }
 
 
+    //更新有效投注额
+    public static function updateEffectiveBettingAmount($rebate, $amount): void
+    {
+        $rebate->increment('effective_betting_amount', $amount);
+    }
+
     //比比返水
     public static function BibiReturn($rebate, $amount)
     {