罗元桥
2021-07-21 e910c3c144280dc3bce3887ca15e425026aab778
Merge branch 'test' into 'master'

Test

See merge request root/zhihuishequ!111
3个文件已修改
32 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventMapper.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java
@@ -150,7 +150,6 @@
            "cmp.special_situation, " +
            "cmp.phone, " +
            "cmp.remark, " +
            "cmv.alley, " +
            "cmp.native_place, " +
            "cmp.nation,  " +
            "cmp.label,  " +
@@ -162,12 +161,9 @@
            "cmp.birthday,  " +
            "cmp.update_at,  " +
            "cmp.address,  " +
            "cmp.is_rent,  " +
            "cmphu.relation  " +
            "cmp.is_rent  " +
            "FROM  " +
            "com_mng_population AS cmp " +
            "LEFT JOIN com_mng_village AS cmv ON cmv.village_id = cmp.village_id " +
            "LEFT JOIN com_mng_population_house_user AS cmphu ON cmphu.popul_id = cmp.id " +
            "<where>" +
            "<if test='comMngPopulationVO.name != null and comMngPopulationVO.name != &quot;&quot;'>" +
            "AND cmp.`name` LIKE concat(#{comMngPopulationVO.name},'%') " +
@@ -198,9 +194,6 @@
            " </if> " +
            "<if test='comMngPopulationVO.houseNo != null and comMngPopulationVO.houseNo != &quot;&quot;'>" +
            "AND cmp.house_no = #{comMngPopulationVO.houseNo} " +
            " </if> " +
            "<if test='comMngPopulationVO.alley != null and comMngPopulationVO.alley != &quot;&quot;'>" +
            "AND cmv.alley LIKE concat(#{comMngPopulationVO.alley},'%') " +
            " </if> " +
            "<if test='comMngPopulationVO.sex != null and comMngPopulationVO.sex != &quot;&quot;'>" +
            "AND cmp.sex = #{comMngPopulationVO.sex} " +
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java
@@ -265,6 +265,21 @@
                return R.fail("只有志愿者才能报名");
            }
            //查询社区活动
            ComActActivityDO actActivityDO = this.baseMapper.selectById(activityId);
            if(actActivityDO != null){
                //查询当前活动下参与志愿者/居民数量
                Integer count = comActActSignDAO.selectCount(new QueryWrapper<ComActActSignDO>().lambda().eq(ComActActSignDO::getActivityId,activityId)
                        .eq(ComActActSignDO::getIsVolunteer,isVolunteer));
                if(isVolunteer.equals(1) && actActivityDO.getVolunteerMax() <= count){
                    return R.fail("志愿者报名人数已满");
                }
                if(isVolunteer.equals(0) && actActivityDO.getParticipantMax() <= count){
                    return R.fail("居民报名人数已满");
                }
            }
            ComActActSignDO comActActSignDO=new ComActActSignDO();
            comActActSignDO.setActivityId(activityId);
            comActActSignDO.setUserId(userId);
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventMapper.xml
@@ -578,7 +578,7 @@
            WHERE
                event_category = 1
                AND event_process_status = 2
                AND create_at BETWEEN DATE_FORMAT( DATE_ADD( curdate(), INTERVAL - DAY ( curdate())+ 1 DAY ), '%Y-%m-%d %H:%i:%s' )
                AND process_date BETWEEN DATE_FORMAT( DATE_ADD( curdate(), INTERVAL - DAY ( curdate())+ 1 DAY ), '%Y-%m-%d %H:%i:%s' )
            AND NOW()
            <if test="gridId!=null">
                 AND grid_id = #{gridId}
@@ -592,7 +592,7 @@
            WHERE
                event_category = 2
                AND event_status = 2
                AND create_at BETWEEN DATE_FORMAT( CURDATE(), '%Y-%m-%d %H:%i:%s' )
                AND process_date BETWEEN DATE_FORMAT( CURDATE(), '%Y-%m-%d %H:%i:%s' )
            AND NOW()
            <if test="gridId!=null">
                AND grid_id = #{gridId}
@@ -612,7 +612,7 @@
                AND event_type = 6
                AND event_status = 2
                AND event_process_status = 2
                AND create_at BETWEEN DATE_FORMAT( CURDATE(), '%Y-%m-%d %H:%i:%s' )
                AND process_date BETWEEN DATE_FORMAT( CURDATE(), '%Y-%m-%d %H:%i:%s' )
            AND NOW()
            <if test="gridId!=null">
                AND grid_id = #{gridId}
@@ -662,7 +662,7 @@
        WHERE
            event_category = 1
            AND event_process_status = 2
            AND create_at BETWEEN DATE_FORMAT( CURDATE(), '%Y-%m-%d %H:%i:%s' )
            AND process_date BETWEEN DATE_FORMAT( CURDATE(), '%Y-%m-%d %H:%i:%s' )
            AND NOW()
            <if test="gridId!=null">
                AND grid_id = #{gridId}