GetController.class.php 885 Bytes
<?php
/**
 * 【下载中心-后台】获取未读数据
 * @author: heyuelong
 * @email:  271608475@qq.com
 * @date :  2018年4月18日11:12:18
 * @version $Id$
 */

namespace Apicp\Controller\Down;

use Common\Common\ExportDownload;
use Common\Common\Helper;
use Common\Service\DownloadService;

class GetController extends \Apicp\Controller\AbstractController
{

    public function Index_post()
    {
        // 实例化DownLoadService
        $service = new DownloadService();

        // 组装查询条件
        $conds = [
            'ea_id' => $this->_login->user['eaId'],
            'read' => Helper::UN_READ,
            'file_status'=>ExportDownload::FILE_STATUS_TRUE
        ];

        // 获取记录总数
        $total = $service->count_by_conds($conds);

        $this->_result = [
            'total' => intval($total),
        ];

        return true;
    }
}