package com.hw.system.common.mapper;

import com.hw.system.api.domain.common.WfProcessActivity;
import com.hw.system.api.domain.common.WfProcessActivityAuth;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 工单流程节点步骤Mapper接口
 *
 * @author xins
 * @date 2024-01-19
 */
public interface WfProcessActivityMapper
{
    /**
     * 查询工单流程节点步骤
     *
     * @param processActivityId 工单流程节点步骤主键
     * @return 工单流程节点步骤
     */
    public WfProcessActivity selectWfProcessActivityByProcessActivityId(Long processActivityId);

    /**
     * 查询工单流程节点步骤列表
     *
     * @param wfProcessActivity 工单流程节点步骤
     * @return 工单流程节点步骤集合
     */
    public List<WfProcessActivity> selectWfProcessActivityList(WfProcessActivity wfProcessActivity);

    /**
     * 新增工单流程节点步骤
     *
     * @param wfProcessActivity 工单流程节点步骤
     * @return 结果
     */
    public int insertWfProcessActivity(WfProcessActivity wfProcessActivity);

    /**
     * 修改工单流程节点步骤
     *
     * @param wfProcessActivity 工单流程节点步骤
     * @return 结果
     */
    public int updateWfProcessActivity(WfProcessActivity wfProcessActivity);

    /**
     * 删除工单流程节点步骤
     *
     * @param processActivityId 工单流程节点步骤主键
     * @return 结果
     */
    public int deleteWfProcessActivityByProcessActivityId(Long processActivityId);

    /**
     * 批量删除工单流程节点步骤
     *
     * @param processActivityIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteWfProcessActivityByProcessActivityIds(Long[] processActivityIds);

    /**
     * 批量删除工单流程节点步骤权限
     *
     * @param processActivityIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteWfProcessActivityAuthByProcessActivityIds(Long[] processActivityIds);

    /**
     * 批量新增工单流程节点步骤权限
     *
     * @param wfProcessActivityAuthList 工单流程节点步骤权限列表
     * @return 结果
     */
    public int batchWfProcessActivityAuth(List<WfProcessActivityAuth> wfProcessActivityAuthList);


    /**
     * 通过工单流程节点步骤主键删除工单流程节点步骤权限信息
     *
     * @param processActivityId 工单流程节点步骤ID
     * @return 结果
     */
    public int deleteWfProcessActivityAuthByProcessActivityId(Long processActivityId);

    Long selectProcessActivityIdByWfProcessId(Long wfProcessId);


    /**
     * 查询工单流程节点步骤
     *
     * @param wfProcessId 工单流程主键
     * @param processActivityOrder 顺序
     * @return 工单流程节点步骤
     */
    public WfProcessActivity selectWfProcessActivityByUI(@Param("wfProcessId") Long wfProcessId,
                                                         @Param("processActivityOrder") Long processActivityOrder);

}
