|
|
@@ -134,10 +134,13 @@ class Betorder extends BaseController{
|
|
|
|
|
|
}
|
|
|
//球类联赛分类并且插入数据库
|
|
|
+ $odds_ids = [];
|
|
|
foreach($res as $k => $v){
|
|
|
$gamedate = $this->Group_ball($res[$k]);
|
|
|
- $this->Simplex_bet_insert($gamedate,$userInfo,$k,$batch_id);
|
|
|
+ $odds_ids[] = $this->Simplex_bet_insert($gamedate,$userInfo,$k,$batch_id);
|
|
|
}
|
|
|
+
|
|
|
+ return $odds_ids;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -220,9 +223,12 @@ class Betorder extends BaseController{
|
|
|
}
|
|
|
}
|
|
|
public function Simplex_bet_insert($data,$userInfo,$game_code,$batch_id){
|
|
|
+
|
|
|
if(empty($data)||empty($userInfo)||empty($game_code)){
|
|
|
- Render('', '7003',lang('Errors','Api')->get('error-7003'));
|
|
|
+ Render('', '7003',lang('Errors','Api')->get('error-7003'));
|
|
|
}
|
|
|
+ //回调订单id
|
|
|
+ $odds_ids = [];
|
|
|
foreach($data as $k => $v){
|
|
|
$OrderID = OrderID('S');//生成订单ID
|
|
|
$UUID = UUID(); //生成信息ID
|
|
|
@@ -314,7 +320,11 @@ class Betorder extends BaseController{
|
|
|
Render('', $insertMoney,lang('Errors','Api')->get('error'.$insertMoney));
|
|
|
}
|
|
|
$this->M->fanshui($userInfo['account_identity'],$userInfo['account'],$bet_money,$OrderID);//反水
|
|
|
+ if($is_rolling == 1){
|
|
|
+ $odds_ids[] = $OrderID;
|
|
|
+ }
|
|
|
}
|
|
|
+ return $odds_ids;
|
|
|
}
|
|
|
|
|
|
public function Bet(){
|
|
|
@@ -325,12 +335,12 @@ class Betorder extends BaseController{
|
|
|
[
|
|
|
'type'=>1,
|
|
|
'index'=>0,
|
|
|
- 'bet_amount'=>1,
|
|
|
+ 'bet_amount'=>100,
|
|
|
],
|
|
|
[
|
|
|
'type'=>1,
|
|
|
'index'=>1,
|
|
|
- 'bet_amount'=>1,
|
|
|
+ 'bet_amount'=>200,
|
|
|
],
|
|
|
[
|
|
|
[
|
|
|
@@ -376,13 +386,12 @@ class Betorder extends BaseController{
|
|
|
]
|
|
|
],
|
|
|
|
|
|
- 'token'=>'ppWGRW15682541865d79a8eacb0b1',
|
|
|
+ 'token'=>'mKoaQr15712941335da80bb5beb4e',
|
|
|
'bet_money'=>900,
|
|
|
'bet_money_arr'=>[100,200,300],
|
|
|
|
|
|
];
|
|
|
|
|
|
- */
|
|
|
/*
|
|
|
// 模拟串式数据
|
|
|
$get_data = [
|
|
|
@@ -505,7 +514,7 @@ class Betorder extends BaseController{
|
|
|
_beginTransaction();//开启事务
|
|
|
$data = $this->Classify($data);
|
|
|
if(!empty($data['single'])){
|
|
|
- $this->Simplex_bet($data['single'],$userInfo,$batch_id);//单式数据处理
|
|
|
+ $odds_ids = $this->Simplex_bet($data['single'],$userInfo,$batch_id);//单式数据处理
|
|
|
}
|
|
|
if(!empty($data['bunch'])){
|
|
|
|
|
|
@@ -513,6 +522,7 @@ class Betorder extends BaseController{
|
|
|
unset($data['bunch'][count($data['bunch'])-1]);//删除最后一个元素
|
|
|
$this->stringBet($data['bunch'],$data_all,$userInfo,$batch_id);
|
|
|
}
|
|
|
+ print_r($odds_ids);exit;
|
|
|
_commit();//提交
|
|
|
Render('', '1',lang('Errors','Api')->get('error-1'));
|
|
|
} catch (Exception $e) {
|