Commit 38e149dc authored by zfc's avatar zfc Committed by hujun

经纪人列表接口

parent 5bf98bca
......@@ -97,6 +97,7 @@ class Basic extends Controller
}
}
/**
* 验证登录时效
*/
......
......@@ -297,5 +297,45 @@ public function saveList(){
return $data;
}
/**
*检查重复
*
*/
public function repetition($name,$key){
$r=$this->field($name)
->where($name,'=',$key)
->select();
//$this->getLastSql();
if($r){
return true;
}else{
return false;
}
}
//更新数据
public function saveStatus($name,$key,$ids){
$r = $this->save([$name,$key],["id",'in',$ids]);
return $r;
}
//删除数据
public function delUid($name,$ids){
$this->where($name,'in',$ids)->delete();
}
//通过ids批量添加数据
public function addAllAccess($ids,$data){
$idarr=explode($ids);
if(is_array($idarr)){
$arr=array();
foreach ($idarr as $v){
$data['uid']=$v;
$arr[]=$data;
}
$r= $this->saveAll($arr);
}else{
$data['uid']=$ids;
$r= $this->save($data);
}
return $r;
}
}
\ No newline at end of file
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 to comment