package cn.quantgroup.third.customer.repo;

import cn.quantgroup.third.customer.entity.WorkflowProcessInstanceTaskAssignee;
import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

public interface WorkflowProcessInstanceTaskAssigneeRepo extends JpaRepository<WorkflowProcessInstanceTaskAssignee, Long> , JpaSpecificationExecutor<WorkflowProcessInstanceTaskAssignee> {


  @Query(value = "select * from lhpds_workflow_process_instance_task_assignee where process_instance_id IN :processInstanceIds and task_state='未处理' and state=0", nativeQuery = true)
  List<WorkflowProcessInstanceTaskAssignee> getByInstanceIds(@Param("processInstanceIds") List<String> processInstanceIds);
}
