package com.iformall.mapper;

import com.iformall.common.CommonMapper;
import com.iformall.domain.po.WxBillRent;
import com.iformall.domain.po.WxBusiness;
import com.iformall.domain.po.WxRentContract;
import com.iformall.domain.vo.WxRentPropertyContractVo;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * @author gongbiao
 */
public interface WxRentContractMapper extends CommonMapper<WxRentContract, Long> {

	List<WxRentContract> findList(WxRentContract wxRentContract);

    List<Map<String,Object>> queryRentContractData(WxRentContract wxRentContract);

    int queryRentContractWaitSignStatus(WxRentContract wxRentContract);

    int queryRentContractEndSoonStatus(WxRentContract wxRentContract);

    int queryRentContractPaidStatus(WxRentContract wxRentContract);

    int queryRentContractEndStatus(WxRentContract wxRentContract);

    int updateRentContractEndSoonStatus(WxRentContract wxRentContract);

    int updateRentContractPaidStatus(WxRentContract wxRentContract);

    int updateRentContractEndStatus(WxRentContract wxRentContract);

    void updateRentWaitSignStatus(WxRentContract wxRentContract);

    void updateRentInvalidStatus(WxRentContract wxRentContract);

    List<WxRentContract> getRentContractList(WxRentContract tenantId);

    void updateStatusForUnsign(WxRentContract wxRentContract);

    void updateApplyStatus(WxRentContract wxRentContract);

    List<WxRentContract> getRentInvalidList(WxRentContract wxRentContract);

    void updateStatus(WxRentContract wxRentContract);

    long queryOweCount(WxRentContract wxRentContract);

    List<WxRentContract> getMerchants(WxRentContract wxRentContract);

    int selectRentContractCountByShopId(WxRentContract wxRentContract);

    void updateInvalidContract(WxRentContract record);

    List<WxRentContract> selectRentContractByMerchantId(WxRentContract wxRentContract);

    List<WxRentContract> selectRentContractByShopId(WxRentContract record);

    List<WxRentContract> selectRentContractByShopIds(@Param("shopIds") Collection<Long> shopIds,
                                                     @Param("shopIdsRegexp") String shopIdsRegexp,@Param("tenantId") String tenantId);

    int hasContractNumber(WxRentContract wxRentContract);

    Integer getShopType(WxRentContract wxRentContract);

    List<WxRentPropertyContractVo> listContractVo(WxRentPropertyContractVo record);

    WxRentContract getByBill(WxBillRent billRent);

    int selectContractCountByShopId(WxRentContract wxRentContract);
    int getShopCountMax();

    List<Map<String,Object>> queryContractByBus(WxBusiness wxBusiness);

}
