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