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

代理人模块

@@ -155,15 +155,15 @@ class MeGuaranteeController extends WeChatBaseController @@ -155,15 +155,15 @@ class MeGuaranteeController extends WeChatBaseController
155 if(!empty($param['application']) && !empty($param['agent_phone'])){ 155 if(!empty($param['application']) && !empty($param['agent_phone'])){
156 $where['c.application'] = ['eq',$param['application']]; 156 $where['c.application'] = ['eq',$param['application']];
157 $where['c.agent_phone'] = ['eq',$param['agent_phone']]; 157 $where['c.agent_phone'] = ['eq',$param['agent_phone']];
158 - $whereor = "(o.status = 3 and o.order_expire_time2 < $time and c.insurer ="."'"."$insurer"."'"." and c.application = "."'"."$param[application]"."'"." and c.agent_phone = $param[agent_phone]) or (o.status = 1 and c.insurer ="."'"."$insurer"."'"." and c.application = "."'"."$param[application]"."'"." and c.agent_phone = $param[agent_phone])"; 158 + $whereor = "(o.status = 3 and o.order_expire_time2 < $time and c.insurer ="."'"."$insurer"."'"." and c.application = "."'"."$param[application]"."'"." and c.agent_phone = $param[agent_phone])";
159 //$whereor = "(o.user_id = $user_id and o.status = 2 and o.delete_time = 0 and o.order_expire_time2 < $time) or (o.user_id = $user_id and o.status = 1 and c.insurer ="."'"."$insurer"."'"." and o.order_about_time < ".($time-24*30*60*60)." and o.delete_time = 0) or (o.user_id = $user_id and o.status = 3 and c.application = "."'"."$param[application]"."'"." and c.agent_phone = $param[agent_phone] and c.insurer ="."'"."$insurer"."'"."and o.delete_time = 0) or (o.user_id = $user_id and o.status = 3 and o.order_about_time < ".($time-24*30*60*60)." and c.insurer ="."'"."$insurer"."'and o.delete_time = 0)"; 159 //$whereor = "(o.user_id = $user_id and o.status = 2 and o.delete_time = 0 and o.order_expire_time2 < $time) or (o.user_id = $user_id and o.status = 1 and c.insurer ="."'"."$insurer"."'"." and o.order_about_time < ".($time-24*30*60*60)." and o.delete_time = 0) or (o.user_id = $user_id and o.status = 3 and c.application = "."'"."$param[application]"."'"." and c.agent_phone = $param[agent_phone] and c.insurer ="."'"."$insurer"."'"."and o.delete_time = 0) or (o.user_id = $user_id and o.status = 3 and o.order_about_time < ".($time-24*30*60*60)." and c.insurer ="."'"."$insurer"."'and o.delete_time = 0)";
160 }else if(!empty($param['application'])){ 160 }else if(!empty($param['application'])){
161 $where['c.application'] = ['eq',$param['application']]; 161 $where['c.application'] = ['eq',$param['application']];
162 - $whereor = "(o.status = 3 and o.order_expire_time2 < $time and c.insurer ="."'"."$insurer"."'"." and c.application = "."'"."$param[application]"."'".") or (o.status = 1 and c.insurer ="."'"."$insurer"."'"." and c.application = "."'"."$param[application]"."'".")"; 162 + $whereor = "(o.status = 3 and o.order_expire_time2 < $time and c.insurer ="."'"."$insurer"."'"." and c.application = "."'"."$param[application]"."'".")";
163 // $whereor = "(o.user_id = $user_id and o.status = 2 and o.delete_time = 0 and o.order_expire_time2 < $time) or (o.user_id = $user_id and o.status = 1 and c.insurer ="."'"."$insurer"."'"." and o.order_about_time < ".($time-24*30*60*60)." and o.delete_time = 0) or (o.user_id = $user_id and o.status = 3 and c.application = "."'"."$param[application]"."'"." and c.insurer ="."'"."$insurer"."'"." and o.delete_time = 0) or (o.user_id = $user_id and o.status = 3 and o.order_about_time < ".($time-24*30*60*60)." and c.insurer ="."'"."$insurer"."' and o.delete_time = 0)"; 163 // $whereor = "(o.user_id = $user_id and o.status = 2 and o.delete_time = 0 and o.order_expire_time2 < $time) or (o.user_id = $user_id and o.status = 1 and c.insurer ="."'"."$insurer"."'"." and o.order_about_time < ".($time-24*30*60*60)." and o.delete_time = 0) or (o.user_id = $user_id and o.status = 3 and c.application = "."'"."$param[application]"."'"." and c.insurer ="."'"."$insurer"."'"." and o.delete_time = 0) or (o.user_id = $user_id and o.status = 3 and o.order_about_time < ".($time-24*30*60*60)." and c.insurer ="."'"."$insurer"."' and o.delete_time = 0)";
164 }else if(!empty($param['agent_phone'])){ 164 }else if(!empty($param['agent_phone'])){
165 $where['c.agent_phone'] = ['eq',$param['agent_phone']]; 165 $where['c.agent_phone'] = ['eq',$param['agent_phone']];
166 - $whereor = "(o.status = 3 and o.order_expire_time2 < $time and c.insurer ="."'"."$insurer"."'"." and c.agent_phone = $param[agent_phone]) or (o.status = 1 and c.insurer ="."'"."$insurer"."'"." and c.agent_phone = $param[agent_phone])"; 166 + $whereor = "(o.status = 3 and o.order_expire_time2 < $time and c.insurer ="."'"."$insurer"."'"." and c.agent_phone = $param[agent_phone])";
167 // $whereor = "(o.user_id = $user_id and o.status = 2 and o.delete_time = 0 and o.order_expire_time2 < $time) or (o.user_id = $user_id and o.status = 1 and c.insurer ="."'"."$insurer"."'"." and o.order_about_time < ".($time-24*30*60*60)." and o.delete_time = 0) or (o.user_id = $user_id and o.status = 3 and c.agent_phone = $param[agent_phone] and c.insurer ="."'"."$insurer"."'"." and o.delete_time = 0) or (o.user_id = $user_id and o.status = 3 and o.order_about_time < ".($time-24*30*60*60)." and c.insurer ="."'"."$insurer"."'and o.delete_time = 0)"; 167 // $whereor = "(o.user_id = $user_id and o.status = 2 and o.delete_time = 0 and o.order_expire_time2 < $time) or (o.user_id = $user_id and o.status = 1 and c.insurer ="."'"."$insurer"."'"." and o.order_about_time < ".($time-24*30*60*60)." and o.delete_time = 0) or (o.user_id = $user_id and o.status = 3 and c.agent_phone = $param[agent_phone] and c.insurer ="."'"."$insurer"."'"." and o.delete_time = 0) or (o.user_id = $user_id and o.status = 3 and o.order_about_time < ".($time-24*30*60*60)." and c.insurer ="."'"."$insurer"."'and o.delete_time = 0)";
168 }else{ 168 }else{
169 $whereor = "(o.user_id = $user_id and o.status = 3 and o.order_expire_time2 < $time and c.insurer ="."'"."$insurer"."'".")"; 169 $whereor = "(o.user_id = $user_id and o.status = 3 and o.order_expire_time2 < $time and c.insurer ="."'"."$insurer"."'".")";