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


import com.ankaibei.workFlow.webadmin.ankaibei.entity.TravelExpenseEntity;
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;

public interface TravelExpenseMapper extends JpaRepository<TravelExpenseEntity, Integer>, JpaSpecificationExecutor<TravelExpenseEntity> {
    @Transactional
    @Modifying
    @Query(value = "update travel_expense SET flow_task_status = ?1 WHERE id = ?2", nativeQuery = true)
    void updateTravelFlowStatus(String flowTaskStatus, Integer travelId);
}
