|
|
@@ -488,28 +488,12 @@ class ZqRule
|
|
|
*/
|
|
|
public function B($bet_match, $result_match, $result_match_r)
|
|
|
{
|
|
|
-// $bet_match = DB::table('money_buy_match')->where(['match_id'=> 3219925,'p_code'=>'bodan'])->first();
|
|
|
-// $result_match = DB::table('st_zq_result')->where('match_id', 3224833)->limit(10)->get();
|
|
|
-// select * from st_zq_result where id=1317823 order by id desc limit 10 ;
|
|
|
-// $result_match_r = DB::table('st_zq_result_record')->where('match_id', 3150765)->get()->toArray();
|
|
|
- //获取父/子级赔率代码
|
|
|
-
|
|
|
$p_code = $bet_match->p_code;
|
|
|
$odds_code = $bet_match->odds_code;
|
|
|
//==获取是否是滚球投注==
|
|
|
- $is_rolling = $bet_match->is_rolling;
|
|
|
- //如果是滚球投注,则进行危险球审核
|
|
|
- if ($is_rolling == 1) {
|
|
|
- $ret = commonFunction::WARN_CHECK($bet_match, $result_match);
|
|
|
- //如果审核不通过,则返回2 1赢 2平 -1输
|
|
|
- if ($ret['code'] == -1) {
|
|
|
- $data = [
|
|
|
- 'result' => 2,
|
|
|
- 'msg' => "滚球投注,危险球审核不通过",
|
|
|
- 'warn_more' => $ret['warn_more']
|
|
|
- ];
|
|
|
- return $data;
|
|
|
- }
|
|
|
+ $isgqwx = $this->GunqiuWeixian($bet_match, $result_match, $result_match_r);
|
|
|
+ if ($isgqwx) {
|
|
|
+ return $isgqwx;
|
|
|
}
|
|
|
//==end==
|
|
|
|
|
|
@@ -517,11 +501,11 @@ class ZqRule
|
|
|
$bet_score = explode('-', $bet_match->condition);
|
|
|
$bet_home_score = (int)$bet_score[0];
|
|
|
$bet_guest_score = isset($bet_score[1]) ? intval($bet_score[1]) : 0;
|
|
|
- if ($p_code != 'bodan') return false;
|
|
|
+
|
|
|
|
|
|
//获取赛事最终结果数据
|
|
|
$result_match = $this->getHalfData($result_match);
|
|
|
- if (strstr($odds_code, "half")) {//上半场
|
|
|
+ if (strstr($odds_code, "_h")) {//上半场
|
|
|
|
|
|
//获取主客队上半场得分
|
|
|
$home_score = $result_match->u_home_score;
|
|
|
@@ -806,7 +790,7 @@ class ZqRule
|
|
|
$full_home_score = $result_match->home_score;
|
|
|
$full_guest_score = $result_match->guest_score;
|
|
|
//半场/全场盘口
|
|
|
- if ($p_code != 'half_full') return false;
|
|
|
+
|
|
|
|
|
|
//返回结果
|
|
|
$data = [
|
|
|
@@ -1362,7 +1346,7 @@ class ZqRule
|
|
|
$full_home_score = $result_match->home_score;
|
|
|
$full_guest_score = $result_match->guest_score;
|
|
|
//双重机会
|
|
|
- if ($p_code != 'sw_DC') return false;
|
|
|
+ //if ($p_code != 'sw_DC') return false;
|
|
|
|
|
|
//返回结果
|
|
|
$data = [
|
|
|
@@ -1411,7 +1395,7 @@ class ZqRule
|
|
|
$full_home_score = $result_match->home_score;
|
|
|
$full_guest_score = $result_match->guest_score;
|
|
|
//三项让球投注
|
|
|
- if ($p_code != 'sw_W3') return false;
|
|
|
+ //if ($p_code != 'sw_W3') return false;
|
|
|
|
|
|
//返回结果
|
|
|
$data = [
|
|
|
@@ -1469,7 +1453,7 @@ class ZqRule
|
|
|
$full_home_score = $result_match->home_score;
|
|
|
$full_guest_score = $result_match->guest_score;
|
|
|
//零失球
|
|
|
- if ($p_code != 'sw_CS') return false;
|
|
|
+ //if ($p_code != 'sw_CS') return false;
|
|
|
|
|
|
//返回结果
|
|
|
$data = [
|
|
|
@@ -1518,7 +1502,7 @@ class ZqRule
|
|
|
$full_home_score = $result_match->home_score;
|
|
|
$full_guest_score = $result_match->guest_score;
|
|
|
//零失球
|
|
|
- if ($p_code != 'sw_WN') return false;
|
|
|
+ //if ($p_code != 'sw_WN') return false;
|
|
|
|
|
|
//返回结果
|
|
|
$data = [
|
|
|
@@ -1571,7 +1555,7 @@ class ZqRule
|
|
|
$half_home_score = $result_match->u_home_score;
|
|
|
$half_guest_score = $result_match->u_guest_score;
|
|
|
//赢得所有半场
|
|
|
- if ($p_code != 'sw_WB') return false;
|
|
|
+ //if ($p_code != 'sw_WB') return false;
|
|
|
|
|
|
//返回结果
|
|
|
$data = [
|
|
|
@@ -1624,7 +1608,7 @@ class ZqRule
|
|
|
$half_home_score = $result_match->u_home_score;
|
|
|
$half_guest_score = $result_match->u_guest_score;
|
|
|
//赢得任一半场
|
|
|
- if ($p_code != 'WEH') return false;
|
|
|
+ //if ($p_code != 'WEH') return false;
|
|
|
|
|
|
//返回结果
|
|
|
$data = [
|
|
|
@@ -1677,7 +1661,7 @@ class ZqRule
|
|
|
$half_home_score = $result_match->u_home_score;
|
|
|
$half_guest_score = $result_match->u_guest_score;
|
|
|
//双半场进球
|
|
|
- if ($p_code != 'DHG') return false;
|
|
|
+ //if ($p_code != 'DHG') return false;
|
|
|
|
|
|
//返回结果
|
|
|
$data = [
|
|
|
@@ -1734,7 +1718,7 @@ class ZqRule
|
|
|
$lower_home_score = $full_home_score - $half_home_score;
|
|
|
$lower_guest_score = $half_guest_score - $half_guest_score;
|
|
|
//最多进球半场
|
|
|
- if ($p_code != 'MHG') return false;
|
|
|
+ //if ($p_code != 'MHG') return false;
|
|
|
|
|
|
//返回结果
|
|
|
$data = [
|
|
|
@@ -1791,7 +1775,7 @@ class ZqRule
|
|
|
$lower_home_score = $full_home_score - $half_home_score;
|
|
|
$lower_guest_score = $half_guest_score - $half_guest_score;
|
|
|
//最多进球半场-独赢
|
|
|
- if ($p_code != 'MHGC') return false;
|
|
|
+ //if ($p_code != 'MHGC') return false;
|
|
|
|
|
|
//返回结果
|
|
|
$data = [
|
|
|
@@ -1849,7 +1833,7 @@ class ZqRule
|
|
|
// }
|
|
|
|
|
|
//首个进球时间
|
|
|
- if ($p_code != 'FGT') return false;
|
|
|
+ //if ($p_code != 'FGT') return false;
|
|
|
|
|
|
//返回结果
|
|
|
$data = [
|
|
|
@@ -1918,7 +1902,7 @@ class ZqRule
|
|
|
|
|
|
|
|
|
//首个进球时间-3项
|
|
|
- if ($p_code != 'FGTT') return false;
|
|
|
+ //if ($p_code != 'FGTT') return false;
|
|
|
|
|
|
//返回结果
|
|
|
$data = [
|
|
|
@@ -1967,7 +1951,7 @@ class ZqRule
|
|
|
|
|
|
$odds_code = $model->odds_code;
|
|
|
switch ($odds_code) {
|
|
|
- case "bgy":
|
|
|
+ case "bgy":
|
|
|
$returnDatas = $this->isgoal($resultModel, $model, bgy, $allword);
|
|
|
break;
|
|
|
case "bgn":
|