lgy 11 órája
szülő
commit
b2811a8bc6

+ 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')

+ 0 - 3
server/application/api/servies/message/MessageService.php

@@ -7,7 +7,6 @@ use app\api\servies\ZskkDefaultService;
 use app\api\validate\message\MessageValidate;
 use app\api\dao\message\MessageDao;
 use app\api\servies\common\CommonService;
-use think\facade\Db;
 use think\facade\Log;
 use think\Exception;
 
@@ -49,8 +48,6 @@ class MessageService extends ZskkDefaultService {
 
     public function unRead($token)
     {
-        Db::query("ALTER TABLE messages
-ADD COLUMN notice VARCHAR(255) DEFAULT '0'");
         try{
             $user = $this->message->getUser($token);
             $res = $this->message->unReadMessage($user['id'],$user['institution_id']);