package com.sw.mes.fb.checkout.dao;

import com.sw.mes.core.base.BaseDao;
import com.sw.mes.fb.aio.entity.SpellInfo;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
* @Author
* @Description：
* @Date:
* @Modified By:
*/
public interface FbDataSpellInfoDao extends BaseDao<SpellInfo, Long> {

    SpellInfo findBySectionNo(String no);

    @Modifying
    @Transactional
    @Query(value = "DELETE FROM zhxx_fb_data_spell_info WHERE section_no IN (?1) ", nativeQuery = true)
    void deleteBySectionNos(List<String> sectionNos);
}
