作者 王晓刚
1 个管道 的构建 通过 耗费 1 秒

后台问卷调查

@@ -60,7 +60,7 @@ class LoadController extends HomeBaseController @@ -60,7 +60,7 @@ class LoadController extends HomeBaseController
60 }else if($type == 2){ 60 }else if($type == 2){
61 //$data['status'] eq 2 || $data['order_expire_time'] lt time() || ($data['order_about_time']+24*30*60*60) lt time() 61 //$data['status'] eq 2 || $data['order_expire_time'] lt time() || ($data['order_about_time']+24*30*60*60) lt time()
62 $where['o.status'] = ['eq',2]; 62 $where['o.status'] = ['eq',2];
63 - $whereor = "(o.status = 1 and o.order_expire_time < $time and o.order_about_time < ".($time-24*30*60*60).") or (o.status = 3 and o.order_expire_time < $time) or (o.status = 3 and o.order_about_time < ".($time-24*30*60*60).")"; 63 + $whereor = "o.status = 2 or (o.status = 1 and o.order_expire_time < $time and o.order_about_time < ".($time-24*30*60*60).") or (o.status = 3 and o.order_expire_time < $time) or (o.status = 3 and o.order_about_time < ".($time-24*30*60*60).")";
64 $data = $orderInfoModel->selectData1($where,$whereor); 64 $data = $orderInfoModel->selectData1($where,$whereor);
65 dump($data); 65 dump($data);
66 exit(); 66 exit();
@@ -128,16 +128,15 @@ class MeGuaranteeController extends WeChatBaseController @@ -128,16 +128,15 @@ class MeGuaranteeController extends WeChatBaseController
128 // $where['o.order_about_time'] = ['>',$time]; 128 // $where['o.order_about_time'] = ['>',$time];
129 $whereor = "o.status = 1 and c.insurer = "."'".$insurer."'"." and o.order_about_time < $time and o.order_about_time > ".($time-30*24*60*60); 129 $whereor = "o.status = 1 and c.insurer = "."'".$insurer."'"." and o.order_about_time < $time and o.order_about_time > ".($time-30*24*60*60);
130 }else if($param['status'] == 3){ 130 }else if($param['status'] == 3){
131 - $where['o.status'] = ['eq',2];  
132 $where['c.insurer'] = ['eq',$param['insurer']]; 131 $where['c.insurer'] = ['eq',$param['insurer']];
133 if(!empty($param['application']) && !empty($param['agent_phone'])){ 132 if(!empty($param['application']) && !empty($param['agent_phone'])){
134 - $whereor = "o.status = 1 and c.insurer ="."'"."$insurer"."'"." and o.order_expire_time < $time and o.order_about_time < ".($time-24*30*60*60)." or o.status = 3 and o.order_expire_time < $time and c.application = "."'"."$param[application]"."'"." and c.agent_phone = $param[agent_phone] and c.insurer ="."'"."$insurer"."'"."or o.status = 3 and o.order_about_time < ".($time-24*30*60*60)." and c.insurer ="."'"."$insurer"."'"; 133 + $whereor = "o.status = 2 or o.status = 1 and c.insurer ="."'"."$insurer"."'"." and o.order_expire_time < $time and o.order_about_time < ".($time-24*30*60*60)." or o.status = 3 and o.order_expire_time < $time and c.application = "."'"."$param[application]"."'"." and c.agent_phone = $param[agent_phone] and c.insurer ="."'"."$insurer"."'"."or o.status = 3 and o.order_about_time < ".($time-24*30*60*60)." and c.insurer ="."'"."$insurer"."'";
135 }else if(!empty($param['application'])){ 134 }else if(!empty($param['application'])){
136 - $whereor = "o.status = 1 and c.insurer ="."'"."$insurer"."'"." and o.order_expire_time < $time and o.order_about_time < ".($time-24*30*60*60)." or o.status = 3 and o.order_expire_time < $time and c.application = "."'"."$param[application]"."'"." and c.insurer ="."'"."$insurer"."'"."or o.status = 3 and o.order_about_time < ".($time-24*30*60*60)." and c.insurer ="."'"."$insurer"."'"; 135 + $whereor = "o.status = 2 or o.status = 1 and c.insurer ="."'"."$insurer"."'"." and o.order_expire_time < $time and o.order_about_time < ".($time-24*30*60*60)." or o.status = 3 and o.order_expire_time < $time and c.application = "."'"."$param[application]"."'"." and c.insurer ="."'"."$insurer"."'"."or o.status = 3 and o.order_about_time < ".($time-24*30*60*60)." and c.insurer ="."'"."$insurer"."'";
137 }else if(!empty($param['agent_phone'])){ 136 }else if(!empty($param['agent_phone'])){
138 - $whereor = "o.status = 1 and c.insurer ="."'"."$insurer"."'"." and o.order_expire_time < $time and o.order_about_time < ".($time-24*30*60*60)." or o.status = 3 and o.order_expire_time < $time and c.agent_phone = $param[agent_phone] and c.insurer ="."'"."$insurer"."'"."or o.status = 3 and o.order_about_time < ".($time-24*30*60*60)." and c.insurer ="."'"."$insurer"."'"; 137 + $whereor = "o.status = 2 or o.status = 1 and c.insurer ="."'"."$insurer"."'"." and o.order_expire_time < $time and o.order_about_time < ".($time-24*30*60*60)." or o.status = 3 and o.order_expire_time < $time and c.agent_phone = $param[agent_phone] and c.insurer ="."'"."$insurer"."'"."or o.status = 3 and o.order_about_time < ".($time-24*30*60*60)." and c.insurer ="."'"."$insurer"."'";
139 }else{ 138 }else{
140 - $whereor = "o.status = 1 and c.insurer ="."'"."$insurer"."'"." and o.order_expire_time < $time and o.order_about_time < ".($time-24*30*60*60)." or o.status = 3 and o.order_expire_time < $time and c.insurer ="."'"."$insurer"."'"."or o.status = 3 and o.order_about_time < ".($time-24*30*60*60)." and c.insurer ="."'"."$insurer"."'"; 139 + $whereor = "o.status = 2 or o.status = 1 and c.insurer ="."'"."$insurer"."'"." and o.order_expire_time < $time and o.order_about_time < ".($time-24*30*60*60)." or o.status = 3 and o.order_expire_time < $time and c.insurer ="."'"."$insurer"."'"."or o.status = 3 and o.order_about_time < ".($time-24*30*60*60)." and c.insurer ="."'"."$insurer"."'";
141 } 140 }
142 } 141 }
143 } 142 }