|
|
@ -73,13 +73,22 @@ class SquirrelModel extends Orm_Base{ |
|
|
|
} |
|
|
|
} |
|
|
|
return $data; |
|
|
|
return $data; |
|
|
|
} |
|
|
|
} |
|
|
|
public function getOneInfo($cage){ |
|
|
|
public function getOneInfo($squirrel){ |
|
|
|
return $this->field('*')->where("id={$cage}")->fRow(); |
|
|
|
return $this->field('id,number,sex,birthday,father,mother,strains_id as strains,gene,hair_color,cage,remark')->where("id={$squirrel}")->fRow(); |
|
|
|
} |
|
|
|
} |
|
|
|
public function partent($params){ |
|
|
|
public function partent(){ |
|
|
|
$time = date('Y-m-d',time()); |
|
|
|
$time = date('Y-m-d',time()); |
|
|
|
$data=$this->field('id,number,sex')->where("is_delete=0 and is_kill=0 and grow_time<'{$time}'")->fList(); |
|
|
|
$data=$this->field('id,number,sex')->where("is_delete=0 and is_kill=0 and grow_time<'{$time}'")->fList(); |
|
|
|
return $data; |
|
|
|
return $data; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public function getIcon($squirrel){ |
|
|
|
|
|
|
|
$date = strtotime(date('Y-m-d',time())); |
|
|
|
|
|
|
|
$info = $this->field('nusring_time')->where("id={$squirrel}")->fRow(); |
|
|
|
|
|
|
|
if(strotime($info['nusring_time'])>$date){ |
|
|
|
|
|
|
|
$data['icon'] = Yaf_Registry::get("config")->psd->default->appsecret; |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|