wupengfei 2 年之前
父節點
當前提交
94634fb5a1

+ 23 - 16
.idea/workspace.xml

@@ -2,8 +2,14 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="1a36929e-c054-4875-a943-593a74e55fa4" name="Default Changelist" comment="">
+      <change afterPath="$PROJECT_DIR$/application/common/model/UserFollow.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/api/controller/Qc.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Qc.php" 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/Forum.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Forum.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/api/controller/General.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/General.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/api/controller/Recruit.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Recruit.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/api/controller/Video.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Video.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/common/model/PlatformSwitch.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/common/model/PlatformSwitch.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -121,7 +127,7 @@
   <component name="PropertiesComponent">
     <property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
     <property name="WebServerToolWindowFactoryState" value="false" />
-    <property name="last_opened_file_path" value="$PROJECT_DIR$/../xianglian_test_api" />
+    <property name="last_opened_file_path" value="$PROJECT_DIR$/application/common/model" />
     <property name="node.js.detected.package.eslint" value="true" />
     <property name="node.js.detected.package.tslint" value="true" />
     <property name="node.js.path.for.package.eslint" value="project" />
@@ -132,17 +138,17 @@
     <property name="two.files.diff.last.used.folder" value="$PROJECT_DIR$" />
   </component>
   <component name="RecentsManager">
-    <key name="MoveFile.RECENT_KEYS">
-      <recent name="D:\zs\gaoyixia\public\wx_cert" />
-      <recent name="D:\zs\gaoyixia\application\api\controller" />
-    </key>
     <key name="CopyFile.RECENT_KEYS">
+      <recent name="D:\zs\gaoyixia\application\common\model" />
       <recent name="D:\zs\gaoyixia\application\operate\view\recruit" />
       <recent name="D:\zs\gaoyixia\application\operate\view\forum" />
       <recent name="D:\zs\gaoyixia\application\common\service" />
-      <recent name="D:\zs\gaoyixia\application\common\model" />
       <recent name="D:\zs\gaoyixia\application\user\view\tag" />
     </key>
+    <key name="MoveFile.RECENT_KEYS">
+      <recent name="D:\zs\gaoyixia\public\wx_cert" />
+      <recent name="D:\zs\gaoyixia\application\api\controller" />
+    </key>
   </component>
   <component name="SvnConfiguration">
     <configuration />
@@ -208,7 +214,8 @@
       <workItem from="1671065604459" duration="7662000" />
       <workItem from="1671152221434" duration="19086000" />
       <workItem from="1672793409629" duration="408000" />
-      <workItem from="1672793834653" duration="22208000" />
+      <workItem from="1672793834653" duration="24306000" />
+      <workItem from="1672880479757" duration="18331000" />
     </task>
     <servers />
   </component>
@@ -330,18 +337,18 @@
     </option>
   </component>
   <component name="WindowStateProjectService">
-    <state x="1106" y="469" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog" timestamp="1672814876329">
+    <state x="1106" y="469" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog" timestamp="1672904726293">
       <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="1672814876329" />
+    <state x="1106" y="469" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog/0.0.2560.1400@0.0.2560.1400" timestamp="1672904726293" />
     <state x="283" y="145" width="1942" height="1088" key="DiffContextDialog" timestamp="1672820850032">
       <screen x="0" y="0" width="2560" height="1400" />
     </state>
     <state x="283" y="145" width="1942" height="1088" key="DiffContextDialog/0.0.2560.1400@0.0.2560.1400" timestamp="1672820850032" />
-    <state x="1418" y="514" key="FileChooserDialogImpl" timestamp="1672798457280">
+    <state x="1418" y="514" key="FileChooserDialogImpl" timestamp="1672902080136">
       <screen x="0" y="0" width="2560" height="1400" />
     </state>
-    <state x="1418" y="514" key="FileChooserDialogImpl/0.0.2560.1400@0.0.2560.1400" timestamp="1672798457280" />
+    <state x="1418" y="514" key="FileChooserDialogImpl/0.0.2560.1400@0.0.2560.1400" timestamp="1672902080136" />
     <state x="1051" y="472" key="MultipleFileMergeDialog" timestamp="1671416392056">
       <screen x="0" y="0" width="2560" height="1400" />
     </state>
@@ -367,14 +374,14 @@
     </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="1672810353408" />
-    <state x="1057" y="460" width="746" height="548" key="find.popup" timestamp="1672794413065">
+    <state x="1057" y="460" width="746" height="548" key="find.popup" timestamp="1672902106701">
       <screen x="0" y="0" width="2560" height="1400" />
     </state>
