package com.bofeng.dao; import com.baomidou.mybatisplus.mapper.BaseMapper; import com.bofeng.entity.Uptown; import com.yvan.PageDb; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import org.springframework.stereotype.Repository; import java.util.List; import java.util.Map; @Mapper @Repository public interface UptownMapper extends BaseMapper { @Select("select * from sys_uptown where status = 1 and area = #{area}") List getAllUptown(@Param("area") Integer area); List getUptowns(PageDb pageDb, Map queryParam); List getUptowns(Map queryParam); @Select("select * from sys_uptown u INNER JOIN sys_uptown_unit uu on uu.uptown_id = u.uptown_id INNER JOIN sys_uptown_house uh on uh.unit_id = uu.unit_id where uh.house_id = #{houseId}") Uptown getUptownByHouseId(@Param("houseId")Long houseId); }