|
|
@@ -1141,15 +1141,16 @@ class SportsNoteList extends BaseModel
|
|
|
}
|
|
|
public static function getOrderData($time=60){
|
|
|
|
|
|
+ $time = 3000;
|
|
|
$db = new \App\Models\Setinfo();
|
|
|
//获取设定需审核时间 秒
|
|
|
$handle_time = $db->getInfo(1003)['infocontent']?:90;
|
|
|
|
|
|
//获取需查询 时间条件 时间戳
|
|
|
- //时间区间 开始时间
|
|
|
- $time_unx_s = time() - $time - $handle_time;//-150 秒
|
|
|
//时间区间 截止时间
|
|
|
- $time_unx_e = time() - $handle_time;//-90 秒
|
|
|
+ $time_unx_e = time() - (int)$handle_time;//-90 秒
|
|
|
+ //时间区间 开始时间
|
|
|
+ $time_unx_s = $time_unx_e - $time;//-150 秒
|
|
|
|
|
|
//拼接查询条件
|
|
|
$where = [
|
|
|
@@ -1157,7 +1158,6 @@ class SportsNoteList extends BaseModel
|
|
|
['money_time','<',date('Y-m-d H:i:s',$time_unx_e)],
|
|
|
['roll_ratify','=',2]
|
|
|
];
|
|
|
-
|
|
|
//获取 待处理订单数据
|
|
|
$order_data = self::join('money_buy_match','money_buy_match.order_id','=','money_buy_simplex.order_id')
|
|
|
// ->where(['money_buy_simplex.order_id'=>'S20191025111201242070491'])
|
|
|
@@ -1188,36 +1188,48 @@ class SportsNoteList extends BaseModel
|
|
|
//获取每个订单的危险球数据
|
|
|
$warn_data = commonFunction::filter_by_value($warn_json_data,'match_id',$v['match_id']);
|
|
|
$warn_data_arr = json_decode($warn_data['warn_more'],true);
|
|
|
- //投注时间 时间戳
|
|
|
- $order_time = strtotime($v['money_time']);
|
|
|
- foreach($warn_data_arr as $kk=>$vv){
|
|
|
- //危险球时间 时间戳
|
|
|
- $warn_time = strtotime($vv['timei']);
|
|
|
- //危险球类型 可能的值:1 进球无效 2红卡无效 3无效(用于角球)
|
|
|
- $warn_type = $vv['warn_type'];
|
|
|
- //审核危险球类型
|
|
|
- $v['use_mark'] = '未知类型';
|
|
|
- //确认危险球审核条件
|
|
|
- if($order_time < $warn_time and ($order_time+$handle_time) > $warn_time){
|
|
|
- //根据投注 玩法 确定 危险球审核类型
|
|
|
- if($v['p_code'] == 'CB' and $warn_type== 3){
|
|
|
- $v['use_mark'] = '进球无效';
|
|
|
- }else{
|
|
|
- if($warn_type == 1){
|
|
|
+ //去除危险球默认数据
|
|
|
+ foreach($warn_data_arr as $key=>$val){
|
|
|
+ if($val['rtype'] == 0){
|
|
|
+ unset($warn_data_arr[$key]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ sort($warn_data_arr);
|
|
|
+
|
|
|
+ //当危险球为空,则无需审核,全部通过
|
|
|
+ if(!empty($warn_data_arr)){
|
|
|
+ //投注时间 时间戳
|
|
|
+ $order_time = strtotime($v['money_time']);
|
|
|
+ foreach($warn_data_arr as $kk=>$vv){
|
|
|
+ //危险球时间 时间戳
|
|
|
+ $warn_time = strtotime($vv['timei']);
|
|
|
+ //危险球类型 可能的值:1 进球无效 2红卡无效 3无效(用于角球)
|
|
|
+ $warn_type = $vv['warn_type'];
|
|
|
+ //审核危险球类型
|
|
|
+ $v['use_mark'] = '未知类型';
|
|
|
+ //确认危险球审核条件
|
|
|
+ if($order_time < $warn_time and ($order_time+$handle_time) > $warn_time){
|
|
|
+ //根据投注 玩法 确定 危险球审核类型
|
|
|
+ if($v['p_code'] == 'CB' and $warn_type== 3){
|
|
|
$v['use_mark'] = '进球无效';
|
|
|
+ }else{
|
|
|
+ if($warn_type == 1){
|
|
|
+ $v['use_mark'] = '进球无效';
|
|
|
+ }
|
|
|
+ if($warn_type == 2){
|
|
|
+ $v['use_mark'] = '红卡无效';
|
|
|
+ }
|
|
|
}
|
|
|
- if($warn_type == 2){
|
|
|
- $v['use_mark'] = '红卡无效';
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
- $order_ids_n[] = $v['order_id'];
|
|
|
- $account_identitys[] = $v['account_identity'];
|
|
|
- $order_data_n[] = $v;
|
|
|
- unset($order_data[$k]);
|
|
|
+ $order_ids_n[] = $v['order_id'];
|
|
|
+ $account_identitys[] = $v['account_identity'];
|
|
|
+ $order_data_n[] = $v;
|
|
|
+ unset($order_data[$k]);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
|
|
|
if(!empty($order_data)){
|
|
|
foreach($order_data as $k=>$v){
|