yangsai@163.com 6 months ago
parent ea680129c8
commit 5ca5b6e350
  1. 3
      application/models/Squirrel.php

@ -34,12 +34,13 @@ class SquirrelModel extends Orm_Base{
);
public $pk = 'id';
public function getModelList($params){
$sex = array("1"=>"雄","2"=>"雌","0"=>"其他");
$cageModel = new CageModel();
$NewSquirrel = new NewSquirrelModel();
//获取仓鼠信息
$data['slist']=$this->field('id,number,sex,birthday,father,mother,strains_id as strains,gene,hair_color,cage,remark')->where("is_delete=0 and type=1 and is_kill=0 {$params['where']}")->fList();
foreach($data['slist'] as $key => &$val){
$val['sex'] = $val['sex']==1?'雄':'雌';
$val['sex'] = $sex[$val['sex']];
//获取笼位号
$val['cage'] =$cageModel->getOneInfo($val['cage'])['number'];
$val['icon'] = $this->getIcon($val['id'])['icon'];

Loading…
Cancel
Save