package com.ycwl.basic.mapper;

import com.ycwl.basic.model.pc.printer.entity.PrintTaskEntity;
import com.ycwl.basic.model.pc.printer.entity.PrinterEntity;
import com.ycwl.basic.model.printer.resp.PrintTaskResp;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface PrinterMapper {
    List<PrinterEntity> list(@Param("condition") PrinterEntity condition);
    
    PrinterEntity getById(@Param("id") Integer id);

    int add(PrinterEntity entity);

    int update(PrinterEntity entity);

    int deleteById(@Param("id") Integer id);

    PrinterEntity findByAccessKey(String accessKey);

    PrintTaskResp findTaskByPrinterId(Integer printerId);

    int updateTaskStatus(@Param("id") Integer id, @Param("status") Integer status);

    PrintTaskEntity getTaskById(Integer id);
}