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


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