|
@@ -629,8 +629,12 @@ class Forum extends Base
|
|
|
*/
|
|
|
public function myDiscuss()
|
|
|
{
|
|
|
+ $where = [];
|
|
|
+ $where[] = ['c.user_id','=',$this->user_id];
|
|
|
+ $where[] = ['c.is_deleted','=',0];
|
|
|
+ if($title = input('title'))$where[] = ['f.title','like','%'.$title.'%'];
|
|
|
$list = ForumReplyComment::field('c.*,m.name,m.headimg,f.title,r.content reply_content')->alias('c')
|
|
|
- ->where(['c.user_id'=>$this->user_id,'c.is_deleted'=>0])
|
|
|
+ ->where($where)
|
|
|
->leftJoin('forum_reply r','c.reply_id = r.id')
|
|
|
->leftJoin('store_member m','m.id = r.user_id')
|
|
|
->leftJoin('user_forum f','f.id = c.forum_id')
|
|
@@ -756,8 +760,12 @@ class Forum extends Base
|
|
|
*/
|
|
|
public function commentOnMyReply()
|
|
|
{
|
|
|
+ $where = [];
|
|
|
+ $where[] = ['r.user_id','=',$this->user_id];
|
|
|
+ $where[] = ['r.is_deleted','=',0];
|
|
|
+ if($title = input('title'))$where[] = ['f.title','like','%'.$title.'%'];
|
|
|
$list = ForumReplyComment::field('c.*,m.name,m.headimg,f.title,r.content reply_content')->alias('c')
|
|
|
- ->where(['r.user_id'=>$this->user_id,'r.is_deleted'=>0])
|
|
|
+ ->where($where)
|
|
|
->leftJoin('forum_reply r','c.reply_id = r.id')
|
|
|
->leftJoin('store_member m','m.id = c.user_id')
|
|
|
->leftJoin('user_forum f','f.id = c.forum_id')
|