示例#1
0
 public function edit($order_id)
 {
     //检查登录
     $this->_login();
     if ($_POST) {
         //修改信息
         $da['consignee'] = isset($_POST['consignee']) ? htmlspecialchars($_POST['consignee']) : '';
         //姓名
         $da['mobile'] = isset($_POST['mobile']) ? htmlspecialchars($_POST['mobile']) : '';
         //手机
         $da['province'] = isset($_POST['province']) ? htmlspecialchars($_POST['province']) : '0';
         //省
         $da['city'] = isset($_POST['city']) ? htmlspecialchars($_POST['city']) : '0';
         //市
         $da['district'] = isset($_POST['district']) ? htmlspecialchars($_POST['district']) : '0';
         //区
         $da['address'] = isset($_POST['address']) ? htmlspecialchars($_POST['address']) : '';
         //详细地址
         $da['shipping_name'] = isset($_POST['shipping_name']) ? htmlspecialchars($_POST['shipping_name']) : '';
         //物流公司
         $da['shipping_sn'] = isset($_POST['shipping_sn']) ? htmlspecialchars($_POST['shipping_sn']) : '';
         //物流单号
         //修改条件
         $where['order_id'] = htmlspecialchars($order_id);
         //根据订单id修改订单信息
         OrderInfo::modifyOrderInfo($da, $where);
     }
     //不管修改是否成功,都回跳到详情页
     $url = url('admin', 'adminorder::detail', $order_id);
     header('Location:' . $url);
     throw new Exception('exit');
 }
示例#2
0
 public static function editOrderStatus($order_id, $pay_type)
 {
     $order_info = getOrderInfoByOrderId($order_id);
     if ($order_info) {
         $data = array();
         $data['pay_time'] = time();
         $data['pay_status'] = 'yes';
         $data['pay_name'] = $pay_type;
         $where = array();
         $where['order_id'] = $order_id;
         OrderInfo::modifyOrderInfo($data, $where);
         return true;
     } else {
         return false;
     }
 }