From de91c84954157bb9f8b6d938cbe0b1b51fb6e65d Mon Sep 17 00:00:00 2001 From: CeDo <cedoogle@gmail.com> Date: 星期五, 07 五月 2021 15:23:57 +0800 Subject: [PATCH] bugfixed:新增便民服务商家 报错 --- springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbMemberDAO.java | 46 +++++++++++++++++++++++++++++++++------------- 1 files changed, 33 insertions(+), 13 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbMemberDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbMemberDAO.java index 71ea5eb..d514013 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbMemberDAO.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbMemberDAO.java @@ -3,6 +3,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.panzhihua.common.model.vos.partybuilding.ComPbMemberExcelVO; import com.panzhihua.common.model.vos.partybuilding.PagePartyBuildingMemberVO; import com.panzhihua.common.model.vos.partybuilding.PagePartyOrganizationVO; import com.panzhihua.common.model.vos.partybuilding.PartyBuildingMemberVO; @@ -57,14 +58,14 @@ "com_pb_member m\n" + "LEFT JOIN sys_user u ON m.id_card = u.id_card\n" + "LEFT JOIN com_pb_org o ON m.org_id = o.id"+ - " where m.community_id=#{pagePartyOrganizationVO.communityId} " + - "<if test='pagePartyOrganizationVO.orgName != null and pagePartyOrganizationVO.orgName.trim() != ""'>" + + " where m.community_id=#{pagePartyOrganizationVO.communityId} and m.audit_result='1' " + + "<if test='pagePartyOrganizationVO.orgName != null and pagePartyOrganizationVO.orgName != ""'>" + "and o.name like concat(#{pagePartyOrganizationVO.orgName},'%') "+ " </if> " + - "<if test='pagePartyOrganizationVO.account != null and pagePartyOrganizationVO.account.trim() != ""'>" + + "<if test='pagePartyOrganizationVO.account != null and pagePartyOrganizationVO.account != ""'>" + "and u.phone like concat (#{pagePartyOrganizationVO.account},'%')"+ " </if> " + - "<if test='pagePartyOrganizationVO.name != null and pagePartyOrganizationVO.name.trim() != ""'>" + + "<if test='pagePartyOrganizationVO.name != null and pagePartyOrganizationVO.name != ""'>" + "and m.name like concat (#{pagePartyOrganizationVO.name},'%')"+ " </if> " + @@ -106,14 +107,14 @@ "LEFT JOIN sys_user u ON m.id_card = u.id_card\n" + "LEFT JOIN com_pb_org o ON m.org_id = o.id"+ " where m.user_id is not null " + - "<if test='pagePartyBuildingMemberVO.phone != null and pagePartyBuildingMemberVO.phone.trim() != ""'>" + + "<if test='pagePartyBuildingMemberVO.phone != null and pagePartyBuildingMemberVO.phone != ""'>" + "and u.phone = #{pagePartyBuildingMemberVO.phone} "+ " </if> " + - "<if test='pagePartyBuildingMemberVO.name != null and pagePartyBuildingMemberVO.name.trim() != ""'>" + + "<if test='pagePartyBuildingMemberVO.name != null and pagePartyBuildingMemberVO.name != ""'>" + "and u.name like concat (#{pagePartyBuildingMemberVO.name},'%')"+ " </if> " + - "<if test='pagePartyBuildingMemberVO.auditStatus != null and pagePartyBuildingMemberVO.auditStatus.trim() != ""'>" + - "and m.audit_status = #{pagePartyBuildingMemberVO.auditStatus}"+ + "<if test='pagePartyBuildingMemberVO.auditStatus != null and pagePartyBuildingMemberVO.auditStatus != ""'>" + + "and m.audit_result = #{pagePartyBuildingMemberVO.auditStatus}"+ " </if> " + "order by m.join_time desc "+ "</script>") @@ -138,22 +139,41 @@ "CASE\n" + "WHEN u.id_card IS NULL THEN\n" + "'未注册' ELSE '已注册' \n" + - "END STATUS \n" + + "END STATUS," + + " m.create_at \n" + "FROM\n" + "com_pb_member m\n" + "LEFT JOIN sys_user u ON m.id_card = u.id_card\n" + "LEFT JOIN com_pb_org o ON m.org_id = o.id"+ " where m.audit_result in (0,3) " + "<if test='pagePartyBuildingMemberVO.phone != null and pagePartyBuildingMemberVO.phone != ""'>" + - " and u.phone = #{pagePartyBuildingMemberVO.phone} "+ + " and u.phone LIKE CONCAT('%',#{pagePartyBuildingMemberVO.phone},'%') "+ " </if> " + "<if test='pagePartyBuildingMemberVO.name != null and pagePartyBuildingMemberVO.name != ""'>" + - " and u.name like concat (#{pagePartyBuildingMemberVO.name},'%')"+ + " and u.name like concat ('%',#{pagePartyBuildingMemberVO.name},'%')"+ " </if> " + - "<if test='pagePartyBuildingMemberVO.auditStatus != null and pagePartyBuildingMemberVO.auditStatus != ""'>" + - " and m.audit_status = #{pagePartyBuildingMemberVO.auditStatus}"+ + "<if test='pagePartyBuildingMemberVO.auditStatus != null'>" + + " and m.audit_result = #{pagePartyBuildingMemberVO.auditStatus}"+ " </if> " + " order by m.join_time desc "+ "</script>") IPage<PartyBuildingMemberVO> pagePartyBuildingMembersVO(Page page, @Param("pagePartyBuildingMemberVO") PagePartyBuildingMemberVO pagePartyBuildingMemberVO); + + @Select("<script> " + + "select cpm.name as comName,cpm.id_card,cpm.join_time,cpm.employment_time,ca.`name` as communityName,cpo.name as orgName from com_pb_member as cpm " + + " left join com_act as ca on ca.community_id = cpm.community_id " + + " left join com_pb_org as cpo on cpo.id = cpm.org_id " + + " LEFT JOIN sys_user u ON cpm.id_card = u.id_card " + + " where cpm.community_id = #{organizationVO.communityId} " + + "<if test='organizationVO.orgName != null'>" + + " and cpo.name LIKE CONCAT('%',#{organizationVO.orgName},'%') "+ + " </if> " + + "<if test='organizationVO.account != null and organizationVO.account != ""'>" + + " and u.phone like concat (#{organizationVO.account},'%')"+ + " </if> " + + "<if test='organizationVO.name != null and organizationVO.name != ""'>" + + " and cpm.name like concat (#{organizationVO.name},'%')"+ + " </if> " + + "</script>") + List<ComPbMemberExcelVO> exportPbMember(@Param("organizationVO") PagePartyOrganizationVO organizationVO); } -- Gitblit v1.7.1