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/ComOpsHouseDAO.java |  113 +++++++++++++++++++++++---------------------------------
 1 files changed, 46 insertions(+), 67 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComOpsHouseDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComOpsHouseDAO.java
index f9f5b55..1c6ec16 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComOpsHouseDAO.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComOpsHouseDAO.java
@@ -1,5 +1,9 @@
 package com.panzhihua.service_community.dao;
 
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -7,9 +11,6 @@
 import com.panzhihua.common.model.vos.LoginUserInfoVO;
 import com.panzhihua.common.model.vos.community.ComOpsHouseVO;
 import com.panzhihua.service_community.model.dos.ComOpsHouseDO;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-import org.apache.ibatis.annotations.Select;
 
 /**
  * @program: springcloud_k8s_panzhihuazhihuishequ
@@ -20,72 +21,50 @@
 @Mapper
 public interface ComOpsHouseDAO extends BaseMapper<ComOpsHouseDO> {
 
-	@Select("select type,name,phone,image_url from sys_user where user_id=#{userId}")
-	LoginUserInfoVO selectUserByUserId(Long userId);
+    @Select("select type,name,phone,image_url from sys_user where user_id=#{userId}")
+    LoginUserInfoVO selectUserByUserId(Long userId);
 
-	@Select("select user_id from sys_user where user_id=#{name}  limit 1")
-	Long selectUserIdByName(String name);
+    @Select("select user_id from sys_user where name like concat('%',#{name},'%')  limit 1")
+    Long selectUserIdByName(String name);
 
-	@Select("<script> " +
-			"SELECT d.*,\n" +
-			"u.name userName,u.type as userType\n" +
-			"FROM\n" +
-			"com_ops_house d\n" +
-			"JOIN sys_user u ON d.user_id = u.user_id\n" +
-			"where 1=1 " +
-			"<if test='pageComOpsHouseDTO.communityId != null '>" +
-			"AND d.community_id=#{pageComOpsHouseDTO.communityId} \n" +
-			" </if> " +
+    @Select("<script> " + "SELECT d.*,\n" + "u.name userName,u.type as userType\n" + "FROM\n" + "com_ops_house d\n"
+        + " LEFT JOIN sys_user u ON d.user_id = u.user_id\n"
+        + " LEFT JOIN com_act ca ON d.community_id = ca.community_id\n"
+        + " LEFT JOIN com_mng_struct_area sa ON d.house_community_id = sa.id \n" + "where 1=1 "
+        + "<if test='pageComOpsHouseDTO.communityId != null '>"
+        + "AND ( d.community_id = ${pageComOpsHouseDTO.communityId} or sa.community_id = ${pageComOpsHouseDTO.communityId} )\n"
+        + " </if> "
+        + "<if test='pageComOpsHouseDTO.areaCode != null '>"
+        + "AND ca.area_code = #{pageComOpsHouseDTO.areaCode}"
+        + " </if> " +
+        "<if test='pageComOpsHouseDTO.userId != null '>" + "AND d.user_id=#{pageComOpsHouseDTO.userId} \n" + " </if> "
+        + "<if test='pageComOpsHouseDTO.orient != null '>" + "AND d.orient=#{pageComOpsHouseDTO.orient} \n" + " </if> "
+        + "<if test='pageComOpsHouseDTO.houseType != null '>" + "AND d.house_type=#{pageComOpsHouseDTO.houseType} \n"
+        + " </if> " + "<if test='pageComOpsHouseDTO.rentType != null '>"
+        + "AND d.rent_type=#{pageComOpsHouseDTO.rentType} \n" + " </if> "
+        + "<if test='pageComOpsHouseDTO.brn != null and pageComOpsHouseDTO.brn !=4 '>"
+        + "AND d.brn=#{pageComOpsHouseDTO.brn} \n" + " </if> "
+        + "<if test='pageComOpsHouseDTO.brn != null and pageComOpsHouseDTO.brn ==4 '>"
+        + "AND d.brn <![CDATA[ >= ]]> 4 \n" + " </if> " +
 
-
-			"<if test='pageComOpsHouseDTO.userId != null '>" +
-			"AND d.user_id=#{pageComOpsHouseDTO.userId} \n" +
-			" </if> " +
-			"<if test='pageComOpsHouseDTO.orient != null '>" +
-			"AND d.orient=#{pageComOpsHouseDTO.orient} \n" +
-			" </if> " +
-			"<if test='pageComOpsHouseDTO.houseType != null '>" +
-			"AND d.house_type=#{pageComOpsHouseDTO.houseType} \n" +
-			" </if> " +
-			"<if test='pageComOpsHouseDTO.rentType != null '>" +
-			"AND d.rent_type=#{pageComOpsHouseDTO.rentType} \n" +
-			" </if> " +
-			"<if test='pageComOpsHouseDTO.brn != null and pageComOpsHouseDTO.brn !=4 '>" +
-			"AND d.brn=#{pageComOpsHouseDTO.brn} \n" +
-			" </if> " +
-			"<if test='pageComOpsHouseDTO.brn != null and pageComOpsHouseDTO.brn ==4 '>" +
-			"AND d.brn <![CDATA[ >= ]]> 4 \n" +
-			" </if> " +
-
-
-			"<if test='pageComOpsHouseDTO.houseCommunityId != null '>" +
-			"AND d.house_community_id=#{pageComOpsHouseDTO.houseCommunityId} \n" +
-			" </if> " +
-			"<if test='pageComOpsHouseDTO.status != null and pageComOpsHouseDTO.status !=4 '>" +
-			"AND d.status=#{pageComOpsHouseDTO.status} \n" +
-			" </if> " +
-			"<if test='pageComOpsHouseDTO.status != null and pageComOpsHouseDTO.status ==4 '>" +
-			"AND d.status in (0,2) \n" +
-			" </if> " +
-			"<if test='pageComOpsHouseDTO.houseCommunityName != null and pageComOpsHouseDTO.houseCommunityName.trim() != &quot;&quot;'>" +
-			" and d.`house_community_name` LIKE concat( #{pageComOpsHouseDTO.houseCommunityName}, '%' ) \n" +
-			" </if> " +
-			"<if test='pageComOpsHouseDTO.mobile != null and pageComOpsHouseDTO.mobile.trim() != &quot;&quot;'>" +
-			" and d.`mobile` LIKE concat( #{pageComOpsHouseDTO.mobile}, '%' ) \n" +
-			" </if> " +
-			"<if test='pageComOpsHouseDTO.begin != null '>" +
-			"AND d.create_at BETWEEN #{pageComOpsHouseDTO.begin} \n" +
-			"AND #{pageComOpsHouseDTO.end} \n" +
-			" </if> " +
-			" order by " +
-			"<if test='pageComOpsHouseDTO.priceOrder != null and pageComOpsHouseDTO.priceOrder ==1 '>" +
-			"d.amount asc," +
-			" </if> " +
-			"<if test='pageComOpsHouseDTO.priceOrder != null and pageComOpsHouseDTO.priceOrder ==2 '>" +
-			"d.amount desc," +
-			" </if> " +
-			"d.id desc "+
-			"</script>")
-	IPage<ComOpsHouseVO> pageHouse(Page page, @Param("pageComOpsHouseDTO") PageComOpsHouseDTO pageComOpsHouseDTO);
+        "<if test='pageComOpsHouseDTO.houseCommunityId != null '>"
+        + "AND d.house_community_id = ${pageComOpsHouseDTO.houseCommunityId} \n" + " </if> "
+        + "<if test='pageComOpsHouseDTO.status != null and pageComOpsHouseDTO.status &lt; 4 '>"
+        + "AND d.status=#{pageComOpsHouseDTO.status} \n" + " </if> "
+        + "<if test='pageComOpsHouseDTO.status != null and pageComOpsHouseDTO.status ==4 '>"
+        + "AND d.status in (0,2) \n" + " </if> "
+        + "<if test='pageComOpsHouseDTO.status != null and pageComOpsHouseDTO.status ==5 '>"
+        + "AND d.status in (1,3) \n" + " </if> "
+        + "<if test='pageComOpsHouseDTO.houseCommunityName != null and pageComOpsHouseDTO.houseCommunityName.trim() != &quot;&quot;'>"
+        + " and (" + " d.`house_community_name` LIKE concat( '%', #{pageComOpsHouseDTO.houseCommunityName}, '%' ) "
+        + " or d.title like concat( '%', #{pageComOpsHouseDTO.houseCommunityName}, '%' ) " + "    )  \n" + " </if> "
+        + "<if test='pageComOpsHouseDTO.mobile != null and pageComOpsHouseDTO.mobile.trim() != &quot;&quot;'>"
+        + " and d.`mobile` LIKE concat( #{pageComOpsHouseDTO.mobile}, '%' ) \n" + " </if> "
+        + "<if test='pageComOpsHouseDTO.begin != null '>" + "AND d.create_at BETWEEN #{pageComOpsHouseDTO.begin} \n"
+        + "AND #{pageComOpsHouseDTO.end} \n" + " </if> " + " order by "
+        + "<if test='pageComOpsHouseDTO.priceOrder != null and pageComOpsHouseDTO.priceOrder ==1 '>" + "d.amount asc,"
+        + " </if> " + "<if test='pageComOpsHouseDTO.priceOrder != null and pageComOpsHouseDTO.priceOrder ==2 '>"
+        + "d.amount desc," + " </if> " + "d.id desc " + "</script>")
+    IPage<ComOpsHouseVO> pageHouse(Page page, @Param("pageComOpsHouseDTO") PageComOpsHouseDTO pageComOpsHouseDTO);
 
 }

--
Gitblit v1.7.1