作者 潘浩文
1 个管道 的构建 通过 耗费 0 秒

个人中心接口设计

@@ -51,14 +51,13 @@ class UserController extends RestBaseController @@ -51,14 +51,13 @@ class UserController extends RestBaseController
51 $where['o.to_post_status']=$param['status']; 51 $where['o.to_post_status']=$param['status'];
52 } 52 }
53 if ($param['status']==""){ 53 if ($param['status']==""){
54 - $where['o.to_post_status']='not null'; 54 + $where['o.to_post_status']=['neq',0];
55 } 55 }
56 $data=Db::name('order') 56 $data=Db::name('order')
57 ->alias('o') 57 ->alias('o')
58 ->join('post p','o.post_id=p.id') 58 ->join('post p','o.post_id=p.id')
59 ->join('user u1','p.user_id=u1.id') 59 ->join('user u1','p.user_id=u1.id')
60 ->where($where) 60 ->where($where)
61 - ->whereNotNull('o.to_post_status')  
62 ->field('o.*,u1.user_nickname') 61 ->field('o.*,u1.user_nickname')
63 ->select()->each(function ($item) { 62 ->select()->each(function ($item) {
64 if ($item['to_post_status']!=6){ 63 if ($item['to_post_status']!=6){