MyBatis

MyBatis根据List批量查询List结果排序问题

MyBatis根据List批量查询List结果排序问题

MyBatis配置 public interface RouteServiceMapper { List<RouteService> selectRouteServiceList(@Param("routeServiceList") List<Map&l

Joe.Ye Joe.Ye 2023-02-26
0 0 0
使用MyBatis查询数据,按特定顺序排序

使用MyBatis查询数据,按特定顺序排序

有如下表table_city id city 1 beijing 2 shanghai 3 hanghzou 4 shenzhen 现在将查询出的数据按照id 3、4、1、2排序 先把id数据按照一定顺序放到一个List中 List<Inte

Joe.Ye Joe.Ye 2023-02-26
0 0 0
1 2