|
@@ -14,8 +14,10 @@ class UserComment extends Model{
|
|
|
|
|
|
public function getInfo($user, $type, $page = 0){
|
|
|
return $this->db()
|
|
|
- ->field("comment_id s, inputtime t, content c")
|
|
|
- ->where(['user_id'=>$user, "type"=>$type])
|
|
|
+ ->alias("c")
|
|
|
+ ->field("c.comment_id s, c.inputtime t, c.content c, u.nickname n")
|
|
|
+ ->join("gd_user u", "u.id = c.user_id", "LEFT")
|
|
|
+ ->where(['c.user_id'=>$user, "c.type"=>$type])
|
|
|
->page($page, config('paginate.list_rows'))
|
|
|
->order("inputtime DESC")
|
|
|
->select();
|