chuweiqiang 1 år sedan
förälder
incheckning
7b37b049c6
2 ändrade filer med 3 tillägg och 3 borttagningar
  1. 1 1
      .idea/workspace.xml
  2. 2 2
      application/api/controller/Activity.php

+ 1 - 1
.idea/workspace.xml

@@ -476,7 +476,7 @@
       <workItem from="1700181113672" duration="598000" />
       <workItem from="1700191602612" duration="3899000" />
       <workItem from="1700267230720" duration="19260000" />
-      <workItem from="1700440204810" duration="2631000" />
+      <workItem from="1700440204810" duration="2941000" />
     </task>
     <servers />
   </component>

+ 2 - 2
application/api/controller/Activity.php

@@ -991,7 +991,7 @@ class Activity extends Base
     {
         $order_num = 0;
         $apply_num = 0;
-        $message_num = UserMessage::where(['m.user_id'=>$this->user_id,'m.is_deleted'=>0,'m.module'=>'activity','is_read'=>0])->alias('m')->count();
+        $message_num = UserMessage::where(['m.user_id'=>$this->user_id,'m.is_deleted'=>0,'is_read'=>0])->where('m.module','in','activity,apply')->alias('m')->count();
         $total_num = $message_num;
         $this->success('ok',compact(['order_num','apply_num','message_num','total_num']));
     }
@@ -1618,7 +1618,7 @@ class Activity extends Base
     {
         $id = input('post.id');
         $where[] = ['user_id','=',$this->user_id];
-        $where[] = ['module','=','activity'];
+        $where[] = ['module','in','activity,apply'];
         if($id) $where[] = ['id','in',$id];
         UserMessage::where($where)->update(['is_read'=>input('post.is_read')]);
         $this->success('消息变更成功');