正在显示
1 个修改的文件
包含
6 行增加
和
5 行删除
@@ -129,15 +129,16 @@ class MeGuaranteeController extends WeChatBaseController | @@ -129,15 +129,16 @@ class MeGuaranteeController extends WeChatBaseController | ||
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]; | 131 | // $where['o.status'] = ['eq',2]; |
132 | - $where['c.insurer'] = ['eq',$param['insurer']]; | 132 | +// $where['c.insurer'] = ['eq',$param['insurer']]; |
133 | if(!empty($param['application']) && !empty($param['agent_phone'])){ | 133 | if(!empty($param['application']) && !empty($param['agent_phone'])){ |
134 | - $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"."'"; | 134 | + $whereor = "(o.status = 2 and o.delete_time = 0) or (o.status = 1 and c.insurer ="."'"."$insurer"."'"." and o.order_about_time < ".($time-24*30*60*60)." and o.delete_time = 0) or (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.status = 3 and o.order_about_time < ".($time-24*30*60*60)." and c.insurer ="."'"."$insurer"."'and o.delete_time = 0)"; |
135 | }else if(!empty($param['application'])){ | 135 | }else if(!empty($param['application'])){ |
136 | - $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"."'"; | 136 | + $whereor = "(o.status = 2 and o.delete_time = 0) or (o.status = 1 and c.insurer ="."'"."$insurer"."'"." and o.order_about_time < ".($time-24*30*60*60)." and o.delete_time = 0) or (o.status = 3 and c.application = "."'"."$param[application]"."'"." and c.insurer ="."'"."$insurer"."'"." and o.delete_time = 0) or (o.status = 3 and o.order_about_time < ".($time-24*30*60*60)." and c.insurer ="."'"."$insurer"."' and o.delete_time = 0)"; |
137 | }else if(!empty($param['agent_phone'])){ | 137 | }else if(!empty($param['agent_phone'])){ |
138 | - $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"."'"; | 138 | + $whereor = "(o.status = 2 and o.delete_time = 0) or (o.status = 1 and c.insurer ="."'"."$insurer"."'"." and o.order_about_time < ".($time-24*30*60*60)." and o.delete_time = 0) or (o.status = 3 and c.agent_phone = $param[agent_phone] and c.insurer ="."'"."$insurer"."'"." and o.delete_time = 0) or (o.status = 3 and o.order_about_time < ".($time-24*30*60*60)." and c.insurer ="."'"."$insurer"."'and o.delete_time = 0)"; |
139 | }else{ | 139 | }else{ |
140 | - $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"."'"; | 140 | + $whereor = "(o.status = 2 and o.delete_time = 0) or (o.status = 1 and c.insurer ="."'"."$insurer"."'"." and o.order_about_time < ".($time-24*30*60*60)." and o.delete_time = 0) or (o.status = 3 and o.order_about_time < ".($time-24*30*60*60)." and c.insurer ="."'"."$insurer"."')"; |
141 | + //$whereor = "(o.status = 2 and o.delete_time = 0) or (o.order_expire_time < $time ) or (o.status = 1 and o.order_about_time < ".($time-24*30*60*60)." and o.delete_time = 0) or (o.status = 3 and o.order_about_time < ".($time-24*30*60*60)." and o.delete_time = 0)"; | ||
141 | } | 142 | } |
142 | } | 143 | } |
143 | } | 144 | } |
-
请 注册 或 登录 后发表评论