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
4ba8b958
Commit
4ba8b958
authored
Apr 04, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除视频修改
parent
d934dc84
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
7 deletions
+26
-7
Shop.php
application/api_broker/controller/Shop.php
+13
-7
GHousesVideo.php
application/model/GHousesVideo.php
+13
-0
No files found.
application/api_broker/controller/Shop.php
View file @
4ba8b958
...
...
@@ -1192,33 +1192,39 @@ class Shop extends Basic
}
$m_house_video
=
new
GHousesVideo
();
$num
=
$m_house_video
->
getTotal
([
'id'
=>
$this
->
params
[
'video_id'
],
'is_del'
=>
0
]);
if
(
!
$num
)
{
$video_data
=
$m_house_video
->
getVideoFind
(
'id,upload_id'
,[
'id'
=>
$this
->
params
[
'video_id'
],
'is_del'
=>
0
]);
if
(
!
$video_data
[
'id'
])
{
return
$this
->
response
(
$code
,
'没有该视频'
);
}
$is_auth
=
0
;
if
(
$this
->
params
[
'type'
]
==
'check'
)
{
$data
[
'check_id'
]
=
$this
->
agentId
;
$data
[
'check_name'
]
=
$this
->
agentName
;
$data
[
'check_time'
]
=
date
(
'Y-m-d H:i:s'
);
$rule_name
=
'index/checkVideo'
;
$vip
=
new
VipService
();
$is_auth
=
$vip
->
checkRule
(
$this
->
agentId
,
$rule_name
);
}
else
{
$data
[
'is_del'
]
=
1
;
$rule_name
=
'index/delVideo'
;
if
(
$video_data
[
'upload_id'
]
!=
$this
->
agentId
)
{
$rule_name
=
'index/delVideo'
;
$vip
=
new
VipService
();
$is_auth
=
$vip
->
checkRule
(
$this
->
agentId
,
$rule_name
);
}
}
$vip
=
new
VipService
();
$is_auth
=
$vip
->
checkRule
(
$this
->
agentId
,
$rule_name
);
if
(
$is_auth
)
{
return
$this
->
response
(
101
,
'没有权限'
);
}
$num
=
$m_house_video
->
updateData
(
$data
,
[
'id'
=>
$this
->
params
[
'video_id'
]]);
if
(
$num
)
{
$msg
=
'审核
成功'
;
$msg
=
$this
->
params
[
'type'
]
==
'check'
?
'审核成功'
:
'删除
成功'
;
$code
=
200
;
}
else
{
$msg
=
'审核
失败'
;
$msg
=
$this
->
params
[
'type'
]
==
'check'
?
'审核失败'
:
'删除
失败'
;
}
return
$this
->
response
(
$code
,
$msg
);
}
...
...
application/model/GHousesVideo.php
View file @
4ba8b958
...
...
@@ -59,6 +59,19 @@ class GHousesVideo extends BaseModel
return
$this
->
db_
->
where
(
$where
)
->
column
(
$field
);
}
/**
* @param $field
* @param $where
* @return array|false|\PDOStatement|string|\think\Model
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getVideoFind
(
$field
,
$where
)
{
return
$this
->
db_
->
field
(
$field
)
->
where
(
$where
)
->
find
();
}
/**
* @param $pageNo
* @param $pageSize
...
...
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