Authored by cailing

删除订单

... ... @@ -32,6 +32,11 @@ class OrderModel
foreach ($orderInfo['data']['order_list'] as $orderK => $orderV) {
$orders[$orderK]['orderNum'] = $orderV['order_code']; //订单标识
$orders[$orderK]['orderTime'] = date("Y-m-d H:i:s", $orderV['create_time']); //下单时间
// $orders[$orderK]['hasDelete'] = true; //彻底删除
//删除订单
if($orderV['is_cancel'] == 'Y' || $orderV['status'] === 6) {
$orders[$orderK]['canDelete'] = true; //删除订单
}
$statusInfo = self::getOrderStatus($orderV['is_cancel'], $orderV['status'], $orderV['payment_type'], $orderV['payment_status']);
//订单状态
if ($statusInfo['cancel']) {
... ...
... ... @@ -219,5 +219,56 @@ class OrdersController extends WebAction
$this->echoJson($data);
}
/**
* 还原订单
*/
public function restoreOrderAction()
{
$data = array('code' => 400, 'message' => '', 'data' => '');
do {
/* 判断是不是AJAX请求 */
if (!$this->isAjax()) {
break;
}
$uid = $this->auditJumpLogin();
$orderCode = trim($this->post('orderCode', ''));
// $data = OrderData::confirmUserOrder($uid, $orderCode);
$data = array('code' => 400, 'message' => '订单还原成功', 'data' => '');
if (!isset($data['code'])) {
break;
}
}
while (false);
$this->echoJson($data);
}
/**
* 删除订单
*/
public function deleteOrderAction()
{
$data = array('code' => 400, 'message' => '', 'data' => '');
do {
/* 判断是不是AJAX请求 */
if (!$this->isAjax()) {
break;
}
$uid = $this->auditJumpLogin();
$orderCode = trim($this->post('orderCode', ''));
// $data = OrderData::confirmUserOrder($uid, $orderCode);
$data = array('code' => 400, 'message' => '订单删除成功', 'data' => '');
if (!isset($data['code'])) {
break;
}
}
while (false);
$this->echoJson($data);
}
}
... ...