|
|
@@ -31,6 +31,7 @@ class HttpServerOnlySet
|
|
|
private $SettlementBaseObj;
|
|
|
private $TaskSqlQueue;
|
|
|
private $userMoneyTotal = [];
|
|
|
+ private $fanshui = 0.01; //默认反水比例
|
|
|
|
|
|
public function __construct($config)
|
|
|
{
|
|
|
@@ -67,7 +68,7 @@ class HttpServerOnlySet
|
|
|
$this->logRunStatus();
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
+ $this->getFanshui();
|
|
|
}
|
|
|
|
|
|
private function logRunStatus()
|
|
|
@@ -469,12 +470,11 @@ class HttpServerOnlySet
|
|
|
$chuanNum = intval(substr($simplexData->str_type, 0, 1));
|
|
|
$lasPeilv = $settlementBase->stringComputing([$in_array, $chuanNum]);
|
|
|
$money = floatPointDigit($simplexData->money * $lasPeilv);
|
|
|
-
|
|
|
} else {
|
|
|
$money = $simplexData->money;
|
|
|
}
|
|
|
-
|
|
|
- echo "debug -> ChuanMoney->" . $money . '-- order_id ' . $order_id . "\n";
|
|
|
+
|
|
|
+ $money = floatPointDigit($money - $simplexData->money * $this->fanshui);
|
|
|
|
|
|
$this->PushSqlToArray(" update money_buy_str set settle_status=2 , game_status=1 , settlement_time='$newTime' , gain_money=$money where order_id = '$order_id'");
|
|
|
$this->WriteOrAddSettlement($game_code, $match_id, $bet_type, $order_id, $account_identity, $money);
|
|
|
@@ -701,6 +701,17 @@ class HttpServerOnlySet
|
|
|
|
|
|
}
|
|
|
|
|
|
+ //得到返水的比例
|
|
|
+ public function getFanshui()
|
|
|
+ {
|
|
|
+ $ret = (new SetinfoModel())->getInfo(1001);
|
|
|
+ if (is_array($ret)) {
|
|
|
+ $val = floatval($ret->infocontent);
|
|
|
+ $this->fanshui = $val;
|
|
|
+ return $val;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
public function start()
|
|
|
{
|