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; /** * @program: springcloud_k8s_panzhihuazhihuishequ * @description: 小区 * @author: huang.hongfa weixin hhf9596 qq 959656820 * @create: 2020-12-14 17:00 **/ @Mapper public interface ComMngStructAreaDAO extends BaseMapper { // @Select("") @Select("") IPage 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 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); }