package com.huiju.estateagents.property.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.huiju.estateagents.property.model.TaUserLicenseOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;

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

/**
 * <p>
 * 月租车缴费订单表 Mapper 接口
 * </p>
 *
 * @author jobob
 * @since 2019-05-13
 */
@Mapper
public interface TaUserLicenseOrderMapper extends BaseMapper<TaUserLicenseOrder> {

    /**
     * 分页查询
     * @param communityId
     * @param pageNum
     * @param pageSize
     * @return
     */
    @ResultType(TaUserLicenseOrder.class)
    @Select("select * from ta_user_license_order where community_id = #{communityId} limit #{pageNum},#{pageSize}")
    List<TaUserLicenseOrder> getLicensePage(@Param("communityId") Integer communityId, @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize);

    /**
     * 查询总数
     * @param communityId
     * @return
     */
    @ResultType(Integer.class)
    @Select("select count(*) from ta_user_license_order where community_id = #{communityId}")
    Integer getCount(@Param("communityId") Integer communityId);
    
    
    List<Map<String, Object>> getPriceCount();
}
