作者 xiaohu thinkpad

ceshi wode jiaolian

... ... @@ -437,10 +437,8 @@ class YuyueController extends UserBaseController
$data = Db::name('yuyue')
->alias('yy')
->join('qnb_user u', 'u.id=yy.uid')
->join('order o', 'o.uid=yy.uid')
->join('goods g', 'g.id=o.gid')
->where(['teach_id' => $id])
->field('yy.*,u.user_nickname,u.headimgurl,u.id as tech_id,g.name as gname')
->field('yy.*,u.user_nickname,u.headimgurl,u.id as tech_id,u.kemu as gname')
->order('create_time desc')
->select()
->toArray();
... ... @@ -450,44 +448,36 @@ class YuyueController extends UserBaseController
$data1 = Db::name('yuyue')
->alias('yy')
->join('qnb_user u', 'u.id=yy.uid')
->join('order o', 'o.uid=yy.uid')
->join('goods g', 'g.id=o.gid')
->where(['teach_id' => $id])
->where(['yy.status' => '1'])
->field('yy.*,u.user_nickname,u.headimgurl,u.id as tech_id,g.name as gname')
->field('yy.*,u.user_nickname,u.headimgurl,u.id as tech_id,u.kemu as gname')
->order('create_time desc')
->select()
->toArray();
$data2 = Db::name('yuyue')
->alias('yy')
->join('qnb_user u', 'u.id=yy.uid')
->join('order o', 'o.uid=yy.uid')
->join('goods g', 'g.id=o.gid')
->where(['teach_id' => $id])
->where(['yy.status' => '4'])
->field('yy.*,u.user_nickname,u.headimgurl,u.id as tech_id,g.name as gname')
->field('yy.*,u.user_nickname,u.headimgurl,u.id as tech_id,u.kemu as gname')
->order('create_time desc')
->select()
->toArray();
$data3 = Db::name('yuyue')
->alias('yy')
->join('qnb_user u', 'u.id=yy.uid')
->join('order o', 'o.uid=yy.uid')
->join('goods g', 'g.id=o.gid')
->where(['teach_id' => $id])
->where(['yy.status' => '2'])
->field('yy.*,u.user_nickname,u.headimgurl,u.id as tech_id,g.name as gname')
->field('yy.*,u.user_nickname,u.headimgurl,u.id as tech_id,u.kemu as gname')
->order('create_time desc')
->select()
->toArray();
$data4 = Db::name('yuyue')
->alias('yy')
->join('qnb_user u', 'u.id=yy.uid')
->join('order o', 'o.uid=yy.uid')
->join('goods g', 'g.id=o.gid')
->where(['teach_id' => $id])
->where(['yy.status' => '3'])
->field('yy.*,u.user_nickname,u.headimgurl,u.id as tech_id,g.name as gname')
->field('yy.*,u.user_nickname,u.headimgurl,u.id as tech_id,u.kemu as gname')
->order('create_time desc')
->select()
->toArray();
... ...