Commit b834527d authored by clone's avatar clone

bug

parent cf388545
...@@ -193,16 +193,17 @@ class AppChat extends Basic ...@@ -193,16 +193,17 @@ class AppChat extends Basic
public function getChatHistory() public function getChatHistory()
{ {
$params = $this->params; $params = $this->params;
if (!isset($params['target_type']) || !isset($params['from']) || !isset($params['target'])) { /* $params = array(
return $this->response(ErrorCodeConst::ERROR_CODE_PARAM_NOT_EXIST, "请求参数错误");
}
/* $params = array(
'target_type' => 'users', // 消息类型 users 用户消息。chatgroups: 群消息,chatrooms: 聊天室消息 'target_type' => 'users', // 消息类型 users 用户消息。chatgroups: 群消息,chatrooms: 聊天室消息
'from' => 'app_64', //发送人 'from' => 'agent_5740', //发送人
'target' => '18112347151', //接受人 'target' => 'agent_5741', //接受人
'page_no' => '1', //第几页 'page_no' => '1', //第几页
'page_size' => '15' //每页多少条 'page_size' => '15' //每页多少条
);*/ );*/
if (!isset($params['target_type']) || !isset($params['from']) || !isset($params['target'])) {
return $this->response(ErrorCodeConst::ERROR_CODE_PARAM_NOT_EXIST, "请求参数错误");
}
$page_no = empty($params['page_no']) ? 1 : $params['page_no']; $page_no = empty($params['page_no']) ? 1 : $params['page_no'];
$page_size = empty($params['page_size']) ? 15 : $params['page_size']; $page_size = empty($params['page_size']) ? 15 : $params['page_size'];
......
...@@ -74,7 +74,7 @@ class ChatMsg extends Model ...@@ -74,7 +74,7 @@ class ChatMsg extends Model
->limit($page_size) ->limit($page_size)
->page($page_no) ->page($page_no)
->select(); ->select();
//echo $this->getLastSql(); // echo $this->getLastSql();
return $data; return $data;
} }
......
...@@ -104,16 +104,6 @@ class OrderModel extends Model ...@@ -104,16 +104,6 @@ class OrderModel extends Model
public function searchOrder($field, $params, $where_) public function searchOrder($field, $params, $where_)
{ {
/* $result = $this->db_
->field($field)
->alias("a")
->join("o_report b","a.f_id = b.id","left")
->union('SELECT '.$field.' FROM o_order a left join o_report b on a.f_id = b.id where '.$params)
->where($params)
->select();*/
/* dump($params);
dump($where_);*/
//$where_ = $where_ ." and " . $params;
$sql = "SELECT * FROM $sql = "SELECT * FROM
( (
( (
...@@ -137,7 +127,6 @@ class OrderModel extends Model ...@@ -137,7 +127,6 @@ class OrderModel extends Model
) )
) AS aaa order by aaa.id desc"; ) AS aaa order by aaa.id desc";
$result = $this->db_->query($sql); $result = $this->db_->query($sql);
//echo $this->db_->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