From ff2daca1510c4f242eb1569e9190328873a3363a Mon Sep 17 00:00:00 2001 From: "yangsai@163.com" <2624183217@qq.com> Date: Tue, 28 May 2024 11:58:34 +0800 Subject: [PATCH] ys --- application/controllers/Api/Squirrel.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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');