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


import com.ankaibei.workFlow.webadmin.ankaibei.entity.CommunicationInfoEntity;
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
 * @version 1.0
 * @description:
 * @date 2022/9/26 17:03
 */
public interface CommunicationMapper extends JpaRepository<CommunicationInfoEntity, Integer>, JpaSpecificationExecutor<CommunicationInfoEntity> {


    @Transactional
    @Modifying
    @Query(value = "update communication_info SET flow_task_status = ?1 WHERE communication_id = ?2", nativeQuery = true)
    void updateCommunicationFlowStatus(String flowTaskStatus, Integer commId);

}
