package office.repository;

import office.model.ADISaleMap;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;


/**
 * Created by nolan on 06/06/2017.
 * description:
 */
public interface ADISaleMapRepository
    extends JpaRepository<ADISaleMap, Long>
{
    @Query(value = "select * from adisale_map where account=?1", nativeQuery = true)
    ADISaleMap findByAccountId(Long account);

    @Query(value = "select * from adisale_map where account_email=?1", nativeQuery = true)
    ADISaleMap findByAccountEmail(String email);
}
