select listagg(t.weather_type,',') within GROUP(ORDER BY NULL) weather_type
from CO_WEATHER_TYPE t
where t.weather_id in (${gameids})
使用
select listagg(字段名,',') within GROUP(ORDER BY NULL)
返回的集合可用string接收
补充,mybatis中传入参数是String类型且用${}接收时,mapper中的参数前必须写 @Param
String getWeatherType1(@Param("gameids") String gameids);
不然会报错
nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for propert......