Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
d1e30900
Commit
d1e30900
authored
Mar 05, 2019
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
34d82cd9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
AppChat.php
application/chat/controller/AppChat.php
+8
-2
No files found.
application/chat/controller/AppChat.php
View file @
d1e30900
...
@@ -609,12 +609,14 @@ class AppChat extends Basic
...
@@ -609,12 +609,14 @@ class AppChat extends Basic
{
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
/* $params = array(
/* $params = array(
"agent_id" => 5775
"agent_id" => 5775,
"user_id" => 123,
);*/
);*/
if
(
empty
(
$params
[
'agent_id'
]))
{
if
(
empty
(
$params
[
'agent_id'
])
&&
empty
(
$params
[
'user_id'
])
)
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
}
//todo 先获取是否有店铺或客户修改消息是否为0,大于0返回true,否则查询聊天消息是否有未读
//todo 先获取是否有店铺或客户修改消息是否为0,大于0返回true,否则查询聊天消息是否有未读
if
(
!
empty
(
$params
[
'agent_id'
])){
$param
[
"addressee_id"
]
=
$params
[
"agent_id"
];
$param
[
"addressee_id"
]
=
$params
[
"agent_id"
];
$param
[
"is_read"
]
=
0
;
$param
[
"is_read"
]
=
0
;
//TODO 获取未读个数
//TODO 获取未读个数
...
@@ -626,6 +628,10 @@ class AppChat extends Basic
...
@@ -626,6 +628,10 @@ class AppChat extends Basic
}
}
$where
[
"to_id"
]
=
"agent_"
.
$params
[
"agent_id"
];
$where
[
"to_id"
]
=
"agent_"
.
$params
[
"agent_id"
];
}
else
{
$where
[
"to_id"
]
=
"user_"
.
$params
[
"agent_id"
];
}
$where
[
"is_read"
]
=
0
;
$where
[
"is_read"
]
=
0
;
$chatModel
=
new
ChatMsg
();
$chatModel
=
new
ChatMsg
();
$msg_count
=
$chatModel
->
getTotalByToId
(
$where
);
$msg_count
=
$chatModel
->
getTotalByToId
(
$where
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment