diff --git a/application/controllers/Api/Squirrel.php b/application/controllers/Api/Squirrel.php index 4725be6..c24ac48 100644 --- a/application/controllers/Api/Squirrel.php +++ b/application/controllers/Api/Squirrel.php @@ -182,8 +182,7 @@ class Api_SquirrelController extends Ctrl_Api{ $data['remark'] = empty($this->POST['remark'])||!isset($this->POST['remark'])?'':Tool_Fnc::safe_string($this->POST['remark']); $data['created'] = date('Y-m-d H:i:s',time()); $squirrelinfo = $this->Squirrelmodel->field("*")->where("id={$data['id']}")->fRow(); - $cageinfo = $this->CageModel->field("type")->where("id={$squirrelinfo['cage']}")->fRow(); - print_r($cageinfo);die; + $cageinfo = $this->CageModel->field("id,type")->where("id={$squirrelinfo['cage']}")->fRow(); if($cageinfo['type']==2){ if($data['sex']==1){ if((int)$this->Squirrelmodel->field("count(*) num")->where("sex=1 and cage={$cageinfo['cage']}")->fList()['num']==1) Tool_Fnc::apiMsg('该笼公鼠已上限', '500');