Commit 83a8ac97 authored by clone's avatar clone

bug

parent 4a636242
......@@ -392,13 +392,13 @@ class ChatService
$params["target"] = $target;
$params["from"] = $target;
$field = "a.id,a.to_id,a.from_id,a.create_time,b.type,b.id as user_or_agent_id,b.only_id,
c.name as agent_name,c.img,d.user_name,d.user_phone,d.user_nick,d.user_pic,d.other_pic";
c.name as agent_name,c.img,c.phone,d.user_name,d.user_phone,d.user_nick,d.user_pic,d.other_pic";
$relationList = $chatRelationModel->getChatRelationInfo($params, $field);
$result = [];
//dump($relationList);
$fields = "a.id,a.from_id,a.to_id,b.body,a.created_at";
$fields = "a.id,a.from_id,a.to_id,b.body,b.type,a.created_at";
$msgModel = new ChatMsg();
foreach ($relationList as $key => $item) {
if ($item["from_id"] == $target) {
......@@ -409,9 +409,11 @@ class ChatService
if ($is_user == 0) {
$result[$key]["name"] = empty($item["user_nick"]) ? $item["user_name"] : $item["user_nick"];
$result[$key]["img"] = empty($item["user_pic"]) ? $item["other_pic"] : $item["user_pic"];
$result[$key]["phone"] = $item["user_phone"];
} else {
$result[$key]["name"] = $item["agent_name"];
$result[$key]["img"] = $item["img"];
$result[$key]["phone"] = $item["phone"];
}
$result[$key]["only_id"] = $item["only_id"];
$select_["from"] = $item["from_id"];
......
......@@ -87,7 +87,7 @@ class ChatRelation extends Model
$query->where($whereOr_);
})
->select();
// echo $this->getLastSql();
echo $this->getLastSql();
return $date;
}
......
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