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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
11 deletions
+17
-11
AppChat.php
application/chat/controller/AppChat.php
+17
-11
No files found.
application/chat/controller/AppChat.php
View file @
d1e30900
...
@@ -609,23 +609,29 @@ class AppChat extends Basic
...
@@ -609,23 +609,29 @@ 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,否则查询聊天消息是否有未读
$param
[
"addressee_id"
]
=
$params
[
"agent_id"
];
if
(
!
empty
(
$params
[
'agent_id'
])){
$param
[
"is_read"
]
=
0
;
$param
[
"addressee_id"
]
=
$params
[
"agent_id"
];
//TODO 获取未读个数
$param
[
"is_read"
]
=
0
;
$msgModel
=
new
MPushMessage
();
//TODO 获取未读个数
$param
[
"type"
]
=
array
(
"in"
,
"1,2,3,8"
);
$msgModel
=
new
MPushMessage
();
$shop_count
=
$msgModel
->
getListCountByWhere
(
$param
);
$param
[
"type"
]
=
array
(
"in"
,
"1,2,3,8"
);
if
(
$shop_count
>
0
)
{
$shop_count
=
$msgModel
->
getListCountByWhere
(
$param
);
return
$this
->
response
(
"200"
,
"success"
,
[
"is_show_red"
=>
true
]);
if
(
$shop_count
>
0
)
{
return
$this
->
response
(
"200"
,
"success"
,
[
"is_show_red"
=>
true
]);
}
$where
[
"to_id"
]
=
"agent_"
.
$params
[
"agent_id"
];
}
else
{
$where
[
"to_id"
]
=
"user_"
.
$params
[
"agent_id"
];
}
}
$where
[
"to_id"
]
=
"agent_"
.
$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