ChangeOrderController.class.php
834 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
<?php
/**
* Created by PhpStorm.
* User: liyifei2012it
* Date: 16/11/17
* Time: 15:42
*/
namespace Apicp\Controller\Department;
use VcySDK\Service;
use VcySDK\Department;
class ChangeOrderController extends AbstractController
{
/**
* 【通讯录】修改部门顺序号接口
* @author liyifei
*/
public function Index_post()
{
$dpId = I('post.department_id', '', 'trim');
$order = I('post.order', '', 'float');
if (strlen($dpId) == 0 || strlen($order) == 0) {
E('_ERR_PARAM_UNDEFINED');
}
$dpServ = new Department(Service::instance());
$upConds = [
'dpId' => $dpId,
'dpDisplayorder' => $order,
];
$dpServ->modify($upConds);
$this->clearDepartmentCache();
return true;
}
}