yangsai@163.com 6 months ago
parent 78335007d8
commit bc217b2148
  1. 2
      application/controllers/Api/Cage.php

@ -67,7 +67,7 @@ class Api_CageController extends Ctrl_Api{
public function addAction(){
//查询笼位号
$data['c_user_id'] = empty($this->POST['uid'])?Tool_Fnc::apiMsg('请先登录', '500'):$this->POST['uid'];
$CageNum = $this->Cagemodel->field('count(*) as num')->where("user_id={$data['c_user_id']}")->fRow();
$CageNum = $this->Cagemodel->field('count(*) as num')->where("c_user_id={$data['c_user_id']}")->fRow();
$CageNum = empty($CageNum)?1:(int) $CageNum['num']+1;
$data['type'] = $this->POST['type'];
$data['number'] = "NO.0000".$CageNum;

Loading…
Cancel
Save