MawbOtherFeeRepository.java 811 字节
package com.agent.repository.agent;

import com.agent.entity.agent.MawbOtherFeeEntity;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

public interface MawbOtherFeeRepository extends PagingAndSortingRepository<MawbOtherFeeEntity, Long>,
        JpaSpecificationExecutor<MawbOtherFeeEntity> {

    @Query(value = "SELECT * FROM MAKE_MAWB_OTHERFEE WHERE MAWB = ?1 ORDER BY ID DESC", nativeQuery = true)
    public MawbOtherFeeEntity findByMawbId(Long id);

    @Modifying
    @Query(value = "DELETE FROM MAKE_MAWB_OTHERFEE WHERE MAWB = ?1", nativeQuery = true)
    public void deleteByMawbId(Long id);
}