<?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; } }