package org.xyzh.workcase.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.xyzh.api.workcase.dto.TbWorkcaseProcessDTO;
import org.xyzh.common.core.page.PageParam;

/**
 * @description    工单过程数据访问层
 * @filename    TbWorkcaseProcessMapper.java
 * @author    yslg
 * @copyright xyzh
 * @since 2025-12-18
 */
@Mapper
public interface TbWorkcaseProcessMapper {

    /**
     * 插入工单过程
     */
    int insertWorkcaseProcess(TbWorkcaseProcessDTO process);

    /**
     * 更新工单过程（只更新非null字段）
     */
    int updateWorkcaseProcess(TbWorkcaseProcessDTO process);

    /**
     * 删除工单过程
     */
    int deleteWorkcaseProcess(@Param("processId") String processId);

    /**
     * 根据ID查询工单过程
     */
    TbWorkcaseProcessDTO selectWorkcaseProcessById(@Param("processId") String processId);

    /**
     * 查询工单过程列表
     */
    List<TbWorkcaseProcessDTO> selectWorkcaseProcessList(@Param("filter") TbWorkcaseProcessDTO filter);

    /**
     * 分页查询工单过程
     */
    List<TbWorkcaseProcessDTO> selectWorkcaseProcessPage(@Param("filter") TbWorkcaseProcessDTO filter, @Param("pageParam") PageParam pageParam);

    /**
     * 统计工单过程数量
     */
    long countWorkcaseProcesses(@Param("filter") TbWorkcaseProcessDTO filter);

}
