You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

21 lines
846 B

<?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.epmet.dao.heart.ActInfoDao">
<!-- 查询这个月,各个网格举办的活动次数 活动状态已结束并且实际结束时间在评价周期内的 -->
<select id="selectActGroupByGridId" parameterType="map" resultType="java.util.Map">
SELECT
ai.SPONSOR_ID,
count( 1 ) AS totalAct
FROM
act_info ai
WHERE
ai.DEL_FLAG = '0'
AND ai.ACT_STATUS = 'finished'
AND ai.SPONSOR_TYPE = 'grid'
and ai.CUSTOMER_ID=#{customerId}
AND DATE_FORMAT(ai.ACTUAL_END_TIME,'%Y%m') = #{monthId}
GROUP BY
ai.SPONSOR_ID
</select>
</mapper>