feat(printer): add print task review and reprint functionality

- Add reprint endpoint with printer name update
- Implement pending review task query and management
- Add task URL update for pending review tasks
- Support bulk approve/reject of pending tasks
- Extend task status enum with review-related states
- Create ReprintRequest DTO for printer information
- Update mapper to handle status transitions and queries
- Modify service layer to support review workflow
- Adjust XML mapper for new database operations
This commit is contained in:
2025-11-15 14:05:37 +08:00
parent 6246d6ef46
commit 9b9e69cf52
7 changed files with 230 additions and 9 deletions

View File

@@ -14,4 +14,36 @@ public interface PrintTaskMapper extends BaseMapper<PrintTaskEntity> {
List<PrintTaskEntity> queryByCondition(@Param("printerId") Integer printerId, @Param("status") Integer status);
int updateStatus(@Param("id") Integer id, @Param("status") Integer status);
/**
* 更新任务状态和打印机名称
* @param id 任务ID
* @param status 新状态
* @param printerName 打印机名称
* @return 更新行数
*/
int updateStatusAndPrinter(@Param("id") Integer id, @Param("status") Integer status, @Param("printerName") String printerName);
/**
* 查询待审核的打印任务
* @param printerId 打印机ID(可选)
* @return 待审核任务列表
*/
List<PrintTaskEntity> queryPendingReviewTasks(@Param("printerId") Integer printerId);
/**
* 更新任务URL
* @param id 任务ID
* @param url 新的打印URL
* @return 更新行数
*/
int updateTaskUrl(@Param("id") Integer id, @Param("url") String url);
/**
* 批量更新任务状态
* @param ids 任务ID列表
* @param status 新状态
* @return 更新行数
*/
int batchUpdateStatus(@Param("ids") List<Integer> ids, @Param("status") Integer status);
}