#feat 修改大屏统计自愿者和普通用户sql语法错误问题
| | |
| | | @Select("SELECT " + " count( caa.id ) as totalNum, " |
| | | + " (select count(id) from com_act_activity where `status` IN (1,2,3,4,5) and volunteer_min = 0 and community_id = ${communityId}) as commonNum, " |
| | | + " (select count(id) from com_act_activity where `status` IN (1,2,3,4,5) and volunteer_min > 0 and community_id = ${communityId}) as volunteerNum, " |
| | | + " (select count(caas.user_id) from (select * from com_act_act_sign where `status` = 1) as caas left join com_act_activity as caa on caa.id = caas.activity_id where caa.`status` IN (1,2,3,4,5) and is_volunteer = 0 and caa.community_id = ${communityId}) as commonPeopleNum, " |
| | | + " (select count(caas.user_id) from (select * from com_act_act_sign where `status` = 1) as caas left join com_act_activity as caa on caa.id = caas.activity_id where caa.`status` IN (1,2,3,4,5) and is_volunteer = 1 and caa.community_id = ${communityId}) as volunteerPeopleNum, " |
| | | + " (select count(caas.user_id) from (select * from com_act_act_sign where `status` = 1) as caas left join com_act_activity as caa on caa.id = caas.activity_id where caa.`status` IN (1,2,3,4,5) and caas.sign_identity != 3 and caa.community_id = ${communityId}) as commonPeopleNum, " |
| | | + " (select count(caas.user_id) from (select * from com_act_act_sign where `status` = 1) as caas left join com_act_activity as caa on caa.id = caas.activity_id where caa.`status` IN (1,2,3,4,5) and caas.sign_identity = 3 and caa.community_id = ${communityId}) as volunteerPeopleNum, " |
| | | + " (select count(id) from com_act_activity where `status` IN (1,2,3,4,5) and community_id = ${communityId} and create_at between date_sub(curdate() - day(curdate()) +1,interval 1 month) and now()) as currentNum " |
| | | + "FROM " + " com_act_activity AS caa " + "WHERE " |
| | | + " caa.`status` IN (1,2,3,4,5) and community_id = ${communityId}") |