DeleteController.class.php
625 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/**
* 删除评论接口
* @author: houyingcai
* @email: 594609175@qq.com
* @date : 2017-05-09 14:11:22
* @version $Id$
*/
namespace Apicp\Controller\Comment;
use Common\Service\CommentService;
class DeleteController extends AbstractController
{
public function Index_post()
{
$comment_service = new CommentService();
$comment_id = I('post.comment_id', 0, 'intval');
if (empty($comment_id)) {
E('_ERR_COMMENT_ID_EMPTY');
}
if (!$comment_service->del_comment($comment_id)) {
return false;
}
return true;
}
}