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

@@ -24,4 +24,41 @@
set status = #{status}, update_time = NOW()
where id = #{id}
</update>
<update id="updateStatusAndPrinter">
update print_task
<set>
status = #{status},
<if test="printerName != null and printerName != ''">
printer_name = #{printerName},
</if>
update_time = NOW()
</set>
where id = #{id}
</update>
<select id="queryPendingReviewTasks" resultType="com.ycwl.basic.model.pc.printer.entity.PrintTaskEntity">
select id, printer_id, status, printer_name, url, width, height, mp_id, paper, create_time, update_time
from print_task
where status = 4
<if test="printerId != null">
and printer_id = #{printerId}
</if>
order by create_time desc
</select>
<update id="updateTaskUrl">
update print_task
set url = #{url}, update_time = NOW()
where id = #{id} and status = 4
</update>
<update id="batchUpdateStatus">
update print_task
set status = #{status}, update_time = NOW()
where id in
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>