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.
26 lines
1011 B
26 lines
1011 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.ActUserRelationDao">
|
|
|
|
<!-- 查询参与人数 -->
|
|
<select id="selectJoinUserCount" resultType="com.epmet.dto.extract.result.JoinUserCountResultDTO">
|
|
SELECT
|
|
ai.SPONSOR_ID AS orgId,
|
|
COUNT(asr.USER_ID) AS joinUserCount
|
|
FROM
|
|
act_user_relation asr
|
|
LEFT JOIN act_info ai ON asr.ACT_ID = ai.ID
|
|
WHERE
|
|
ai.DEL_FLAG = 0
|
|
AND asr.DEL_FLAG = '0'
|
|
AND ai.ACT_STATUS = 'finished'
|
|
AND asr.REWARD_FLAG = 'agree'
|
|
AND ai.CUSTOMER_ID = #{customerId}
|
|
AND DATE_FORMAT( ai.ACTUAL_END_TIME, '%Y%m' ) = #{monthId}
|
|
<if test="orgType != null and orgType != '' ">
|
|
AND ai.SPONSOR_TYPE = #{orgType}
|
|
</if>
|
|
GROUP BY ai.SPONSOR_ID
|
|
</select>
|
|
</mapper>
|
|
|