diff --git a/app/agent/controller/Account.php b/app/agent/controller/Account.php index a4bf08a..1bd4646 100644 --- a/app/agent/controller/Account.php +++ b/app/agent/controller/Account.php @@ -20,7 +20,7 @@ class Account extends Controller $page = ($_GET['PageIndex'] - 1) * 50; } $where = []; - $where_str = ''; + $where_str = ' agent_id='.$agent_id.' '; $where['UserCode'] = $agent_phone; //处理筛选 @@ -39,7 +39,7 @@ class Account extends Controller if (!empty($_GET['Btime'])){ $date1 = date('Y-m-d', strtotime($_GET['Btime'])); $date2 = date('Y-m-d', strtotime($_GET['Etime'])); - $where_str .= " EndTime>='" . $date1 . "' and EndTime<='" . $date2 . "' "; + $where_str .= " AND EndTime>='" . $date1 . "' and EndTime<='" . $date2 . "' "; } if (!empty($_GET['Bktime'])){ if (mb_strlen($where_str)>0){ diff --git a/app/agent/controller/Order.php b/app/agent/controller/Order.php index 0bf719f..3bb5e96 100644 --- a/app/agent/controller/Order.php +++ b/app/agent/controller/Order.php @@ -22,6 +22,7 @@ class Order extends Controller $where = []; $where_str = ''; $where['UserName'] = $agent_phone; + $where_str = ' agent_id='.$agent_id.' '; if(!empty($get_data['ProductIds'])){ $where['ProductId'] = $get_data['ProductIds']; @@ -35,7 +36,7 @@ class Order extends Controller if (!empty($_GET['Btime'])){ $date1 = date('Y-m-d', strtotime($_GET['Btime'])); $date2 = date('Y-m-d', strtotime($_GET['Etime'])); - $where_str .= " UpdateTime>='" . $date1 . "' and UpdateTime<='" . $date2 . "' "; + $where_str .= " AND UpdateTime>='" . $date1 . "' and UpdateTime<='" . $date2 . "' "; } if (!empty($get_data['keyWord'])){ $where['UserName'] = ['like','%'.$get_data['keyWord'].'%'];