cjl
2025-01-06 27e6bc3df3e39e0d0b147b155a89ad6837ea972b
screen-api/src/main/resources/mapper/HistoryMonthlyMapper.xml
@@ -9,4 +9,19 @@
        <result column="value" property="value"/>
    </resultMap>
    <select id="listAll" resultType="com.moral.api.pojo.vo.historyMonthly.HistoryResultVo">
        select  DATE_FORMAT(time,'%Y-%m') time,${type}
        from history_monthly
        where date(time) <![CDATA[>=]]> #{startTime}
        and date(time) <![CDATA[<=]]> #{endTime}
        and mac in
        <foreach collection="macs" item="id" index="index" open="(" close=")" separator=",">
            #{id}
        </foreach>
        group by time
        order by time
    </select>
</mapper>