lgy пре 13 часа
родитељ
комит
8ffff6a86b
1 измењених фајлова са 8 додато и 8 уклоњено
  1. 8 8
      server/application/api/model/message/MessageModel.php

+ 8 - 8
server/application/api/model/message/MessageModel.php

@@ -50,25 +50,25 @@ class MessageModel extends ZskkDefaultModel {
             ->where('is_read',0)
             ->where('status',0)
             ->where('type',1)
-//            ->where('notice',0)
+            ->where('notice',0)
             ->count();
         return $res;
     }
 
     public function noticeUnread($id)
     {
-//        $res  = $this
-//            ->where('doctor_id',$id)
-//            ->where('type',1)
-//            ->where('notice',0)
-//            ->update(['notice'=>1]);
-//        return $res;
+        $res  = $this
+            ->where('doctor_id',$id)
+            ->where('type',1)
+            ->where('notice',0)
+            ->update(['notice'=>1]);
+        return $res;
     }
 
     public function getAppUnread($id,$insId)
     {
         $info = $this->where('is_read',0)
-//            ->where('notice',0)
+            ->where('notice',0)
             ->where("(institution_id='$insId' and doctor_id is null) or doctor_id='$id'")
             ->field("count(*) AS count,application_id")
             ->group('application_id')