| | |
| | | } |
| | | Integer limit = comActActivityVO.getLimit(); |
| | | if(limit != null && limit>0 &¤tList.size()>0){ |
| | | if(comActActivityVO.getType()==3){ |
| | | if(comActActivityVO.getType()==3||comActActivityVO.getType()==5){ |
| | | if(limit==currentList.size()&¤tList.get(currentList.size()-1).getEndTime()!=null){ |
| | | comActActivityVO.setIsRegist(1); |
| | | } |
| | |
| | | FROM com_act_activity a |
| | | LEFT JOIN sys_user u ON a.sponsor_id=u.user_id |
| | | LEFT JOIN com_act_act_regist s ON a.id=s.activity_id |
| | | where s.type=2 and a.check_unit_id = #{relationId} and publish_at between concat(#{date},'-01-01 00:00:00') and concat(#{date},'-12-31 23:59:59') group by a.id |
| | | where s.end_time is not null and a.check_unit_id = #{relationId} and publish_at between concat(#{date},'-01-01 00:00:00') and concat(#{date},'-12-31 23:59:59') group by a.id |
| | | </select> |
| | | |
| | | <select id="selectListByCommunityId" resultType="com.panzhihua.common.model.vos.community.ComActActivityVO"> |
| | | SELECT t.* FROM `com_act_activity` t left join com_act_act_regist t1 on t.id = t1.activity_id left join sys_user t2 on t1.user_id = t2.user_id |
| | | WHERE t1.type = 2 and t.community_id = #{communityId} and t.type = 3 and publish_at between concat(#{date},'-01-01 00:00:00') and concat(#{date},'-12-31 23:59:59') group by t.id |
| | | WHERE t1.end_time is not null and t.community_id = #{communityId} and t.type = 3 and publish_at between concat(#{date},'-01-01 00:00:00') and concat(#{date},'-12-31 23:59:59') group by t.id |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | |
| | | <select id="selectStatsUser" resultType="com.panzhihua.common.model.vos.neighbor.ServiceStaticsVO"> |
| | | select count(t1.checkId) as times,sum(t1.hours) as hours from ((select real_service_time as hours,solve_id as checkId from com_act_neighbor_circle canc left join sys_user su on canc.solve_id = su.user_id where order_type = 2 and solve_status = 4 and su.phone = #{phone} and canc.create_at between concat(#{date},'-01-01 00:00:00') and concat(#{date},'-12-31 23:59:59')) union all |
| | | (select duration as hours,caas.user_id as checkId from com_act_activity caa LEFT JOIN com_act_act_regist caas on caa.id = caas.activity_id left join sys_user su on caas.user_id = su.user_id where caas.type = 2 and su.phone =#{phone} and publish_at between concat(#{date},'-01-01 00:00:00') and concat(#{date},'-12-31 23:59:59') group by caa.id)) t1 |
| | | (select duration as hours,caas.user_id as checkId from com_act_activity caa LEFT JOIN com_act_act_regist caas on caa.id = caas.activity_id left join sys_user su on caas.user_id = su.user_id where caas.end_time is not null and su.phone =#{phone} and publish_at between concat(#{date},'-01-01 00:00:00') and concat(#{date},'-12-31 23:59:59') group by caa.id)) t1 |
| | | </select> |
| | | |
| | | <select id="selectListByPhone" resultType="com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleAppVO"> |