DetailListController.class.php
1.11 KB
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
44
45
46
47
48
49
50
51
52
53
54
<?php
/**
* Created by IntelliJ IDEA.
* 用户积分操作明细接口
* User: zhoutao
* Date: 2016/11/15
* Time: 上午10:07
*/
namespace Apicp\Controller\Integral;
use VcySDK\Integral;
use VcySDK\Service;
class DetailListController extends AbstractController
{
public function Index()
{
$conds = $this->getCondition();
$sdk = new Integral(Service::instance());
$this->_result = $sdk->detailList($conds);
return true;
}
/**
* 获取提交的参数
*
* @return array|bool
*/
protected function getCondition()
{
$conds = [];
$params = ['memUid', 'milOptType', 'startTime', 'endTime', 'businessKey', 'businessAct', 'miType'];
foreach ($params as $name) {
$temp = I('post.' . $name);
if (!empty($temp)) {
$conds[$name] = $temp;
}
}
$conds['pageNum'] = I('post.page', 1);
$conds['pageSize'] = I('post.limit', 20);
if (empty($conds['memUid'])) {
E('_ERR_EMPTY_UID');
return false;
}
return $conds;
}
}