From a224c015be963b73b2dffef59020c5c89b8d5752 Mon Sep 17 00:00:00 2001
From: 张天森 <1292933220@qq.com>
Date: 星期一, 17 十月 2022 17:09:48 +0800
Subject: [PATCH] 三说会堂事件操作权限处理
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngStructAreaDAO.java | 70 +++++++++++++----------------------
1 files changed, 26 insertions(+), 44 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngStructAreaDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngStructAreaDAO.java
index 818da7f..b314461 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngStructAreaDAO.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngStructAreaDAO.java
@@ -1,15 +1,16 @@
package com.panzhihua.service_community.dao;
+import java.util.List;
+
+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;
import com.panzhihua.common.model.vos.community.ComMngStructAreaVO;
import com.panzhihua.service_community.model.dos.ComMngStructAreaDO;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-import org.apache.ibatis.annotations.Select;
-
-import java.util.List;
/**
* @program: springcloud_k8s_panzhihuazhihuishequ
@@ -19,47 +20,28 @@
**/
@Mapper
public interface ComMngStructAreaDAO extends BaseMapper<ComMngStructAreaDO> {
- // @Select("<script> " +
-// " <where>" +
-// "<if test='nameCn != null and nameCn.trim() != ""'>" +
-// " </if> " +
-// "<if test='nameCn != null and nameCn.trim() != ""'>" +
-// " </if> " +
-// "<if test='nameCn != null and nameCn.trim() != ""'>" +
-// " </if> " +
-// " </where>" +
-// "</script>")
- @Select("<script> " +
- "SELECT\n" +
- "id,\n" +
- "area_name,\n" +
- "area_code,\n" +
- "address_detail,\n" +
- "create_at \n" +
- "FROM\n" +
- "com_mng_struct_area \n" +
- "WHERE 1=1 \n" +
- "<if test='comMngStructAreaVO.communityId != null '>" +
- "AND community_id=#{comMngStructAreaVO.communityId} \n" +
- " </if> " +
- "<if test='comMngStructAreaVO.areaName != null and comMngStructAreaVO.areaName.trim() != ""'>" +
- "AND area_name = concat( '%',#{comMngStructAreaVO.areaName}, '%' )" +
- " </if> " +
- "</script>")
+ // @Select("<script> " +
+ // " <where>" +
+ // "<if test='nameCn != null and nameCn.trim() != ""'>" +
+ // " </if> " +
+ // "<if test='nameCn != null and nameCn.trim() != ""'>" +
+ // " </if> " +
+ // "<if test='nameCn != null and nameCn.trim() != ""'>" +
+ // " </if> " +
+ // " </where>" +
+ // "</script>")
+ @Select("<script> " + "SELECT\n" + "id,\n" + "area_name,\n" + "area_code,\n" + "address_detail,\n" + "create_at \n"
+ + "FROM\n" + "com_mng_struct_area \n" + "WHERE 1=1 \n" + "<if test='comMngStructAreaVO.communityId != null '>"
+ + "AND community_id = ${comMngStructAreaVO.communityId} \n" + " </if> "
+ + "<if test='comMngStructAreaVO.areaName != null and comMngStructAreaVO.areaName.trim() != ""'>"
+ + "AND area_name like concat( '%',#{comMngStructAreaVO.areaName}, '%' )" + " </if> " + "</script>")
IPage<ComMngStructAreaVO> pageArea(Page page, @Param("comMngStructAreaVO") ComMngStructAreaVO comMngStructAreaVO);
- @Select("SELECT\n" +
- "\ta.id,\n" +
- "\ta.role_floor,\n" +
- "\ta.area_name,\n" +
- "\ta.role_connector,\n" +
- "\ta.role_door \n" +
- "FROM\n" +
- "\tcom_mng_struct_area a \n" +
- "WHERE\n" +
- "\ta.area_name LIKE CONCAT( '%', #{areaName}, '%' ) \n" +
- "\tAND a.community_id =#{communityId}")
- List<ComMngStructAreaVO> listAreas(@Param("areaName")String areaName, @Param("communityId")Long communityId);
+ @Select("SELECT\n" + "\ta.id,\n" + "\ta.role_floor,\n" + "\ta.area_name,\n" + "\ta.role_connector,\n"
+ + "\ta.role_door \n" + "FROM\n" + "\tcom_mng_struct_area a \n" + "WHERE\n"
+ + "\ta.area_name LIKE CONCAT( '%', #{areaName}, '%' ) \n" + "\tAND a.community_id = ${communityId}")
+ List<ComMngStructAreaVO> listAreas(@Param("areaName") String areaName, @Param("communityId") Long communityId);
+
@Select("select count(id) from com_mng_struct_house where parent_code=#{areaCode}")
Integer selectCountHouseByParentHouseCode(String areaCode);
}
--
Gitblit v1.7.1