DeleteController.class.php
1.01 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
<?php
/**
* 删除订单
* User: yingcai
* Date: 2018/2/2
* Time: 下午5:02
*/
namespace Apicp\Controller\Order;
use Common\Common\Order;
class DeleteController extends AbstractController
{
/**
* Delete
* @author houyingcai
* @desc 删除订单接口
* @param String order_id:true 订单ID
* @return bool
*/
public function Index_post()
{
$order_id = I('post.order_id');
if (!$order_id) {
E('_ERR_ORDER_ID_NOT');
}
$orderService = &Order::instance();
$orderParams = [
'ordId' => $order_id,
'eaId' => $this->_login->user['eaId'],
];
if (!empty($this->_login->user['eaMobile'])) {
$orderParams['eaMobile'] = $this->_login->user['eaMobile'];
}
if (!empty($this->_login->user['eaRealname'])) {
$orderParams['eaRealname'] = $this->_login->user['eaRealname'];
}
$orderService->deleteOrder($orderParams);
return true;
}
}