jinpengyong
2024-06-19 f05383c46370ec8c4f4b8b8165ffab3769dd06a2
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>