From c8ea6a5a080c98ed6d1cd29a8238a72de18bb1c3 Mon Sep 17 00:00:00 2001 From: "yangsai@163.com" <2624183217@qq.com> Date: Wed, 22 May 2024 11:16:05 +0800 Subject: [PATCH] YS --- application/controllers/Api/Sysset.php | 2 +- application/models/Cage.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/controllers/Api/Sysset.php b/application/controllers/Api/Sysset.php index 1433917..cc68f8d 100644 --- a/application/controllers/Api/Sysset.php +++ b/application/controllers/Api/Sysset.php @@ -54,7 +54,7 @@ class Api_SyssetController extends Ctrl_Api{ $data = $UserModel->field("*")->where("id={$uid}")->fRow(); //获取笼位数量 $Cagemodel = new CageModel(); - $CageNum = $Cagemodel->field('count(*) as num')->where("user_id={$uid}")->fRow(); + $CageNum = $Cagemodel->field('count(*) as num')->where("c_user_id={$uid}")->fRow(); $data['cage_num'] = $CageNum['num']; unset($data['password']); Tool_Fnc::apiMsg('获取成功', '200',$data); diff --git a/application/models/Cage.php b/application/models/Cage.php index 9f2f324..06e89b1 100644 --- a/application/models/Cage.php +++ b/application/models/Cage.php @@ -19,7 +19,7 @@ class CageModel extends Orm_Base{ //查询当前笼位一行显示几个 $cagemodel = new CageSetModel(); $shownum = $cagemodel->field('line_num')->where("c_user_id='{$params['uid']}'")->fRow(); - $limmit = empty($shownum['line_num'])?20:$shownum['line_num']*5; + $limmit = empty($shownum['line_num'])?20:$shownum['line_num']*4; $sql = "select id,number,color,strains,type from cage where c_user_id={$params['uid']}"; if(!empty($params['keyword'])){ $sql .=" where number like '%{$params['keyword']}%'";