...
|
...
|
@@ -64,9 +64,13 @@ class Message extends Api |
|
|
$page_num = $this->request->param('page_num', 10, 'intval');
|
|
|
$data = $this->model
|
|
|
->with(['order','grab'])
|
|
|
->where('user_id',$this->auth->id)
|
|
|
->where('type','1')
|
|
|
->order('createtime desc')
|
|
|
->alias('a')
|
|
|
->join('order b','b.id = a.order_id')
|
|
|
->join('order_grab c','c.id = a.order_grab_id')
|
|
|
->where('a.user_id',$this->auth->id)
|
|
|
->where('a.type','1')
|
|
|
->order('a.createtime desc')
|
|
|
->field('a.*')
|
|
|
->paginate($page_num,false,['page'=>$page])
|
|
|
->each(function($v){
|
|
|
$v->visible(['id','grab_status','order','grab']);
|
...
|
...
|
@@ -135,9 +139,12 @@ class Message extends Api |
|
|
$page_num = $this->request->param('page_num', 10, 'intval');
|
|
|
$data = $this->model
|
|
|
->with(['order','grab'=>['user']])
|
|
|
->where('user_id',$this->auth->id)
|
|
|
->where('type','2')
|
|
|
->order('createtime desc')
|
|
|
->alias('a')
|
|
|
->join('order b','b.id = a.order_id')
|
|
|
->where('a.user_id',$this->auth->id)
|
|
|
->where('a.type','2')
|
|
|
->order('a.createtime desc')
|
|
|
->field('a.*')
|
|
|
->paginate($page_num,false,['page'=>$page])
|
|
|
->each(function($v){
|
|
|
// 显示数据
|
...
|
...
|
|