Merge remote-tracking branch 'origin/dev' into dev
| | |
| | | </select> |
| | | <select id="getActAddPolylineData" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT filed, SUM(num) AS num FROM ( |
| | | SELECT DATE_FORMAT( publish_at, '%Y-%m' ) AS filed, COUNT(id) AS num |
| | | SELECT DATE_FORMAT( create_at, '%Y-%m' ) AS filed, COUNT(id) AS num |
| | | FROM com_act_activity |
| | | WHERE community_id = ${communityId} AND `status` IN(2,3,4,5) |
| | | <if test="isResidentAct"> |
| | |
| | | <if test="!isResidentAct"> |
| | | AND `type` = 1 |
| | | </if> |
| | | AND DATE_FORMAT( publish_at, '%Y-%m' ) > DATE_FORMAT(date_sub(curdate(), interval 12 month),'%Y-%m') GROUP BY filed |
| | | AND DATE_FORMAT( create_at, '%Y-%m' ) > DATE_FORMAT(date_sub(curdate(), interval 12 month),'%Y-%m') GROUP BY filed |
| | | UNION ALL SELECT * FROM |
| | | ( |
| | | SELECT DATE_FORMAT(curdate(),'%Y-%m') AS filed, 0 AS num union |