Ver código fonte

异常处理

彭俊 6 anos atrás
pai
commit
361be84416

+ 2 - 2
Application/Api/Controller/Betorder.php

@@ -153,8 +153,8 @@ class Betorder extends BaseController{
             foreach($v as $kk => $vv){
                 $bet_money += $vv['bet_amount'];
                 //计算每个投注玩法下的可赢金额
-                $prize_money += $this->commonFunction->getEarnMoney($game_code,$vv['p_code'],$vv['odds'],$vv['bet_amount'],1);
-                // $prize_money +=  $vv['odds']* $vv['bet_amount'];
+                // $prize_money += $this->commonFunction->getEarnMoney($game_code,$vv['p_code'],$vv['odds'],$vv['bet_amount'],1);
+                $prize_money +=  $vv['odds']* $vv['bet_amount'];
                 //是否是滚球投注
                 $is_rolling = 0;
                 if($vv['oddsType']=='StRollBall'){

+ 2 - 3
Application/Sports/Controller/MatchList.php

@@ -543,7 +543,6 @@ class  MatchList extends Controller {
             $matchData->match_score = '';//赛事比分
             $matchData->result_mark = '';//赛事实时数据json
 
-
             //通过开赛日期和时间判断是否是进行中滚球
             if($matchData->status < 2 and $matchData->match_date == date("Y-m-d") and $matchData->match_time > date("H:i:s", time()-(90*60)) and $matchData->match_time < date("H:i:s", time())){
                 $matchData->status = 1;
@@ -554,9 +553,9 @@ class  MatchList extends Controller {
                 $result_record = $models['model_result_record'];
                 $match_id = $matchData->match_id;
                 //如果是棒球
-                if($result_record == 'st_bq_result_record'){
+                if($result_record == 'st_bq_result_record' || $result_record == 'st_lq_result_record'){
                     $sql = "select a.match_id,a.home_score,a.guest_score,a.match_time as a_time,a.match_process,a.result_mark from $result_record a,
-(select match_id,max(id) id from $result_record where match_id = $match_id group by match_id)b
+(select match_id,max(id) id from $result_record where match_id =$match_id group by match_id)b
 where a.match_id = b.match_id and a.id = b.id ";
 
                     //查询 赛事结果记录最新的一条

+ 1 - 1
Application/Sports/Controller/MatchListWeb.php

@@ -242,7 +242,7 @@ class MatchListWeb extends Controller{
 where a.match_id = b.match_id and a.id = b.id ";
             }else
             //如果是棒球
-            if($game_code == 'bq'){
+            if($game_code == 'bq' || $game_code == 'lq'){
                 $sql = "select a.match_id,a.home_score,a.guest_score,a.match_time as a_time,a.match_process,a.result_mark from $result_record a,
 (select match_id,max(id) id from $result_record where match_id IN ($match_ids_str) group by match_id)b
 where a.match_id = b.match_id and a.id = b.id ";

+ 1 - 1
Application/Sports/Model/St_zq_competition.php

@@ -82,7 +82,7 @@ class St_zq_competition extends Model
         where a.match_id = b.match_id and a.id = b.id ";
         }else
         //如果是棒球
-        if($game_code == 'bq'){
+        if($game_code == 'bq' || $game_code == 'lq'){
             $sql = "select a.match_id,a.home_score,a.guest_score,a.match_time as a_time,a.match_process,a.result_mark from $result_record a,
         (select match_id,max(id) id from $result_record where match_id IN ($match_ids_str) group by match_id)b
         where a.match_id = b.match_id and a.id = b.id ";

+ 1 - 0
Biz/Common/CommonFunction.php

@@ -1283,6 +1283,7 @@ class CommonFunction {
         return $prize_money;
    }
 
+
    //计算赛事当前进行时间
    function getMatchTime($match_date,$match_time){
     $time = time() - strtotime($match_date.' '.$match_time);