onlineUserId = $onlineUserId; $this->onlineEnterpriseId = $enterpriseId; $this->objDTemplateModule = new DTemplateModule('default'); } /** * 获取系统模板模块 * @param $selectParams * @return ResultWrapper */ public function getAll($selectParams) { $dbResult = $this->objDTemplateModule->select($selectParams,'id,templateId,title,alias,local','local ASC'); if ($dbResult === false) { return ResultWrapper::fail($this->objDTemplateModule->error(), ErrorCode::$dberror); } $total = $this->objDTemplateModule->count($selectParams); $return = [ 'data' => $dbResult, 'total' => ($total) ? intval($total) : 0, ]; return ResultWrapper::success($return); } /** * @param $selectParams * @return bool|mixed */ public function getModuleIdByAlias($selectParams) { $dbResult = $this->objDTemplateModule->get_field('id',$selectParams); if ($dbResult === false){ return 0; } return $dbResult; } }