Commit 2c1e869d authored by zhuwei's avatar zhuwei

1

parent c16cbe74
...@@ -294,22 +294,11 @@ class OReportModel extends Model ...@@ -294,22 +294,11 @@ class OReportModel extends Model
$conditions[] = "aaa.order_id =".$params['order_id']; $conditions[] = "aaa.order_id =".$params['order_id'];
} }
//城市
//城市 '省'
if (!empty($params['province'])) {
$conditions[] = "aaa.province = {$params['province']}" ;
}
//城市 '市'
if (!empty($params['city'])) { if (!empty($params['city'])) {
$conditions[] = "aaa.city = {$params['city']}" ; $conditions[] = "aaa.city = {$params['city']}" ;
} }
//城市 '所在区'
if (!empty($params['disc'])) {
$conditions[] = "aaa.disc = {$params['disc']}" ;
}
//商铺地址 //商铺地址
if (!empty($params['internal_address'])) { if (!empty($params['internal_address'])) {
...@@ -323,7 +312,7 @@ class OReportModel extends Model ...@@ -323,7 +312,7 @@ class OReportModel extends Model
//客户ID //客户ID
if (!empty($params['user_id'])) { if (!empty($params['user_id'])) {
$conditions[] = "aaa.user_id = {$params['user_phone']}" ; $conditions[] = "aaa.user_id = {$params['user_id']}" ;
} }
...@@ -333,8 +322,9 @@ class OReportModel extends Model ...@@ -333,8 +322,9 @@ class OReportModel extends Model
$where_params = 'WHERE ' . implode(" AND ", $conditions); $where_params = 'WHERE ' . implode(" AND ", $conditions);
} }
// dump($where_params);
// dump($params["type"]);
// exit;
switch ($params["type"]) { switch ($params["type"]) {
case 2: case 2:
$sql = "SELECT * FROM $sql = "SELECT * FROM
...@@ -467,6 +457,8 @@ class OReportModel extends Model ...@@ -467,6 +457,8 @@ class OReportModel extends Model
$result = $this->db->query($sql); $result = $this->db->query($sql);
// dump($sql);
// dump($result);
// echo $this->getLastSql(); // echo $this->getLastSql();
return $result; return $result;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment