From fa31c6f51e3669e292b06a31be95c6336521a22c Mon Sep 17 00:00:00 2001 From: yanghui <2536613402@qq.com> Date: 星期四, 20 十月 2022 15:53:46 +0800 Subject: [PATCH] #feat 修复bug --- springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbCheckUnitMapper.xml | 17 ++++++++++------- 1 files changed, 10 insertions(+), 7 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbCheckUnitMapper.xml b/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbCheckUnitMapper.xml index 8bcdfcc..40b5228 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbCheckUnitMapper.xml +++ b/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbCheckUnitMapper.xml @@ -170,8 +170,11 @@ </if> AND belong_to = temp.belong_to) AS organTotal, (SELECT COUNT( id ) FROM com_pb_check_unit WHERE nature_name = '企事业单位' - <if test="commonDto.communityId != null"> - AND community_id = #{commonDto.communityId} + <if test="commonDto.communityIds != null and commonDto.communityIds.size() >0"> + AND community_id IN + <foreach collection="commonDto.communityIds" item="item" open="(" separator="," close=")"> + #{item} + </foreach> </if> AND belong_to = temp.belong_to) AS businessTotal, (SELECT COUNT( m.id ) FROM com_pb_member m LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id WHERE m.audit_result = 1 @@ -260,14 +263,14 @@ #{item} </foreach> </if> - AND AND m.check_unit_id is not null AND cpcu.nature_name = '机关单位' AND cpcu.belong_to = temp.belong_to) AS organTotal, + AND m.check_unit_id is not null AND cpcu.nature_name = '机关单位' AND cpcu.belong_to = temp.belong_to) AS organTotal, (SELECT COUNT( m.id ) FROM com_pb_member m LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id WHERE m.audit_result = 1 <if test="commonDto.communityIds != null and commonDto.communityIds.size() >0"> AND m.community_id IN - <foreach collection="commonDto.communityIds" item="item" open="(" separator="," close=")"> - #{item} - </foreach> - </if> + <foreach collection="commonDto.communityIds" item="item" open="(" separator="," close=")"> + #{item} + </foreach> + </if> AND cpcu.nature_name = '企事业单位' AND cpcu.belong_to = temp.belong_to) AS businessTotal FROM (SELECT cpcu.belong_to,COUNT( m.id ) AS partyMemberTotal FROM com_pb_member m LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id WHERE m.audit_result = 1 <if test="commonDto.communityIds != null and commonDto.communityIds.size() >0"> -- Gitblit v1.7.1