package com.yuchen.saas.park.service.mapper.property;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yuchen.saas.park.api.dto.property.PropertyBindHouseTreeQueryDto;
import com.yuchen.saas.park.api.dto.property.PropertyHouseBindFeeQueryDto;
import com.yuchen.saas.park.api.entity.property.PropertyHouseBindFee;
import com.yuchen.saas.park.api.vo.property.PropertyHouseBindFeeListVo;
import com.yuchen.saas.park.api.vo.property.PropertyHouseBindListVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author 蔡文强
 * @Date 2023/11/28 10:56
 * @Description 房源绑定收费标准 Mapper 接口
 */
public interface PropertyHouseBindFeeMapper extends BaseMapper<PropertyHouseBindFee> {
    Page<PropertyHouseBindFeeListVo> getHouseBindFeePageList(Page<PropertyHouseBindFeeListVo> page, @Param("queryDto") PropertyHouseBindFeeQueryDto queryDto);
    List<PropertyHouseBindFeeListVo> getHouseBindFeeList(@Param("queryDto") PropertyHouseBindFeeQueryDto queryDto);
    List<PropertyHouseBindListVo> getHouseBindList(@Param("queryDto") PropertyBindHouseTreeQueryDto queryDto);
    @Select("SELECT hbf.*" +
            " from property_house_bind_fee hbf" +
            " LEFT JOIN property_fee_standard fs on hbf.fee_standard_id = fs.id" +
            " ${ew.customSqlSegment}")
    Page<PropertyHouseBindFee> searchHouseBindCycleFeePage(Page<PropertyHouseBindFee> page, @Param(Constants.WRAPPER) Wrapper<String> wrapper);
}
