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
49eba472
Commit
49eba472
authored
Dec 28, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去除已存在的记录
parent
1dff8307
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
ChatService.php
application/chat/service/ChatService.php
+9
-1
No files found.
application/chat/service/ChatService.php
View file @
49eba472
...
@@ -220,7 +220,7 @@ class ChatService
...
@@ -220,7 +220,7 @@ class ChatService
//todo 根据设备来判断使用设备用户,
//todo 根据设备来判断使用设备用户,
$where
[
'push_id'
]
=
$push_id
;
$where
[
'push_id'
]
=
$push_id
;
$where
[
'type'
]
=
$type
;
$where
[
'type'
]
=
$type
;
$info
=
$this
->
chatUserExtModel
->
getChatUserExtByUserId
(
$where
,
'a.id,b.user_id,a.ext_id,a.device_id,a.push_id,a.is_forbidden'
,
500
);
$info
=
$this
->
chatUserExtModel
->
getChatUserExtByUserId
(
$where
,
'a.id,b.user_id,a.ext_id,a.device_id,a.push_id,a.is_forbidden'
,
500
);
$result
=
false
;
$result
=
false
;
if
(
count
(
$info
)
>
0
)
{
if
(
count
(
$info
)
>
0
)
{
...
@@ -243,6 +243,14 @@ class ChatService
...
@@ -243,6 +243,14 @@ class ChatService
$params
[
"push_id"
]
=
$push_id
;
$params
[
"push_id"
]
=
$push_id
;
$params
[
"is_forbidden"
]
=
0
;
$params
[
"is_forbidden"
]
=
0
;
$result
=
$this
->
chatUserExtModel
->
addChatUserExt
(
$params
);
$result
=
$this
->
chatUserExtModel
->
addChatUserExt
(
$params
);
}
else
{
$where2
[
'push_id'
]
=
[
'<>'
,
$push_id
];
$where2
[
'type'
]
=
$type
;
$where2
[
'is_forbidden'
]
=
0
;
$info
=
$this
->
chatUserExtModel
->
getChatUserExtByUserId
(
$where2
,
'a.id,b.user_id,a.ext_id,a.device_id,a.push_id,a.is_forbidden'
,
500
);
foreach
(
$info
as
$k2
=>
$v2
)
{
$this
->
chatUserExtModel
->
updateDate
([
'is_forbidden'
=>
1
],
[
'id'
=>
$v2
[
'id'
]]);
}
}
}
}
else
{
}
else
{
//todo 保存或更新push_id
//todo 保存或更新push_id
...
...
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