作者 xiaohu thinkpad

评价问题重构

... ... @@ -75,10 +75,12 @@ class CommentController extends UserBaseController
$yuyue_data = Db::name('yuyue')
->alias('yy')
->join('qnb_user qu','qu.id = yy .teach_id')
->field('yy.*,qu.user_nickname,qu.headimgurl,qu.kemu')
->field('yy.*,qu.user_nickname,qu.headimgurl')
->where(['yy.id'=>$id])
->find();
$teach_id = $yuyue_data['teach_id'];
$kemu = Db::name('user')->where(['id'=>$yuyue_data['uid']])->value('kemu');
$yuyue_data['kemu'] = $kemu;
//获取标签
$rre = Db::name('commente')->where(['teach_id'=>$teach_id])->find();
$rree = Db::name('commente_tag')->where(['id'=>['in',$rre['comment_tag']]])->field('name')->select()->toArray();
... ...