wupengfei 2 years ago
parent
commit
bbdf2feff2
2 changed files with 14 additions and 6 deletions
  1. 4 4
      .idea/workspace.xml
  2. 10 2
      application/api/controller/Forum.php

+ 4 - 4
.idea/workspace.xml

@@ -3,7 +3,7 @@
   <component name="ChangeListManager">
     <list default="true" id="1a36929e-c054-4875-a943-593a74e55fa4" name="Default Changelist" comment="">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/user/controller/Member.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/user/controller/Member.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/api/controller/Forum.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Forum.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -208,7 +208,7 @@
       <workItem from="1671065604459" duration="7662000" />
       <workItem from="1671152221434" duration="19086000" />
       <workItem from="1672793409629" duration="408000" />
-      <workItem from="1672793834653" duration="9566000" />
+      <workItem from="1672793834653" duration="11129000" />
     </task>
     <servers />
   </component>
@@ -362,11 +362,11 @@
       <screen x="0" y="0" width="2560" height="1400" />
     </state>
     <state x="533" y="290" key="com.intellij.ide.util.TipDialog/0.0.2560.1400@0.0.2560.1400" timestamp="1672793838147" />
-    <state x="1166" y="605" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2" timestamp="1672714043286">
+    <state x="1166" y="605" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2" timestamp="1672810353408">
       <screen x="0" y="0" width="2560" height="1400" />
     </state>
     <state x="875" y="449" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2/0.0.1920.1040@0.0.1920.1040" timestamp="1665835639346" />
-    <state x="1166" y="605" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2/0.0.2560.1400@0.0.2560.1400" timestamp="1672714043286" />
+    <state x="1166" y="605" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2/0.0.2560.1400@0.0.2560.1400" timestamp="1672810353408" />
     <state x="1057" y="460" width="746" height="548" key="find.popup" timestamp="1672794413065">
       <screen x="0" y="0" width="2560" height="1400" />
     </state>

+ 10 - 2
application/api/controller/Forum.php

@@ -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')