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.entity.property.PropertyShareFee;
import com.yuchen.saas.park.api.vo.property.PropertyShareFeeListVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface PropertyShareFeeMapper extends BaseMapper<PropertyShareFee> {

    @Select("SELECT p.park_name,fs.fee_name,sf.* " +
            " from property_share_fee sf" +
            " LEFT JOIN pmg_bat_park_info p on sf.park_id = p.id" +
            " LEFT JOIN property_fee_standard fs on sf.fee_id = fs.id" +
            " ${ew.customSqlSegment}")
    Page<PropertyShareFeeListVo> selectShareFeePage(Page<PropertyShareFeeListVo> page, @Param(Constants.WRAPPER) Wrapper<String> wrapper);

}
