|
|
@@ -68,7 +68,6 @@ class Betorder extends BaseController{
|
|
|
unset($res[count($res)-1]);
|
|
|
foreach ($last as $k =>$v){
|
|
|
foreach ($v as $kk =>$vv){
|
|
|
- /*
|
|
|
$num = $kk+1;
|
|
|
//验证球类代码是否有效
|
|
|
$this->verify_gameType($vv['ballId'],$num);
|
|
|
@@ -80,7 +79,6 @@ class Betorder extends BaseController{
|
|
|
//验证赛事下赔率玩法是否有效
|
|
|
$this->verify_odds($vv['ballId'],$vv['odds_only'],$vv['odds'],$vv['condition'],$vv['odds_code'],$num);
|
|
|
}
|
|
|
- */
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -520,10 +518,43 @@ class Betorder extends BaseController{
|
|
|
Render('', $insertMoney,lang('Errors','Api')->get('error'.$insertMoney));
|
|
|
}
|
|
|
$this->M->fanshui($userInfo['account_identity'],$userInfo['account'],$bet_money,$OrderID);//反水
|
|
|
+
|
|
|
+ //===追加写处理队列===
|
|
|
+ //订单号 比赛id188 开赛日期时间 比赛状态(早盘,今日,串场,滚球), 父级玩法, 子级玩法,排序
|
|
|
+ //获取开赛时间
|
|
|
+ //根据球类代码 获取相关model
|
|
|
+ $models = $this->commonFunction->getModels($v['ballId']);
|
|
|
+ $model_match = $models['model_match'];
|
|
|
+ $info = lm($model_match,'Sports')
|
|
|
+ ->select('match_date','match_time')
|
|
|
+ ->where('id',$v['match_id'])
|
|
|
+ ->first();
|
|
|
+
|
|
|
+ $match_time = $info->match_date.''.$info->match_time;
|
|
|
+
|
|
|
+ $orderData = [
|
|
|
+ 'order_type'=>1,//订单类型 1单式 2串式
|
|
|
+ 'order_id'=>$OrderID,//订单ID
|
|
|
+ 'matchData'=>[
|
|
|
+ [
|
|
|
+ 'game_code'=>$v['ballId'],//球类代码
|
|
|
+ 'other_match_id'=>$v['others_match_id'],//第三方赛事id 188
|
|
|
+ 'match_id'=>$v['match_id'],//本地赛事id
|
|
|
+ 'match_uuid'=> $info->match_identity,//赛事uuid
|
|
|
+ 'odds_code'=>$v['odds_code'],//子玩法代码
|
|
|
+ 'p_code'=>$v['p_code'],//父玩法代码
|
|
|
+ 'match_time'=>$match_time,//开赛时间
|
|
|
+ 'match_type'=>$is_rolling,//比赛盘口
|
|
|
+ 'sort'=>$v['sort'],//排序
|
|
|
+ ]
|
|
|
+ ],
|
|
|
+ ];
|
|
|
+ $this->commonFunction->setOrderQueue($orderData);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public function Bet(){
|
|
|
+
|
|
|
/*
|
|
|
// 模拟单式数据
|
|
|
$get_data = [
|
|
|
@@ -1054,7 +1085,39 @@ class Betorder extends BaseController{
|
|
|
'is_rolling'=>$is_rolling,
|
|
|
'order_id'=> $orderID,
|
|
|
];
|
|
|
+
|
|
|
+ //=====拼接赛事数据===
|
|
|
+ //获取开赛时间
|
|
|
+ //根据球类代码 获取相关model
|
|
|
+ $models = $this->commonFunction->getModels($v['ballId']);
|
|
|
+ $model_match = $models['model_match'];
|
|
|
+ $info = lm($model_match,'Sports')
|
|
|
+ ->select('match_date','match_time')
|
|
|
+ ->where('id',$vv['match_id'])
|
|
|
+ ->first();
|
|
|
+
|
|
|
+ $match_time = $info->match_date.''.$info->match_time;
|
|
|
+ $match_data_order[] = [
|
|
|
+ 'game_code'=>$vv['ballId'],//球类代码
|
|
|
+ 'other_match_id'=>$vv['others_match_id'],//第三方赛事id 188
|
|
|
+ 'match_id'=>$vv['match_id'],//本地赛事id
|
|
|
+ 'match_uuid'=> $info->match_identity,//赛事uuid
|
|
|
+ 'odds_code'=>$vv['odds_code'],//子玩法代码
|
|
|
+ 'p_code'=>$vv['p_code'],//父玩法代码
|
|
|
+ 'match_time'=>$match_time,//开赛时间
|
|
|
+ 'match_type'=>$is_rolling,//比赛盘口
|
|
|
+ 'sort'=>$vv['sort'],//排序
|
|
|
+ ];
|
|
|
+ //===end===
|
|
|
}
|
|
|
+
|
|
|
+ //===追加写处理队列===
|
|
|
+ //订单号 比赛id188 开赛日期时间 比赛状态(早盘,今日,串场,滚球), 父级玩法, 子级玩法,排序
|
|
|
+ $orderData_queue[] = [
|
|
|
+ 'order_type'=>2,//订单类型 1单式 2串式
|
|
|
+ 'order_id'=>$orderID,//订单ID
|
|
|
+ 'matchData'=>$match_data_order
|
|
|
+ ];
|
|
|
}
|
|
|
|
|
|
//写赔率数据表
|
|
|
@@ -1071,6 +1134,12 @@ class Betorder extends BaseController{
|
|
|
if(!$moneyBuy){
|
|
|
Render('','3205',lang('errors','Api')->get('error-3205'));
|
|
|
}
|
|
|
+
|
|
|
+ //写队列
|
|
|
+ foreach($orderData_queue as $k=>$v){
|
|
|
+ $this->commonFunction->setOrderQueue($v);
|
|
|
+ }
|
|
|
+
|
|
|
return true;
|
|
|
}
|
|
|
|