ShuanghongS 7 달 전
부모
커밋
3638a19e16
1개의 변경된 파일13개의 추가작업 그리고 1개의 파일을 삭제
  1. 13 1
      service/tools.class.php

+ 13 - 1
service/tools.class.php

@@ -569,7 +569,19 @@ class tools {
             if ($read_type == "true"){
                 $rs = common::excuteUpdateSql("update public.kln_notifiation_info set is_send_message = now(),readed_date = now() where lower(user_login) = '".strtolower(_getLoginName())."'");
             }else{
-                $more_param = common::getInNotInSqlForSearch(strtolower(utils::implode(';',$id)));
+                //处理一下前端提交的不正确参数
+                $param_id = array();
+                foreach($id as $_ids){
+                    if(!empty($_ids)){
+                        $param_id[] = $_ids;
+                    }
+                }
+                if(empty($param_id)){
+                    //为空直接返回成功
+                    $returnData = array("msg" =>"Success");
+                    common::echo_json_encode(200,$returnData);
+                }
+                $more_param = common::getInNotInSqlForSearch(strtolower(utils::implode(';',$param_id)));
                 $markReadSql = "update public.kln_notifiation_info set is_send_message = now(),readed_date = now() where id in ($more_param)";
                 $rs = common::excuteUpdateSql($markReadSql);
             }