From 8788a78ad30c1bb9d50d91b10e76d3ae47ed8da2 Mon Sep 17 00:00:00 2001 From: huanghongfa <huanghongfa123456> Date: 星期一, 07 六月 2021 09:28:23 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/test_future_wangge' into test_future_wangge --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java index 69a4333..08c2cf9 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java @@ -135,6 +135,7 @@ "cmp.census_register, \n" + "cmp.healthy, \n" + "cmp.birthday, \n" + + "cmp.update_at, \n" + "cmp.is_rent \n" + "FROM \n" + "com_mng_population AS cmp " + @@ -145,6 +146,9 @@ " </if> " + "<if test='comMngPopulationVO.actId != null'>" + " and cmp.act_id = #{comMngPopulationVO.actId} " + + " </if> " + + "<if test='comMngPopulationVO.outOrLocal != null'>" + + " and cmp.out_or_local = #{comMngPopulationVO.outOrLocal} " + " </if> " + "<if test='comMngPopulationVO.villageId != null'>" + " and cmp.village_id = #{comMngPopulationVO.villageId} " + @@ -170,11 +174,11 @@ "<if test='comMngPopulationVO.sex != null and comMngPopulationVO.sex != ""'>" + "AND cmp.sex = #{comMngPopulationVO.sex} " + " </if> " + - "<if test='comMngPopulationVO.ageStart != null and comMngPopulationVO.ageStart != ""'>" + - "AND cmp.age <![CDATA[ >= ]]> #{comMngPopulationVO.ageStart} " + + "<if test='comMngPopulationVO.ageStartTime != null and comMngPopulationVO.ageStartTime != ""'>" + + "AND date_format(cmp.birthday,'%Y-%m-%d') <![CDATA[ <= ]]> #{comMngPopulationVO.ageStartTime} " + " </if> " + - "<if test='comMngPopulationVO.ageEnd != null and comMngPopulationVO.ageEnd != ""'>" + - "AND cmp.age <![CDATA[ <= ]]> #{comMngPopulationVO.ageEnd} " + + "<if test='comMngPopulationVO.ageEndTime != null and comMngPopulationVO.ageEndTime != ""'>" + + "AND date_format(cmp.birthday,'%Y-%m-%d') <![CDATA[ >= ]]> #{comMngPopulationVO.ageEndTime} " + " </if> " + "<if test='comMngPopulationVO.nativePlace != null and comMngPopulationVO.nativePlace != ""'>" + "AND cmp.native_place LIKE concat(#{comMngPopulationVO.nativePlace},'%') " + @@ -231,7 +235,7 @@ @Select("select count(id) as populationTotal " + ",(select count(id) from com_mng_population where act_id = #{communityId} and out_or_local = 1) as localTotal " + ",(select count(id) from com_mng_population where act_id = #{communityId} and out_or_local = 2) as outTotal " + - ",(select count(id) from com_mng_population where act_id = #{communityId} and label is null) as specialTotal " + + ",(select count(id) from com_mng_population where act_id = #{communityId} and label is not null) as specialTotal " + " from com_mng_population as cmp where act_id = #{communityId}") ComMngPopulationTotalVO getPopulationTotalByAdmin(@Param("communityId") Long communityId); } -- Gitblit v1.7.1