package com.cool.store.mapper;

import com.cool.store.entity.ShopRentInfoDO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface ShopRentInfoMapper extends Mapper<ShopRentInfoDO> {

    /**
     * 根据店铺id获取租赁合同
     * @param shopId
     * @return
     */
    ShopRentInfoDO getRentContractByShopId(@Param("shopId") Long shopId);

    /**
     * 根据店铺id删除租赁合同
     * @param shopId
     * @return
     */
    Integer deleteRentContractByShopId(@Param("shopId") Long shopId);

    /**
     * 批量获取租赁合同
     * @param shopIds
     * @return
     */
    List<ShopRentInfoDO> getRentContractByShopIds(@Param("shopIds") List<Long> shopIds);

}