attempted to return null from a method with a primitive return type (long).",
后台sql没有查询到数据。修改返回类型为包装类型
Long selTouristsMonthSumByType(@Param("date")String date,@Param("parkType")String parkType);
<select id="selTouristsMonthSumByType" resultType="java.lang.Long">
select sum(a.tourists) as sum from octv_board_park_statistics a inner join octv_park_basic b on a.park_id = b.id where DATE_FORMAT(a.count_date,'%Y-%m') = DATE_FORMAT(#{date},'%Y-%m') and b.park_type = #{parkType} group by b.park_type
</select>
控制处理