package com.ankaibei.workFlow.webadmin.ankaibei.mapper;


import com.ankaibei.workFlow.webadmin.ankaibei.entity.RestsInfoEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import javax.transaction.Transactional;

/**
 * @author lwq
 * @version 1.0
 * @description:
 * @date 2022/9/26 18:35
 */
public interface RestInfoMapper extends JpaRepository<RestsInfoEntity, Integer>, JpaSpecificationExecutor<RestsInfoEntity> {
    @Transactional
    @Modifying
    @Query(value = "update rests_info SET flow_task_status = ?1 WHERE rests_id = ?2", nativeQuery = true)
    void updateRestsFlowStatus(String flowTaskStatus, Integer projectId);
}
