增加文件服务接口配置
This commit is contained in:
15
src/FileService/ExcelParseInterface.php
Normal file
15
src/FileService/ExcelParseInterface.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* JsonRpc服务接口
|
||||
*/
|
||||
|
||||
namespace Dhd\Micro\Interface\FileService;
|
||||
|
||||
interface ExcelParseInterface
|
||||
{
|
||||
/**
|
||||
* 解析文件
|
||||
*/
|
||||
public function excelParse(array $header, string $highestColumn, int $fileId, int $page = 1, int $limit = 1000): array;
|
||||
}
|
||||
13
src/FileService/FileService.php
Normal file
13
src/FileService/FileService.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 文件服务
|
||||
*/
|
||||
|
||||
namespace Dhd\Micro\Interface\FileService;
|
||||
|
||||
interface FileService extends
|
||||
FileServiceInterface,
|
||||
QuestionParseInterface,
|
||||
QuestionQrCodeInterface,
|
||||
ExcelParseInterface {}
|
||||
30
src/FileService/FileServiceInterface.php
Normal file
30
src/FileService/FileServiceInterface.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* JsonRpc服务接口
|
||||
*/
|
||||
|
||||
namespace Dhd\Micro\Interface\FileService;
|
||||
|
||||
interface FileServiceInterface
|
||||
{
|
||||
/**
|
||||
* 获取文件分组列表
|
||||
*/
|
||||
public function getFileGroupList(): array;
|
||||
|
||||
/**
|
||||
* 添加/编辑文件分组
|
||||
*/
|
||||
public function editFileGroup(int $groupId, int $pid, string $groupName): array;
|
||||
|
||||
/**
|
||||
* 删除文件分组
|
||||
*/
|
||||
public function deleteFileGroup(int $groupId): array;
|
||||
|
||||
/**
|
||||
* 获取文件列表
|
||||
*/
|
||||
public function getFileList(array $params): array;
|
||||
}
|
||||
25
src/FileService/QuestionParseInterface.php
Normal file
25
src/FileService/QuestionParseInterface.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* JsonRpc服务接口
|
||||
*/
|
||||
|
||||
namespace Dhd\Micro\Interface\FileService;
|
||||
|
||||
interface QuestionParseInterface
|
||||
{
|
||||
/**
|
||||
* 解析文件
|
||||
*/
|
||||
public function questionWordParse(int $fileId): array;
|
||||
|
||||
/**
|
||||
* 根据code确认导入题目,设置submit_save为1,且移动图片到$this->imageDir目录,变更图片路径
|
||||
*/
|
||||
public function submitSaveByCode(string $code): array;
|
||||
|
||||
/**
|
||||
* 读取解析暂存数据,不确认导入且不移动图片。
|
||||
*/
|
||||
public function getQuestionParseByCode(string $code): array;
|
||||
}
|
||||
19
src/FileService/QuestionQrCodeInterface.php
Normal file
19
src/FileService/QuestionQrCodeInterface.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* JsonRpc服务接口
|
||||
*/
|
||||
|
||||
namespace Dhd\Micro\Interface\FileService;
|
||||
|
||||
interface QuestionQrCodeInterface
|
||||
{
|
||||
/**
|
||||
* 生成题目、试卷二维码
|
||||
* @param int $type 二维码类型
|
||||
* @param int $id 记录ID
|
||||
* @param array $data 额外参数
|
||||
* @return array
|
||||
*/
|
||||
public function createQuestionQr(int $type, int $id, array $data): array;
|
||||
}
|
||||
Reference in New Issue
Block a user