...
|
...
|
@@ -118,13 +118,13 @@ class MeGuaranteeController extends WeChatBaseController |
|
|
if(!empty($param['application']) && !empty($param['agent_phone'])){
|
|
|
$where['c.application'] = ['eq',$param['application']];
|
|
|
$where['c.agent_phone'] = ['eq',$param['agent_phone']];
|
|
|
$whereor = "o.status = 3 and o.order_expire_time2 > ".$time." and c.application = "."'"."$param[application]"."'"." and c.agent_phone = $param[agent_phone] and c.insurer ="."'"."$insurer"."'";
|
|
|
$whereor = "o.status = 3 and o.order_expire_time2 > $time and c.application = "."'"."$param[application]"."'"." and c.agent_phone = $param[agent_phone] and c.insurer ="."'"."$insurer"."'";
|
|
|
}else if(!empty($param['application'])){
|
|
|
$where['c.application'] = ['eq',$param['application']];
|
|
|
$whereor = "o.status = 3 and o.order_expire_time2 > ".$time." and c.application = "."'"."$param[application]"."'"." and c.insurer ="."'"."$insurer"."'";
|
|
|
$whereor = "o.status = 3 and o.order_expire_time2 > $time and c.application = "."'"."$param[application]"."'"." and c.insurer ="."'"."$insurer"."'";
|
|
|
}else if(!empty($param['agent_phone'])){
|
|
|
$where['c.agent_phone'] = ['eq',$param['agent_phone']];
|
|
|
$whereor = "o.status = 3 and o.order_expire_time2 > ".$time." and c.agent_phone = $param[agent_phone] and c.insurer ="."'"."$insurer"."'";
|
|
|
$whereor = "o.status = 3 and o.order_expire_time2 > $time and c.agent_phone = $param[agent_phone] and c.insurer ="."'"."$insurer"."'";
|
|
|
}else{
|
|
|
$where['o.user_id'] = ['eq',$user_id];
|
|
|
$whereor = "o.user_id = $user_id and o.status = 3 and o.order_expire_time2 > ".$time." and c.insurer ="."'"."$insurer"."'";
|
...
|
...
|
@@ -155,15 +155,15 @@ class MeGuaranteeController extends WeChatBaseController |
|
|
if(!empty($param['application']) && !empty($param['agent_phone'])){
|
|
|
$where['c.application'] = ['eq',$param['application']];
|
|
|
$where['c.agent_phone'] = ['eq',$param['agent_phone']];
|
|
|
$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.user_id = $user_id and o.status = 1 and c.insurer ="."'"."$insurer"."'"." and c.application = "."'"."$param[application]"."'"." and c.agent_phone = $param[agent_phone])";
|
|
|
$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])";
|
|
|
//$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)";
|
|
|
}else if(!empty($param['application'])){
|
|
|
$where['c.application'] = ['eq',$param['application']];
|
|
|
$whereor = "(o.status = 3 and o.order_expire_time2 < $time and c.insurer ="."'"."$insurer"."'"." and c.application = "."'"."$param[application]"."'".") or (o.user_id = $user_id and o.status = 1 and c.insurer ="."'"."$insurer"."'"." and c.application = "."'"."$param[application]"."'".")";
|
|
|
$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]"."'".")";
|
|
|
// $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)";
|
|
|
}else if(!empty($param['agent_phone'])){
|
|
|
$where['c.agent_phone'] = ['eq',$param['agent_phone']];
|
|
|
$whereor = "(o.status = 3 and o.order_expire_time2 < $time and c.insurer ="."'"."$insurer"."'"." and c.agent_phone = $param[agent_phone]) or (o.user_id = $user_id and o.status = 1 and c.insurer ="."'"."$insurer"."'"." and c.agent_phone = $param[agent_phone])";
|
|
|
$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])";
|
|
|
// $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)";
|
|
|
}else{
|
|
|
$whereor = "(o.user_id = $user_id and o.status = 3 and o.order_expire_time2 < $time and c.insurer ="."'"."$insurer"."'".")";
|
...
|
...
|
|