DeleteController.class.php 762 Bytes
<?php
/**
 * 【销售活动-后台】删除回复接口
 *
 * User: WJY
 * Date: 2017-11-02
 */

namespace Apicp\Controller\Reply;

use Common\Common\AttachOperation;
use Common\Service\ReplyService;

class DeleteController extends \Apicp\Controller\AbstractController
{

    public function Index_post()
    {

        $reply_service = new ReplyService();

        $reply_id = I('post.reply_id', 0, 'intval');
        if (empty($reply_id)) {

            E('_ERR_REPLY_ID_EMPTY');
        }

        if (!$reply_service->del_reply_pc($reply_id)) {

            return false;
        }

        // 附件删除操作
        $attach_serv = new AttachOperation();
        $attach_serv->delete_attach(APP_DIR, 'reply', [$reply_id]);

        return true;
    }
}