package com.reyun.repository;

import com.reyun.model.CommonParam;
import com.reyun.model.SalesManLeader;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

@Transactional
public interface SalesManLeaderRepository extends JpaRepository<SalesManLeader, Long> {
    @Query(value = "select email from sales_man_leader where id=(select leader from sales_man_leader where id=?1)", nativeQuery = true)
    String findLeaderByBussinessMan(Long bussinessMan);
}
