package com.loan.system.repository; import com.loan.system.domain.entity.ApprovalRecord; import com.loan.system.domain.entity.UserRecommender; import org.springframework.data.jpa.repository.JpaRepository; 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 EdwinXu * @date 2020/9/2 - 15:35 * @Description */ public interface UserRecommenderRepository extends JpaRepository { @Query("select u.recommenderId from UserRecommender u where u.userId = ?1") Long findByUserId(Long currentId); @Query("select u.userId from UserRecommender u where u.recommenderId = ?1") Long findByRecommenderId(Long recommenderId); }