作者 lianghiu
@@ -137,6 +137,7 @@ class CommentController extends AdminBaseController @@ -137,6 +137,7 @@ class CommentController extends AdminBaseController
137 $list = DB::name($this->table_name) 137 $list = DB::name($this->table_name)
138 ->alias('c') 138 ->alias('c')
139 ->join('qnb_user u','u.id=c.teach_id') 139 ->join('qnb_user u','u.id=c.teach_id')
  140 + ->order('create_time desc')
140 ->field('c.*') 141 ->field('c.*')
141 ->where($where) 142 ->where($where)
142 ->paginate(15); 143 ->paginate(15);
@@ -175,6 +176,7 @@ class CommentController extends AdminBaseController @@ -175,6 +176,7 @@ class CommentController extends AdminBaseController
175 ->alias('c') 176 ->alias('c')
176 ->join('qnb_user u','u.id=c.uid') 177 ->join('qnb_user u','u.id=c.uid')
177 ->field('c.*') 178 ->field('c.*')
  179 + ->order('create_time desc')
178 ->where(['c.delete_time'=>0]) 180 ->where(['c.delete_time'=>0])
179 ->paginate(15); 181 ->paginate(15);
180 182
@@ -95,7 +95,7 @@ class YuyueController extends UserBaseController @@ -95,7 +95,7 @@ class YuyueController extends UserBaseController
95 $rre = Db::name('commente') 95 $rre = Db::name('commente')
96 ->alias('c') 96 ->alias('c')
97 ->join('qnb_user u', 'u.id = c.uid') 97 ->join('qnb_user u', 'u.id = c.uid')
98 - ->where(['teach_id' => $id]) 98 + ->where(['teach_id' => $id,'comment'=>['neq','']])
99 ->field('c.*,u.user_nickname') 99 ->field('c.*,u.user_nickname')
100 ->select() 100 ->select()
101 ->toarray(); 101 ->toarray();
@@ -220,7 +220,7 @@ class YuyueController extends UserBaseController @@ -220,7 +220,7 @@ class YuyueController extends UserBaseController
220 $rre = Db::name('commente') 220 $rre = Db::name('commente')
221 ->alias('c') 221 ->alias('c')
222 ->join('qnb_user u', 'u.id = c.uid') 222 ->join('qnb_user u', 'u.id = c.uid')
223 - ->where(['teach_id' => $id]) 223 + ->where(['teach_id' => $id,'comment'=>['neq','']])
224 ->field('c.*,u.user_nickname') 224 ->field('c.*,u.user_nickname')
225 ->select() 225 ->select()
226 ->toarray(); 226 ->toarray();
@@ -155,7 +155,6 @@ @@ -155,7 +155,6 @@
155 <noempty name="pcdata"> 155 <noempty name="pcdata">
156 <option value='{$pcdata.id}' checked>{$pcdata.user_nickname}</option> 156 <option value='{$pcdata.id}' checked>{$pcdata.user_nickname}</option>
157 </noempty> 157 </noempty>
158 - <option value='-1'>全部</option>  
159 <foreach name="cdata" id="vo"> 158 <foreach name="cdata" id="vo">
160 <option value='{$vo.id}'>{$vo.user_nickname}</option> 159 <option value='{$vo.id}'>{$vo.user_nickname}</option>
161 </foreach> 160 </foreach>