一。先在model中写方法
public function delD($conditions)
{
$where['conditions'] = $conditions;
$mogowhere = new EMongoCriteria($where);
return $this->deleteAll($mogowhere);
}
二、server中调用该方法
public static function delMyCustomModel($where){
$model = new DiyUserModule;
$result = $model->delD($where);
return $result;
}
三、control中调用sever方法
$where = array('userid' => array('==' => $this->_userid));
$rs = DiyServer::delMyCustomModel($where);