From 2e64c232ab6b51b2cecf1ee96e1e9b709234f326 Mon Sep 17 00:00:00 2001 From: huanghongfa <huanghongfa123456> Date: 星期六, 21 八月 2021 16:35:14 +0800 Subject: [PATCH] 随手拍改版接口开发 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComOpsHouseDAO.java | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 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 2aa60b3..feff5a7 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 @@ -23,7 +23,7 @@ @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") + @Select("select user_id from sys_user where name like concat('%',#{name},'%') limit 1") Long selectUserIdByName(String name); @Select("<script> " + @@ -31,10 +31,11 @@ "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" + + " LEFT JOIN sys_user u ON d.user_id = u.user_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} \n" + + "AND ( d.community_id=#{pageComOpsHouseDTO.communityId} or sa.community_id=#{pageComOpsHouseDTO.communityId} )\n" + " </if> " + @@ -71,7 +72,10 @@ "AND d.status in (1,3) \n" + " </if> " + "<if test='pageComOpsHouseDTO.houseCommunityName != null and pageComOpsHouseDTO.houseCommunityName.trim() != ""'>" + - " and d.`house_community_name` LIKE concat( #{pageComOpsHouseDTO.houseCommunityName}, '%' ) \n" + + " 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() != ""'>" + " and d.`mobile` LIKE concat( #{pageComOpsHouseDTO.mobile}, '%' ) \n" + -- Gitblit v1.7.1