wupengfei 2 年之前
父节点
当前提交
615ea42405
共有 2 个文件被更改,包括 10 次插入6 次删除
  1. 4 4
      .idea/workspace.xml
  2. 6 2
      application/api/controller/Expedite.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/api/controller/UserCenter.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/UserCenter.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/api/controller/Expedite.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Expedite.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -202,7 +202,7 @@
       <workItem from="1670547445908" duration="12147000" />
       <workItem from="1670633686675" duration="15717000" />
       <workItem from="1670719843429" duration="8446000" />
-      <workItem from="1670807412269" duration="3368000" />
+      <workItem from="1670807412269" duration="3776000" />
     </task>
     <servers />
   </component>
@@ -272,10 +272,10 @@
     </option>
   </component>
   <component name="WindowStateProjectService">
-    <state x="1106" y="469" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog" timestamp="1670729467852">
+    <state x="1106" y="469" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog" timestamp="1670812298380">
       <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="1670729467852" />
+    <state x="1106" y="469" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog/0.0.2560.1400@0.0.2560.1400" timestamp="1670812298380" />
     <state x="283" y="145" width="1942" height="1088" key="DiffContextDialog" timestamp="1670291222413">
       <screen x="0" y="0" width="2560" height="1400" />
     </state>

+ 6 - 2
application/api/controller/Expedite.php

@@ -23,6 +23,7 @@ use app\common\model\User;
 use app\common\model\UserCollect;
 use app\common\model\UserForum;
 use app\common\model\UserLevel;
+use app\common\model\UserMessage;
 use app\common\model\UserSearch;
 use app\common\model\VideoUrl;
 use Dm\Request\V20151123 as Dm;
@@ -785,6 +786,7 @@ class Expedite extends Base
      * @return name:press_num type:int default:-- desc:新闻
      * @return name:demand_num type:int default:-- desc:需求
      * @return name:forum_num type:int default:-- desc:问答
+     * @return name:sys_num type:int default:-- desc:系统消息
      * @return name:total_num type:int default:-- desc:总计
      */
     public function getTotalMarkNum()
@@ -835,8 +837,10 @@ class Expedite extends Base
             ->count();
         $forum_num = $answer_num+$forum_reply_num+$forum_comment_num;
 
-        $total_num = $video_num + $article_num + $press_num + $demand_num + $forum_num;
-        $this->success('ok',compact(['video_num','article_num','press_num','demand_num','forum_num','total_num']));
+        $sys_num =  UserMessage::where(['user_id'=>$this->user_id])->where('is_read',0)->count();
+
+        $total_num = $video_num + $article_num + $press_num + $demand_num + $forum_num + $sys_num;
+        $this->success('ok',compact(['video_num','article_num','press_num','demand_num','forum_num','sys_num','total_num']));
     }