UnTopController.class.php 641 Bytes
<?php
/**
 * 【活动中心-管理端】评论取消置顶接口
 * User: yingcai
 * Date: 2017/11/28
 * Time: 下午5:09
 */

namespace Apicp\Controller\Comment;

use Common\Service\CommentService;

class UnTopController extends AbstractController
{
    public function Index_post()
    {
        $comment_id = I('post.comment_id', 0, 'intval');
        // 评论ID不能为空
        if (empty($comment_id)) {

            E('_ERR_COMMENT_ID_EMPTY');
        }

        $comment_service = new CommentService();

        // 取消置顶操作
        $comment_service->update($comment_id, ['top_time' => 0]);

        return true;
    }
}