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


import com.ankaibei.workFlow.webadmin.ankaibei.entity.TrafficExpenseEntity;
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 TrafficExpenseMapper extends JpaRepository<TrafficExpenseEntity, Integer>, JpaSpecificationExecutor<TrafficExpenseEntity> {
    @Transactional
    @Modifying
    @Query(value = "update traffic_expense SET flow_task_status = ?1 WHERE id = ?2", nativeQuery = true)
    void updateTrafficFlowStatus(String flowTaskStatus, Integer trafficId);
}
