<?php
|
|
/**
|
* 模块服务类
|
*/
|
class Service_Module{
|
|
public function __construct(){
|
$this->module_model = new ModuleModel();
|
}
|
|
public function getModuleListByRoleId($role_id){
|
|
}
|
|
/**
|
* 获取所有栏目
|
* @param array $query [description]
|
* @param array $fields [description]
|
* @param array $sort [description]
|
* @param integer $limit [description]
|
* @param integer $skip [description]
|
* @return [type] [description]
|
*/
|
public function getModuleList($query=array(),$fields=array(),$sort=array(),$limit=0,$skip=0){
|
return $this->module_model->getList($query, $fields, $sort, $limit, $skip);
|
}
|
|
/**
|
* 获取栏目数量
|
* @return [type] [description]
|
*/
|
public function getModuleTotal($query=array(),$limit=0,$skip=0){
|
return $this->module_model->count($query, $limit, $skip);
|
}
|
|
/**
|
* 获取某个栏目的信息
|
* @param array $query [description]
|
* @param array $field [description]
|
* @return [type] [description]
|
*/
|
public function getModuleInfo($query = array(), $field = array()){
|
return $this->module_model->get($query, $field);
|
}
|
|
/**
|
* 添加栏目
|
* @param [type] $data [description]
|
*/
|
public function add($data){
|
return $this->module_model->add($data);
|
}
|
|
/**
|
* 修改栏目
|
* @param [type] $data [description]
|
* @param [type] $query [description]
|
* @return [type] [description]
|
*/
|
public function update($data, $query){
|
return $this->module_model->update($data, $query);
|
}
|
|
|
}
|