FetchExamController.class.php
843 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
38
39
40
41
42
43
<?php
/**
* 查询试卷信息
* ListController.class.php
* User: daijun
* Date: 2017年09月05日
*/
namespace Rpc\Controller\Train;
use Common\Service\PaperService;
class FetchExamController extends AbstractController
{
public function Index()
{
// 获取参数
$params = $this->_params;
$ep_ids = $params['ep_ids'];
// 实例化service
$service = new PaperService();
// 查询条件
$conds = array(
'ep_id' => $ep_ids
);
$field = 'ep_id,paper_type,ep_name';
// 排序参数
$order_option = array('ep_id' => 'DESC');
$list = [];
if (!empty($ep_ids)) {
// 查询列表
$list = $service->list_by_conds($conds, null, $order_option, $field);
}
return $list;
}
}