-    <state x="1057" y="460" width="746" height="548" key="find.popup/0.0.2560.1400@0.0.2560.1400" timestamp="1672794413065" />
-    <state x="1291" y="317" key="run.anything.popup" timestamp="1672814902106">
+    <state x="1057" y="460" width="746" height="548" key="find.popup/0.0.2560.1400@0.0.2560.1400" timestamp="1672902106701" />
+    <state x="1291" y="317" key="run.anything.popup" timestamp="1672903043103">
       <screen x="0" y="0" width="2560" height="1400" />
     </state>
-    <state x="1291" y="317" key="run.anything.popup/0.0.2560.1400@0.0.2560.1400" timestamp="1672814902106" />
+    <state x="1291" y="317" key="run.anything.popup/0.0.2560.1400@0.0.2560.1400" timestamp="1672903043103" />
     <state x="1237" y="367" width="672" height="678" key="search.everywhere.popup" timestamp="1670727204367">
       <screen x="0" y="0" width="2560" height="1400" />
     </state>

+ 45 - 0
application/api/controller/Article.php

@@ -6,6 +6,7 @@ use app\common\model\ArticleCommentLike;
 use app\common\model\ArticleIntro;
 use app\common\model\ArticleItem;
 use app\common\model\ArticleLike;
+use app\common\model\PlatformSwitch;
 use app\common\model\SeriesArticleCate;
 use app\common\model\User;
 use app\common\model\UserCollect;
@@ -1197,6 +1198,17 @@ class Article extends Base
 
 
     /**
+     * @title 以下接口为二期需求
+     * @desc  以下接口为二期需求
+     * @author  qc
+     * @url /api/Article/secondPhase
+     * @method GET
+     * @return name:1 type:string default:-- desc:以下接口为二期需求
+     */
+    public function secondPhase(){}
+
+
+    /**
      * @title 我的绑定【后台图文绑定该会员】
      * @desc 后台图文绑定该会员
      * @author qc
@@ -1234,4 +1246,37 @@ class Article extends Base
     }
 
 
+    /**
+     * @title 我的追更列表
+     * @desc 我的追更列表
+     * @author qc
+     * @method GET
+     * @url /api/Article/getFollowUpList
+     * @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:create_at type:string default:-- desc:追更设置时间
+     * @return name:article_id type:int default:-- desc:图文id
+     * @return name:title type:string default:-- desc:标题
+     */
+    public function getFollowUpList()
+    {
+        $sel_where  = [];
+        $sel_where[] = ['p.user_id','=',$this->user_id];
+        $sel_where[] = ['p.type','=',2];
+        $sel_where[] = ['p.switch_id','=',1];
+        $field = 'p.id,p.switch_id as article_id,p.create_at,a.title';
+        $list  = PlatformSwitch::field($field)
+            ->alias('p')
+            ->leftJoin('ArticleIntro a','p.switch_id = a.id')
+            ->where($sel_where)
+            ->limit($this->off_set,$this->page_num)
+            ->order('p.id desc')
+            ->select()->toArray();
+        $this->success('ok',['list'=>$list]);
+    }
+
+
+
 }

+ 15 - 0
application/api/controller/Forum.php

@@ -937,5 +937,20 @@ class Forum extends Base
     }
 
 
+    /**
+     * @title 以下接口为二期需求
+     * @desc  以下接口为二期需求
+     * @author  qc
+     * @url /api/Forum/secondPhase
+     * @method GET
+     * @return name:1 type:string default:-- desc:以下接口为二期需求
+     */
+    public function secondPhase(){}
+
+
+
+
+
+
 
 }

+ 29 - 0
application/api/controller/General.php

@@ -1,5 +1,6 @@
 <?php
 namespace app\api\controller;
+use app\common\model\PlatformSwitch;
 use app\common\model\UserSearch;
 
 /**
@@ -62,6 +63,34 @@ class General extends Base
         $this->success('删除成功');
     }
 
+    /**
+     * @title 以下接口为二期需求
+     * @desc  以下接口为二期需求
+     * @author  qc
+     * @url /api/General/secondPhase
+     * @method GET
+     * @return name:1 type:string default:-- desc:以下接口为二期需求
+     */
+    public function secondPhase(){}
+
+
+    /**
+     * @title 开关设置
+     * @desc 【追更开关】
+     * @author qc
+     * @method POST
+     * @url /api/General/switchSet
+     * @header name:Authorization require:1 desc:Token
+     * @param name:id type:int require:1 default:-- desc:记录id
+     * @param name:type type:int require:1 default:-- desc:类型【1=>'问答通知开关',2=>'视频追更',3=>'图文追更',4=>'资料追更',5=>'供应商追更',6=>'招聘追更'】
+     */
+    public function switchSet()
+    {
+        $switch_status = PlatformSwitch::userSwitch($this->user_id,input('post.id',0),input('post.type',0));
+        $switch_status ?  $this->success('开启成功',['status'=>1]) :    $this->success('关闭成功',['status'=>0]);
+    }
+
+
 
 
 

