/**
* 根据id List集合 找到对应id的总需求
* @param idList {@code List<Integer>} id List集合
* @return {@code List<Map<String, String>>} id,totalDemend映射集合
*/
@Query(value = "SELECT pj.`id`, COUNT(s.`id`) as totalDemend\n" +
"FROM zt_project pj\n" +
"INNER JOIN zt_projectproduct pp\n" +
"ON pj.`id` = pp.project\n" +
Spring Data Jpa将List用于sql语句中
最新推荐文章于 2024-06-02 16:57:29 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)