From 70d2a5d0f9c6951b2d4cac954041ed73582ff7eb Mon Sep 17 00:00:00 2001 From: liujie <1793218484@qq.com> Date: 星期一, 09 六月 2025 11:54:00 +0800 Subject: [PATCH] 6.9新增登录失败冻结逻辑 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngRealCompanyDAO.java | 144 ++++++++++++++++++----------------------------- 1 files changed, 56 insertions(+), 88 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngRealCompanyDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngRealCompanyDAO.java index f4074c9..9e6f785 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngRealCompanyDAO.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngRealCompanyDAO.java @@ -1,20 +1,22 @@ package com.panzhihua.service_community.dao; -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.dtos.community.ExportRealCompanyExcelDTO; -import com.panzhihua.common.model.dtos.community.ComMngRealCompanyBelongsDTO; -import com.panzhihua.common.model.dtos.community.PageComMngRealCompanyDTO; -import com.panzhihua.common.model.vos.community.ComMngRealCompanyBelongsVO; -import com.panzhihua.common.model.vos.community.ComMngRealCompanyExcelVO; -import com.panzhihua.common.model.vos.community.ComMngRealCompanyVO; -import com.panzhihua.service_community.model.dos.ComMngRealCompanyDO; +import java.util.List; + import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; -import java.util.List; +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.dtos.community.ComMngRealCompanyBelongsDTO; +import com.panzhihua.common.model.dtos.community.ExportRealCompanyExcelDTO; +import com.panzhihua.common.model.dtos.community.PageComMngRealCompanyDTO; +import com.panzhihua.common.model.vos.community.ComMngRealCompanyBelongsVO; +import com.panzhihua.common.model.vos.community.ComMngRealCompanyExcelVO; +import com.panzhihua.common.model.vos.community.ComMngRealCompanyTotalVO; +import com.panzhihua.common.model.vos.community.ComMngRealCompanyVO; +import com.panzhihua.service_community.model.dos.ComMngRealCompanyDO; /** * @description: 实有单位 @@ -24,83 +26,49 @@ @Mapper public interface ComMngRealCompanyDAO extends BaseMapper<ComMngRealCompanyDO> { - @Select("<script> " + - " SELECT " + - " t.id, " + - " t.com_name AS comName, " + - " t.legal_person AS legalPerson, " + - " t.leader, " + - " t.contacts_phone AS contactsPhone, " + - " t.scope, " + - " t.credit_code AS creditCode, " + - " t.province_adcode AS provinceAdcode, " + - " t.city_adcode AS cityAdcode, " + - " t.district_adcode AS districtAdcode, " + - " t.address, " + - " t.create_at AS createAt " + - "FROM " + - " com_mng_real_company t where 1=1" + - "<if test='pageComMngRealCompanyDTO.legalPerson != null and pageComMngRealCompanyDTO.legalPerson.trim() != ""'>" + - " and t.legal_person LIKE concat( #{pageComMngRealCompanyDTO.legalPerson}, '%' ) " + - " </if> " + - "<if test='pageComMngRealCompanyDTO.comName != null and pageComMngRealCompanyDTO.comName.trim() != ""'>" + - " and t.com_name LIKE concat( '%',#{pageComMngRealCompanyDTO.comName}, '%' ) " + - " </if> " + - "<if test='pageComMngRealCompanyDTO.communityId != null and pageComMngRealCompanyDTO.communityId != 0'>" + - " and t.community_id = #{pageComMngRealCompanyDTO.communityId} " + - " </if> " + - " order by t.create_at desc" + - "</script>") - IPage<ComMngRealCompanyVO> pageQueryComMngRealCompany(Page page, @Param(value = "pageComMngRealCompanyDTO") PageComMngRealCompanyDTO pageComMngRealCompanyDTO); + @Select("<script> " + " SELECT " + " t.id, " + " t.com_name AS comName, " + + " t.legal_person AS legalPerson, " + " t.leader, " + " t.contacts_phone AS contactsPhone, " + + " t.scope, " + " t.credit_code AS creditCode, " + " t.province_adcode AS provinceAdcode, " + + " t.city_adcode AS cityAdcode, " + " t.district_adcode AS districtAdcode, " + " t.address, " + + " t.create_at AS createAt " + "FROM " + " com_mng_real_company t where 1=1" + + "<if test='pageComMngRealCompanyDTO.legalPerson != null and pageComMngRealCompanyDTO.legalPerson.trim() != ""'>" + + " and t.legal_person LIKE concat( #{pageComMngRealCompanyDTO.legalPerson}, '%' ) " + " </if> " + + "<if test='pageComMngRealCompanyDTO.comName != null and pageComMngRealCompanyDTO.comName.trim() != ""'>" + + " and t.com_name LIKE concat( '%',#{pageComMngRealCompanyDTO.comName}, '%' ) " + " </if> " + + "<if test='pageComMngRealCompanyDTO.communityId != null and pageComMngRealCompanyDTO.communityId != 0'>" + + " and t.community_id = ${pageComMngRealCompanyDTO.communityId} " + " </if> " + " order by t.create_at desc" + + "</script>") + IPage<ComMngRealCompanyVO> pageQueryComMngRealCompany(Page page, + @Param(value = "pageComMngRealCompanyDTO") PageComMngRealCompanyDTO pageComMngRealCompanyDTO); - @Select("<script> " + - " SELECT " + - " t.com_name AS comName, " + - " t.legal_person AS legalPerson, " + - " t.leader, " + - " t.contacts_phone AS contactsPhone, " + - " t.scope, " + - " t.credit_code AS creditCode, " + - " t.address " + - "FROM " + - " com_mng_real_company t where 1=1 " + - "<if test='exportRealCompanyExcelDTO.comName != null and exportRealCompanyExcelDTO.comName.trim() != ""'>" + - " and t.com_name LIKE concat( #{exportRealCompanyExcelDTO.comName}, '%' ) " + - " </if> " + - "<if test='exportRealCompanyExcelDTO.communityId != null and exportRealCompanyExcelDTO.communityId != 0'>" + - " and t.community_id = #{exportRealCompanyExcelDTO.communityId} " + - " </if> " + - "<if test='exportRealCompanyExcelDTO.legalPerson != null and exportRealCompanyExcelDTO.legalPerson.trim() != ""'>" + - " and t.legal_person LIKE concat( #{exportRealCompanyExcelDTO.legalPerson}, '%' ) " + - " </if> " + - " order by t.create_at desc" + - "</script>") - List<ComMngRealCompanyExcelVO> exportRealCompanyExcel(@Param(value = "exportRealCompanyExcelDTO") ExportRealCompanyExcelDTO exportRealCompanyExcelDTO); + @Select("<script> " + " SELECT " + " t.com_name AS comName, " + " t.legal_person AS legalPerson, " + + " t.leader, " + " t.contacts_phone AS contactsPhone, " + " t.scope, " + + " t.credit_code AS creditCode, " + " t.address " + "FROM " + " com_mng_real_company t where 1=1 " + + "<if test='exportRealCompanyExcelDTO.comName != null and exportRealCompanyExcelDTO.comName.trim() != ""'>" + + " and t.com_name LIKE concat( #{exportRealCompanyExcelDTO.comName}, '%' ) " + " </if> " + + "<if test='exportRealCompanyExcelDTO.communityId != null and exportRealCompanyExcelDTO.communityId != 0'>" + + " and t.community_id = ${exportRealCompanyExcelDTO.communityId} " + " </if> " + + "<if test='exportRealCompanyExcelDTO.legalPerson != null and exportRealCompanyExcelDTO.legalPerson.trim() != ""'>" + + " and t.legal_person LIKE concat( #{exportRealCompanyExcelDTO.legalPerson}, '%' ) " + " </if> " + + " order by t.create_at desc" + "</script>") + List<ComMngRealCompanyExcelVO> exportRealCompanyExcel( + @Param(value = "exportRealCompanyExcelDTO") ExportRealCompanyExcelDTO exportRealCompanyExcelDTO); - @Select("<script> " + - " SELECT distinct " + - " act.province_code AS provinceAdcode, " + - " act.city_code AS cityAdcode, " + - " act.area_code AS districtAdcode, " + - " pr.province_name AS provinceName, " + - " cty.city_name AS cityName, " + - " dis.district_name AS districtName, " + - " street.name AS streetName, " + - " act.name AS communityName, " + - " street.street_id AS streetId, " + - " act.community_id AS communityId " + - " FROM " + - " com_act act " + - " LEFT JOIN com_street street ON act.street_id = street.street_id " + - " LEFT join com_mng_struct_area_province pr on street.province_code = pr.province_adcode " + - " LEFT join com_mng_struct_area_city cty on street.city_code = cty.city_adcode " + - " LEFT join com_mng_struct_area_district dis on street.area_code = dis.district_adcode " + - " WHERE 1=1 " + - "<if test='pageComMngRealCompanyBelongsDTO.actName != null and pageComMngRealCompanyBelongsDTO.actName.trim() != ""'>" + - " and act.name = #{pageComMngRealCompanyBelongsDTO.actName} " + - " </if> " + - " order by act.create_at desc " + - " limit 1 " + - "</script>") - ComMngRealCompanyBelongsVO queryComMngRealCompanyBelongs(@Param(value = "pageComMngRealCompanyBelongsDTO") ComMngRealCompanyBelongsDTO comMngRealCompanyBelongsDTO); + @Select("<script> " + " SELECT distinct " + " act.province_code AS provinceAdcode, " + + " act.city_code AS cityAdcode, " + " act.area_code AS districtAdcode, " + + " pr.province_name AS provinceName, " + " cty.city_name AS cityName, " + + " dis.district_name AS districtName, " + " street.name AS streetName, " + " act.name AS communityName, " + + " street.street_id AS streetId, " + " act.community_id AS communityId, " + " act.create_at AS creatAt " + + " FROM " + " com_act act " + " LEFT JOIN com_street street ON act.street_id = street.street_id " + + " LEFT join com_mng_struct_area_province pr on street.province_code = pr.province_adcode " + + " LEFT join com_mng_struct_area_city cty on street.city_code = cty.city_adcode " + + " LEFT join com_mng_struct_area_district dis on street.area_code = dis.district_adcode " + " WHERE 1=1 " + + "<if test='pageComMngRealCompanyBelongsDTO.actName != null and pageComMngRealCompanyBelongsDTO.actName.trim() != ""'>" + + " and act.name = #{pageComMngRealCompanyBelongsDTO.actName} " + " </if> " + " order by act.create_at desc " + + " limit 1 " + "</script>") + ComMngRealCompanyBelongsVO queryComMngRealCompanyBelongs( + @Param(value = "pageComMngRealCompanyBelongsDTO") ComMngRealCompanyBelongsDTO comMngRealCompanyBelongsDTO); + + @Select("select count(id) as companyTotal from com_mng_real_company where community_id = ${communityId}") + ComMngRealCompanyTotalVO getComMngRealCompanyTotalByAdmin(@Param("communityId") Long communityId); } -- Gitblit v1.7.1