Commit a74a4919 by 杨树贤

修复升级版本后的兼容问题

parent 9604c3f1
Showing with 2 additions and 2 deletions
......@@ -16,7 +16,7 @@ class UnitModel extends Model
$Find=$Redis->hget('Self_Unit',$UnitID);
if(!$Find){
if(empty($this->connection)) $this->connection='self';
$list=$this->lists('unit_name','unit_id')->toArray();
$list=$this->pluck('unit_name','unit_id')->toArray();
$Redis->hmset('Self_Unit',$list);
return empty($list[$UnitID])? '':$list[$UnitID];
}else{
......@@ -30,7 +30,7 @@ class UnitModel extends Model
$Find=$Redis->hget('Self_UnitAlias',$UnitID);
if(!$Find){
if(empty($this->connection)) $this->connection='self';
$list=$this->lists('unit_name_alias','unit_id')->toArray();
$list=$this->pluck('unit_name_alias','unit_id')->toArray();
$Redis->hmset('Self_UnitAlias',$list);
return empty($list[$UnitID])? '':$list[$UnitID];
}else{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment