Commit a562a2b8 authored by clone's avatar clone

聊天bug

parent c7f24cd0
......@@ -119,7 +119,7 @@ class AppChat extends Basic
return $this->response(ErrorCodeConst::ERROR_CODE_PARAM_NOT_EXIST, "请求参数错误");
}
/* $params = array(
"only_id" => "agent_9",
"only_id" => "agent_5",
"source" => 2,// 1经纪人 or 2用户
);*/
......@@ -166,7 +166,7 @@ class AppChat extends Basic
return $this->response(ErrorCodeConst::ERROR_CODE_TARGET_TYPE_ERROR, "错误的消息类型");
}
$result = $this->_chat->sendMsg($user_name,$target_type, $target, $source, $is_user, $type, $msg_content, $from, $this->accessToken);
$result = $this->_chat->sendMsg($user_name, $target_type, $target, $source, $is_user, $type, $msg_content, $from, $this->accessToken);
if ($result) {
return $this->response("200", "", [ "msg" => "消息发送成功" ]);
} else {
......
......@@ -247,8 +247,7 @@ class ChatService
$field = "a.id,a.name as user_nick,a.phone as user_phone,a.img as user_pic,CONCAT(c.district_name,'-',b.store_name) as shop_name";
$where_agent["a.phone"] = array( "in", $agent_phone );
$where_agent["phone"] = array( "in", $agent_phone );
$agentsResult = $this->agentsV2Model->getAgentsInfoByAgentId($field, $where_agent);
foreach ($agentsResult as $v) {
......
......@@ -427,6 +427,9 @@ class AAgents extends BaseModel
if (isset($params["agent_id"])) {
$where_["a.id"] = $params["agent_id"];
}
if (isset($params["phone"])) {
$where_["a.phone"] = $params["phone"];
}
if (isset($params["store_id"])) {
$where_["b.id"] = $params["store_id"];
$where_["a.level"] = array("in","20,40");
......
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