ListController.class.php
999 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
<?php
/**
* 分类列表接口
* User: tangxingguo
* Date: 2017/4/11
* Time: 18:36
*/
namespace Apicp\Controller\AnswerClass;
use Common\Service\ClassService;
class ListController extends \Apicp\Controller\AbstractController
{
/**
* List
* @author
* @desc 分类列表
* @return array 分类列表
array(
'class_id' => 1, // 分类ID
'class_name' => '第一个分类', // 分类名称
'description' => '这是第一个分类', // 分类描述
'manager_name' => '张三', // 负责人姓名
'created' => 1494495535924, // 创建时间
)
*/
public function Index_post()
{
$classServ = new ClassService();
$order_option = [
'`order`' => 'ASC',
'created' => 'DESC'
];
$list = $classServ->list_by_conds([], null, $order_option);
$this->_result = $list;
}
}