<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.nova.sankuai.infra.mapper.ChannelDownloadLogMapper">
|
|
<select id="getDownloadCount" resultType="com.nova.sankuai.domain.vo.channel.ChannelDownloadCountVo">
|
select
|
cdl.channel_id as id,
|
count(cdl.id) as count
|
from channel_download_log cdl
|
<where>
|
cdl.channel_id in
|
<foreach collection="channelIds" item="item" index="index" open="(" close=")" separator=",">
|
#{item}
|
</foreach>
|
<if test="startDate != null">
|
and cdl.creation_date >= #{startDate}
|
</if>
|
<if test="endDate != null">
|
and cdl.creation_date <= #{endDate}
|
</if>
|
</where>
|
group by cdl.channel_id
|
</select>
|
|
</mapper>
|