作者 王智

daima

... ... @@ -225,8 +225,8 @@ class Common extends Api
//取消订单
public function delOrder()
{
$order_sn = input('id');
$res = Db::name('order')->where('id', $order_sn)->update(['status' => 2]);
$order_sn = input('order_sn');
$res = Db::name('order')->where('order_sn', $order_sn)->update(['status' => 2]);
$this->res($res);
}
}
... ...
... ... @@ -432,13 +432,13 @@ class User extends Api
->alias('a')
->join('user u', 'u.id=a.user_id')
->join('vip v', 'v.id=a.vip_id')
->field('a.id,v.title,v.price,a.status,a.createtime,u.address,u.address_con,u.car_num,u.color,u.car_type')
->field('a.id,a.order_sn,v.title,v.price,a.status,a.createtime,u.address,u.address_con,u.car_num,u.color,u.car_type')
->select();
$count = Db::name('order')->where($map)->where('user_id', $user_id)->order('id desc')
->alias('a')
->join('user u', 'u.id=a.user_id')
->join('vip v', 'v.id=a.vip_id')
->field('a.id,v.title,v.price,a.status,a.createtime,u.address,u.address_con,u.car_num,u.color,u.car_type')
->field('a.id,a.order_sn,v.title,v.price,a.status,a.createtime,u.address,u.address_con,u.car_num,u.color,u.car_type')
->select();
if (empty($rult)) {
$List = [
... ... @@ -448,6 +448,7 @@ class User extends Api
} else {
foreach ($rult as $k => $v) {
$list[$k]['id'] = $v['id'];
$list[$k]['order_sn'] = $v['order_sn'];
$list[$k]['title'] = $v['title'];
$list[$k]['price'] = $v['price'];
$list[$k]['status'] = $v['status'];
... ...