BF-202205051124\Administrator 3 سال پیش
والد
کامیت
4d82024091
1فایلهای تغییر یافته به همراه58 افزوده شده و 2 حذف شده
  1. 58 2
      app/Servers/ContractServer.php

+ 58 - 2
app/Servers/ContractServer.php

@@ -15,6 +15,7 @@ use App\Models\ContractLog;
 use App\Models\ErrorRecord;
 use App\Models\Invest;
 use App\Models\Member;
+use App\Models\MemberBoth;
 use App\Servers\Icon\TronRPC;
 
 /**
@@ -26,8 +27,13 @@ class ContractServer
 
     static private $server = '';
     private $distributionArr=[
-      1=>'直推奖金',
-      2=>'累计均富池',
+      1=>'直推奖',
+      2=>'均富池',
+      3=>'见点奖',
+      4=>'dao池',
+      5=>'技术奖',
+      6=>'托底池',
+      7=>'推荐奖',
     ];
 
 
@@ -116,6 +122,34 @@ class ContractServer
                 GrantPondServer::creatServer()->grandPond($distribution);
             }
         }
+        if($contract->{'point_proportion'}>0){
+            //见点清分
+            $distribution= $this->addDistribution($contract,0,3,$contract->{'point_proportion'},1);
+            if($distribution){
+
+            }
+        }
+        if($contract->{'dao_proportion'}>0){
+            //dao池
+            $distribution= $this->addDistribution($contract,0,4,$contract->{'dao_proportion'},1);
+            if($distribution){
+
+            }
+        }
+        if($contract->{'technology_proportion'}>0){
+            //技术奖
+            $distribution= $this->addDistribution($contract,0,5,$contract->{'technology_proportion'},0);
+            if($distribution){
+
+            }
+        }
+        if($contract->{'reveal_proportion'}>0){
+            //托底池
+            $distribution= $this->addDistribution($contract,0,6,$contract->{'reveal_proportion'},1);
+            if($distribution){
+
+            }
+        }
 
 
     }
@@ -126,7 +160,29 @@ class ContractServer
      * @param Contract $contract
      */
     function twoSettle(Contract $contract){
+        if($contract->{'dao_proportion'}>0){
+            //dao池
+            $distribution= $this->addDistribution($contract,0,4,$contract->{'dao_proportion'},1);
+            if($distribution){
+
+            }
+        }
+        if($contract->{'reveal_proportion'}>0){
+            //托底池
+            $distribution= $this->addDistribution($contract,0,6,$contract->{'reveal_proportion'},1);
+            if($distribution){
 
+            }
+        }
+        if($contract->{'parent_proportion'}>0){
+            //dao池
+            $parentProportion=$contract->{'parent_proportion'};
+            $myBothData=MemberBoth::where('m_id',$contract->{'m_id'})->first();
+            $distribution= $this->addDistribution($contract,0,7,$contract->{'parent_proportion'},1);
+            if($distribution){
+
+            }
+        }
     }
 
     /**