作者 王智

daima

... ... @@ -431,12 +431,14 @@ class User extends Api
$rult = Db::name('order')->where($map)->where('user_id', $user_id)->order('id desc')->page($param['pages'], $param['rows'])
->alias('a')
->join('user u', 'u.id=a.user_id')
->field('a.id,a.status,a.createtime,u.address,u.address_con,u.car_num,u.color,u.car_type')
->join('vip v', 'v.id=a.vip_id')
->field('a.id,v.title,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')
->field('a.id,a.status,a.createtime,u.address,u.address_con,u.car_num,u.color,u.car_type')
->join('vip v', 'v.id=a.vip_id')
->field('a.id,v.title,a.status,a.createtime,u.address,u.address_con,u.car_num,u.color,u.car_type')
->select();
if (empty($rult)) {
$List = [
... ... @@ -446,6 +448,7 @@ class User extends Api
} else {
foreach ($rult as $k => $v) {
$list[$k]['id'] = $v['id'];
$list[$k]['title'] = $v['title'];
$list[$k]['status'] = $v['status'];
$list[$k]['createtime'] = date('Y-m-d H:i:s', $v['createtime']);
$list[$k]['start'] = date('Y-m-d H:i:s', $v['createtime'] + 86400 * 4);
... ...