|
|
@@ -121,7 +121,7 @@ trait SettelementLogic
|
|
|
} catch (\Exception $e) {
|
|
|
$e = str_replace(";", ";", $e->getMessage());
|
|
|
$sql = "update $table set remark='$e' where order_id='$order_id' ";
|
|
|
- $this->sqltoRedisqueue($sql);
|
|
|
+ $this->PushSqlToArray($sql);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -170,7 +170,7 @@ trait SettelementLogic
|
|
|
// 判断盈亏 1 赢 2 输 3 平
|
|
|
$game_status = $returnMoney > $simplexData->money ? 1 : ($returnMoney == $simplexData->money ? 3 : 2);
|
|
|
// 修改投注表状态及盈亏
|
|
|
- $this->sqltoRedisqueue(["update money_buy_simplex set settle_status=2, game_status=$game_status,gain_money=$returnMoney where order_id='$order_id' "]);
|
|
|
+ $this->PushSqlToArray(["update money_buy_simplex set settle_status=2, game_status=$game_status,gain_money=$returnMoney where order_id='$order_id' "]);
|
|
|
|
|
|
$this->WriteOrAddSettlement($game_code, $match_id, $bet_type, $order_id, $account_identity, $returnMoney);
|
|
|
$this->insertData(
|
|
|
@@ -195,9 +195,9 @@ trait SettelementLogic
|
|
|
}
|
|
|
|
|
|
if ($this->set_type == 2 && isset($this->settlement_middle_detail_array[$bet_type][$order_id])) {
|
|
|
- $this->sqltoRedisqueue("update settlement_middle_detail set money=$money where game_code='$game_code' and bet_type=$bet_type and order_id='$order_id' ");
|
|
|
+ $this->PushSqlToArray("update settlement_middle_detail set money=$money where game_code='$game_code' and bet_type=$bet_type and order_id='$order_id' ");
|
|
|
} else {
|
|
|
- $this->sqltoRedisqueue("insert into settlement_middle_detail(game_code,match_id,account_identity,bet_type,order_id,money) values('$game_code','$match_id','$account_ident',$bet_type,'$order_id',$money)");
|
|
|
+ $this->PushSqlToArray("insert into settlement_middle_detail(game_code,match_id,account_identity,bet_type,order_id,money) values('$game_code','$match_id','$account_ident',$bet_type,'$order_id',$money)");
|
|
|
}
|
|
|
return true;
|
|
|
}
|
|
|
@@ -245,7 +245,7 @@ trait SettelementLogic
|
|
|
}
|
|
|
|
|
|
if ($val->result == -1) {
|
|
|
- $this->sqltoRedisqueue("update money_buy_str set wait_match_num=0, prize_note=0, game_status=3, settle_status=2, gain_money=0,settlementTime='" . date('Y-m-d H:i:s') . "' where batch_id='$batch_id' ");
|
|
|
+ $this->PushSqlToArray("update money_buy_str set wait_match_num=0, prize_note=0, game_status=3, settle_status=2, gain_money=0,settlementTime='" . date('Y-m-d H:i:s') . "' where batch_id='$batch_id' ");
|
|
|
return true;
|
|
|
}
|
|
|
$in_array[] = ['odds' => $val->odds, 'winOrLose' => $val->result];
|
|
|
@@ -259,7 +259,7 @@ trait SettelementLogic
|
|
|
$money = $simplexData->money;
|
|
|
}
|
|
|
|
|
|
- $this->sqltoRedisqueue(" update money_buy_str set settle_status=2 , game_status=1 , settlementTime='$newTime' , gain_money=$money where order_id = '$order_id'");
|
|
|
+ $this->PushSqlToArray(" update money_buy_str set settle_status=2 , game_status=1 , settlementTime='$newTime' , gain_money=$money where order_id = '$order_id'");
|
|
|
|
|
|
$this->WriteOrAddSettlement($this->game_code, $this->match_id, $this->orderType, $order_id, $this->BuyDatasMainModel->account_identity, $money);
|
|
|
$this->insertData($order_id, $money, $this->BuyDatasMainModel->account_identity, 2, $val->game_code, $this->BuyDatasMainModel->info_identity, $this->BuyDatasMainModel->money, $this->match_id, $account, $money_prize);
|
|
|
@@ -290,26 +290,26 @@ trait SettelementLogic
|
|
|
$sql = "insert into money_details(info_identity,trade_id,account_name,account_identity,money,money_time,money_type,money_cash,trade_type,trade_desc,reason,sysetem_user,status) values(";
|
|
|
$sql .= "'$info_identity','$order_id','$account','$account_identity',$returnMoney,'$money_time',1,0,4,'$trade_desc','$reason','系统',1)";
|
|
|
|
|
|
- $this->sqltoRedisqueue($sql);
|
|
|
+ $this->PushSqlToArray($sql);
|
|
|
|
|
|
// 修改用余额
|
|
|
- $this->sqltoRedisqueue("update account_detailed set available_cash=available_cash+$money,cash=cash+$money where account_identity='$account_identity' ");
|
|
|
+ $this->PushSqlToArray("update account_detailed set available_cash=available_cash+$money,cash=cash+$money where account_identity='$account_identity' ");
|
|
|
|
|
|
// 新增用户中奖信息
|
|
|
$content = $type == 1 ? '您的单式投注订单' . $order_id . '于' . $money_time . '成功回款' . $returnMoney . '该次投注流程结束,如有疑问请联系客服'
|
|
|
: '您的串式投注订单' . $order_id . '于' . $money_time . '成功回款' . $returnMoney . '该次投注流程结束,如有疑问请联系客服';
|
|
|
$sql = "insert into account_news(identity,account_identity,title,content,details,write_time,read_status,type) values ";
|
|
|
$sql .= "('$info_identity','$account_identity','投注订单回款通知','$content','$content','$money_time',-1,1)";
|
|
|
- $this->sqltoRedisqueue($sql);
|
|
|
+ $this->PushSqlToArray($sql);
|
|
|
|
|
|
// 新增中奖记录表
|
|
|
$table = 'money_prize';
|
|
|
if ($money_prizeID) {
|
|
|
- $this->sqltoRedisqueue("update $table set money=$money,prize_money=$returnMoney, get_money= $returnMoney - $money where id=$money_prizeID");
|
|
|
+ $this->PushSqlToArray("update $table set money=$money,prize_money=$returnMoney, get_money= $returnMoney - $money where id=$money_prizeID");
|
|
|
} else {
|
|
|
$sql = "insert into $table (info_identity,order_id,account_identity,account_name,game_name,buy_identity,money,money_time,status,prize_money,get_money) values ";
|
|
|
$sql .= "('$info_identity','$order_id','$account_identity','$account','$game_name','$buy_identity',$money,'$money_time',1,$returnMoney,$returnMoney - $money)";
|
|
|
- $this->sqltoRedisqueue($sql);
|
|
|
+ $this->PushSqlToArray($sql);
|
|
|
}
|
|
|
return true;
|
|
|
}
|
|
|
@@ -383,7 +383,7 @@ trait SettelementLogic
|
|
|
} else {
|
|
|
$sql_tmp = "update $moneytable set settle_status=1, gain_money=0 where order_id in ($order_str) ";
|
|
|
}
|
|
|
- $this->sqltoRedisqueue($sql_tmp);
|
|
|
+ $this->PushSqlToArray($sql_tmp);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -452,8 +452,8 @@ trait SettelementLogic
|
|
|
$table2 = "st_" . $game_code . "_competition";
|
|
|
|
|
|
if ($change_status) {
|
|
|
- $this->sqltoRedisqueue("update $table1 set status=3 where match_id=$match_id ");
|
|
|
- $this->sqltoRedisqueue("update $table2 set status=3 where match_id=$match_id ");
|
|
|
+ $this->PushSqlToArray("update $table1 set status=3 where match_id=$match_id ");
|
|
|
+ $this->PushSqlToArray("update $table2 set status=3 where match_id=$match_id ");
|
|
|
}
|
|
|
}
|
|
|
|