wupengfei %!s(int64=2) %!d(string=hai) anos
pai
achega
05410b2751
Modificáronse 2 ficheiros con 60 adicións e 4 borrados
  1. 3 4
      .idea/workspace.xml
  2. 57 0
      application/api/controller/Video.php

+ 3 - 4
.idea/workspace.xml

@@ -3,7 +3,6 @@
   <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/api/controller/Article.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Article.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/application/api/controller/Video.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Video.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
@@ -221,7 +220,7 @@
       <workItem from="1664498426748" duration="13957000" />
       <workItem from="1665189429149" duration="5358000" />
       <workItem from="1665206979508" duration="7749000" />
-      <workItem from="1665276346161" duration="15120000" />
+      <workItem from="1665276346161" duration="16775000" />
     </task>
     <servers />
   </component>
@@ -247,10 +246,10 @@
       <screen x="0" y="0" width="2560" height="1400" />
     </state>
     <state x="1175" y="519" key="#com.intellij.fileTypes.FileTypeChooser/0.0.2560.1400@0.0.2560.1400" timestamp="1659079177590" />
-    <state x="1106" y="469" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog" timestamp="1665215352328">
+    <state x="1106" y="469" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog" timestamp="1665304441627">
       <screen x="0" y="0" width="2560" height="1400" />
     </state>
-    <state x="1106" y="469" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog/0.0.2560.1400@0.0.2560.1400" timestamp="1665215352328" />
+    <state x="1106" y="469" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog/0.0.2560.1400@0.0.2560.1400" timestamp="1665304441627" />
     <state x="283" y="145" width="1942" height="1088" key="DiffContextDialog" timestamp="1665216465958">
       <screen x="0" y="0" width="2560" height="1400" />
     </state>

+ 57 - 0
application/api/controller/Video.php

@@ -805,6 +805,7 @@ class Video extends Base
      * @return name:url_id type:string default:-- desc:url_id
      * @return name:cover type:string default:-- desc:封面
      * @return name:time type:string default:-- desc:时间
+     * @return name:ali_vid:string default:-- desc:云点播id
      */
     public function getLearnHistory()
     {
@@ -827,4 +828,60 @@ class Video extends Base
     }
 
 
+    /**
+     * @title 回复我的【回复我的--回复过我的评论】
+     * @desc 回复我的
+     * @author qc
+     * @method GET
+     * @url /api/Video/getReplayComment
+     * @header name:Authorization require:1 desc:Token
+     * @param  name:title type:string default:-- desc:标题
+     * @param  name:page type:int default:0 desc:页数
+     * @param  name:page_num type:int default:20 desc:每页数
+     * @return name:title type:string default:-- desc:标题
+     * @return name:video_id type:string default:-- desc:视频id
+     * @return name:url_id type:string default:-- desc:url_id
+     * @return name:cover type:string default:-- desc:封面
+     * @return name:create_at type:string default:-- desc:时间
+     * @return name:user_name type:string default:-- desc:用户名【其他会员】
+     * @return name:headimg type:string default:-- desc:用户头【其他会员】
+     * @return name:parent_comment type:array default:-- desc:你的评论内容【别人回复的那个评论】
+     * @return name:parent_comment.content type:string default:-- desc:内容
+     * @return name:parent_comment.name type:string default:-- desc:会员名称
+     * @return name:parent_comment.title type:string default:-- desc:图文标题
+     * @return name:parent_comment.video_id type:string default:-- desc:视频id
+     * @return name:parent_comment.url_id type:string default:-- desc:url_id
+     */
+    public function getReplayComment()
+    {
+        $all_comment = VideoComment::where(['user_id'=>$this->user_id,'is_deleted'=>0])->column('id');
+        if(empty($all_comment)) $this->success('ok',['list'=>null]);
+        $sel_where  = [];
+        $title = input('get.title');
+        if($title)  $sel_where[]  = ['i.title','like','%'.$title.'%'];
+        $sel_where[]  = ['t.is_deleted','=',0];
+        $sel_where[]  = ['t.lev','=',2];
+        $sel_where[]  = ['t.user_id','<>',$this->user_id];
+        $sel_where[]  = ['t.pid','in',implode(',',$all_comment)];
+        $list = VideoComment::where($sel_where)
+            ->alias('t')
+            ->field('t.id,t.create_at,t.lev,t.content,t.pid,u.name user_name,u.headimg')
+            ->leftJoin('store_member u','t.user_id = u.id')
+            ->leftJoin('VideoUrl i','t.url_id = i.id')
+            ->order('t.id desc')
+            ->limit($this->off_set,$this->page_num)
+            ->select()->toArray();
+        foreach ($list as &$v) {
+            $parent_comment = VideoComment::where([['t.id','=',$v['pid']]])
+                ->field('t.id,t.video_id,t.url_id,t.content,i.title,i.cover,t.pid,u.name')
+                ->alias('t')
+                ->leftJoin('store_member i','t.url_id = i.id')
+                ->leftJoin('store_member u','t.user_id = u.id')
+                ->find()->toArray();
+            $v['parent_comment'] = $parent_comment;
+        }
+        $this->success('ok',['list'=>$list]);
+    }
+
+
 }