lvhao 20 tuntia sitten
vanhempi
commit
a20d9b3829
1 muutettua tiedostoa jossa 7 lisäystä ja 16 poistoa
  1. 7 16
      core/CoreApp/models/Model_check.php

+ 7 - 16
core/CoreApp/models/Model_check.php

@@ -41,26 +41,17 @@ class Model_check extends Lin_Model
 		if(empty($check_name) || empty($check_address)){
 			return false;
 		}
-		$info =  $this->find("(check_name = '".$check_name."') or (check_address like '%".$check_address."%')","*",'addtime DESC');	
-
-		echo "<pre>";
-		var_dump($check_name);
-		var_dump($check_address);
-		var_dump($info);
-		if(empty($info)){
+		$limit_time = time() - 72*60*60;
+		$info =  $this->find("(addtime >=  ".$limit_time.") and ((check_name = '".$check_name."') or (check_address like '%".$check_address."%'))","*",'addtime DESC');	
+		if(empty($list_info)){
 
 		}else{
-			var_dump(time());
-			var_dump($info['addtime']);
-			var_dump($info['zx_hours']*60*60);
-			var_dump((time() - $info['addtime'] ));
-			if((time() - $info['addtime'] ) < $info['zx_hours']*60*60 ){
-				if($info['number'] == $number){
-					return true;
-				}
-				return false;
+			if($info['number'] == $number){
+				return true;
 			}
+			return false;
 		}
+
 		return true;
 		$this->insert([
 			'check_address' => $check_address,