Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
quxiu
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
冷斌
quxiu
Commits
ed2dfe3d
Commit
ed2dfe3d
authored
Mar 27, 2020
by
冷斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
踢人
parent
d7e57e99
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
+17
-6
api/Appapi/Model/Live.php
+13
-3
api/Appapi/Model/Livemanage.php
+4
-3
No files found.
api/Appapi/Model/Live.php
View file @
ed2dfe3d
...
@@ -266,7 +266,10 @@ class Model_Live extends PhalApi_Model_NotORM {
...
@@ -266,7 +266,10 @@ class Model_Live extends PhalApi_Model_NotORM {
/* 直播状态 */
/* 直播状态 */
public
function
checkLive
(
$uid
,
$liveuid
,
$stream
){
public
function
checkLive
(
$uid
,
$liveuid
,
$stream
){
$time
=
time
();
DI
()
->
notorm
->
live_kick
->
where
(
'uid=? and liveuid=? and addtime < ?'
,
$uid
,
$liveuid
,
$time
)
->
delete
();
/* 是否被踢出 */
/* 是否被踢出 */
$isexist
=
DI
()
->
notorm
->
live_kick
$isexist
=
DI
()
->
notorm
->
live_kick
->
select
(
"id"
)
->
select
(
"id"
)
...
@@ -1240,15 +1243,22 @@ class Model_Live extends PhalApi_Model_NotORM {
...
@@ -1240,15 +1243,22 @@ class Model_Live extends PhalApi_Model_NotORM {
/* 踢人 */
/* 踢人 */
public
function
kicking
(
$uid
,
$liveuid
,
$touid
){
public
function
kicking
(
$uid
,
$liveuid
,
$touid
){
$time
=
time
();
DI
()
->
notorm
->
live_kick
->
where
(
'uid=? and liveuid=? and addtime < ?'
,
$touid
,
$liveuid
,
$time
)
->
delete
();
$isexist
=
DI
()
->
notorm
->
live_kick
$isexist
=
DI
()
->
notorm
->
live_kick
->
where
(
'uid=? and liveuid=?
'
,
$touid
,
$liveuid
)
->
where
(
'uid=? and liveuid=?'
,
$touid
,
$liveuid
)
->
fetchOne
();
->
fetchOne
();
if
(
$isexist
){
if
(
$isexist
){
return
1002
;
return
1002
;
}
}
$rs
=
DI
()
->
notorm
->
live_kick
->
insert
([
'uid'
=>
$touid
,
'liveuid'
=>
$liveuid
,
'actionid'
=>
$uid
,
'addtime'
=>
time
()
]);
$time
+=
3600
*
12
;
$rs
=
DI
()
->
notorm
->
live_kick
->
insert
([
'uid'
=>
$touid
,
'liveuid'
=>
$liveuid
,
'actionid'
=>
$uid
,
'addtime'
=>
$time
]);
return
$rs
;
return
$rs
;
...
...
api/Appapi/Model/Livemanage.php
View file @
ed2dfe3d
...
@@ -116,9 +116,10 @@ class Model_Livemanage extends PhalApi_Model_NotORM {
...
@@ -116,9 +116,10 @@ class Model_Livemanage extends PhalApi_Model_NotORM {
/* 踢人用户 */
/* 踢人用户 */
public
function
getKickList
(
$liveuid
)
{
public
function
getKickList
(
$liveuid
)
{
$time
=
time
();
DI
()
->
notorm
->
live_kick
->
where
(
'liveuid=? and addtime < ?'
,
$liveuid
,
$time
)
->
delete
();
$list
=
DI
()
->
notorm
->
live_kick
$list
=
DI
()
->
notorm
->
live_kick
->
select
(
'uid'
)
->
select
(
'uid'
)
->
where
(
'liveuid=?'
,
$liveuid
)
->
where
(
'liveuid=?'
,
$liveuid
)
...
...
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