|
|
|
@ -94,7 +94,7 @@ class SquirrelModel extends Orm_Base{ |
|
|
|
|
$cageinfo = $CageModel->field("type")->where("id={$cage}")->fRow(); |
|
|
|
|
if($cageinfo['type']==2) { |
|
|
|
|
$data = []; |
|
|
|
|
$n = $this->field('id,number,sex')->where("is_delete=0 and is_kill=0 and grow_time<'{$time}' and sex=1 and cage={$cage}")->fList(); |
|
|
|
|
$n[] = $this->field('id,number,sex')->where("is_delete=0 and is_kill=0 and grow_time<'{$time}' and sex=1 and cage={$cage}")->fRow(); |
|
|
|
|
$m = $this->field('id,number,sex')->where("is_delete=0 and is_kill=0 and grow_time<'{$time}' and sex=2 and cage={$cage}")->fList(); |
|
|
|
|
$data=array_merge(empty($n)?['id'=>0,'number'=>"未知",'sex'=>1]:$n,empty($m)?['id'=>0,'number'=>"未知",'sex'=>2]:$m); |
|
|
|
|
} |
|
|
|
|