+ 47 - 0
application/api/controller/Recruit.php

@@ -1,6 +1,7 @@
 <?php
 namespace app\api\controller;
 use app\common\model\PlatformLike;
+use app\common\model\PlatformSwitch;
 use app\common\model\RecruitCate;
 use app\common\model\User;
 use app\common\model\UserCollect;
@@ -541,4 +542,50 @@ class Recruit extends Base
     }
 
 
+    /**
+     * @title 以下接口为二期需求
+     * @desc  以下接口为二期需求
+     * @author  qc
+     * @url /api/Recruit/secondPhase
+     * @method GET
+     * @return name:1 type:string default:-- desc:以下接口为二期需求
+     */
+    public function secondPhase(){}
+
+
+    /**
+     * @title 我的追更列表
+     * @desc 我的追更列表
+     * @author qc
+     * @method GET
+     * @url /api/Recruit/getFollowUpList
+     * @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:create_at type:string default:-- desc:追更设置时间
+     * @return name:recruit_id type:int default:-- desc:招聘id
+     * @return name:title type:string default:-- desc:标题
+     * @return name:company type:string default:-- desc:公司名
+     * @return name:cover type:string default:-- desc:公司logo
+     */
+    public function getFollowUpList()
+    {
+        $sel_where  = [];
+        $sel_where[] = ['p.user_id','=',$this->user_id];
+        $sel_where[] = ['p.type','=',6];
+        $sel_where[] = ['p.switch_id','=',1];
+        $field = 'p.id,p.switch_id as article_id,p.create_at,a.title,a.company,a.cover';
+        $list  = PlatformSwitch::field($field)
+            ->alias('p')
+            ->leftJoin('Recruit a','p.switch_id = a.id')
+            ->where($sel_where)
+            ->limit($this->off_set,$this->page_num)
+            ->order('p.id desc')
+            ->select()->toArray();
+        $this->success('ok',['list'=>$list]);
+    }
+
+
+
 }

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

@@ -1,5 +1,6 @@
 <?php
 namespace app\api\controller;
+use app\common\model\PlatformSwitch;
 use app\common\model\SeriesVideoCate;
 use app\common\model\User;
 use app\common\model\UserCollect;
@@ -1291,6 +1292,17 @@ class Video extends Base
     }
 
 
+    /**
+     * @title 以下接口为二期需求
+     * @desc  以下接口为二期需求
+     * @author  qc
+     * @url /api/Video/secondPhase
+     * @method GET
+     * @return name:1 type:string default:-- desc:以下接口为二期需求
+     */
+    public function secondPhase(){}
+
+
 
     /**
      * @title 我的绑定【后台视频绑定该会员】
@@ -1332,6 +1344,37 @@ class Video extends Base
     }
 
 
+    /**
+     * @title 我的追更列表
+     * @desc 我的追更列表
+     * @author qc
+     * @method GET
+     * @url /api/Video/getFollowUpList
+     * @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:create_at type:string default:-- desc:追更设置时间
+     * @return name:video_id type:int default:-- desc:视频id
+     * @return name:title type:string default:-- desc:标题
+     */
+    public function getFollowUpList()
+    {
+        $sel_where  = [];
+        $sel_where[] = ['p.user_id','=',$this->user_id];
+        $sel_where[] = ['p.type','=',2];
+        $sel_where[] = ['p.switch_id','=',1];
+        $field = 'p.id,p.switch_id as video_id,p.create_at,a.title';
+        $list  = PlatformSwitch::field($field)
+            ->alias('p')
+            ->leftJoin('VideoIntro a','p.switch_id = a.id')
+            ->where($sel_where)
+            ->limit($this->off_set,$this->page_num)
+            ->order('p.id desc')
+            ->select()->toArray();
+        $this->success('ok',['list'=>$list]);
+    }
+
 
 
 }

+ 4 - 0
application/common/model/PlatformSwitch.php

@@ -5,6 +5,10 @@ use think\Model;
 // 用户开关
 class PlatformSwitch extends Model
 {
+    static $type_desc = [
+        1=>'问答通知开关', 2=>'视频追更', 3=>'图文追更', 4=>'资料追更', 5=>'供应商追更', 6=>'招聘追更'
+    ];
+
     /**
      * 验证开关状态
      * @param $user_id

+ 10 - 0
application/common/model/UserFollow.php

@@ -0,0 +1,10 @@
+<?php
+namespace app\common\model;
+use library\tools\Data;
+use think\Model;
+// 用户追更
+class UserFollow extends Model
+{
+
+
+}