spring data jpa 自定义sql 左链接查询

@Query(value = "select u.* from appuser_te u LEFT JOIN app_user_history his on his.user_id=u.id where his.apple_app_id=:appleAppId limit 1,3",nativeQuery = true)
List<AppUser> findByFlushId(@Param(value="appleAppId") Integer appleAppId);
原文地址:https://www.cnblogs.com/kedoudejingshen/p/6939504.html