You've already forked FrameTour-BE
- 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
50 lines
1.5 KiB
Java
50 lines
1.5 KiB
Java
package com.ycwl.basic.mapper;
|
|
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
import com.ycwl.basic.model.pc.printer.entity.PrintTaskEntity;
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
|
import java.util.List;
|
|
|
|
@Mapper
|
|
public interface PrintTaskMapper extends BaseMapper<PrintTaskEntity> {
|
|
int insertTask(PrintTaskEntity entity);
|
|
|
|
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);
|
|
}
|