package com.diagbot.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.diagbot.dto.RenewalsInfosDTO;
import com.diagbot.entity.UserRenewals;
import com.diagbot.entity.wrapper.UserRenewalsWrapper;
import org.apache.ibatis.annotations.Param;

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

/**
 * <p>
 * 用户续费申请表 Mapper 接口
 * </p>
 *
 * @author gaodm
 * @since 2018-10-12
 */
public interface UserRenewalsMapper extends BaseMapper<UserRenewals> {
    /**
     * 根据用户id查询用户提交续费申请的产品id
     * @param map
     * @return
     */
    public List<Long> selectProductIdByUserId(@Param("map") Map<String,Long> map);

    /**
     * 查询续费相关信息系
     * @param page
     * @param userRenewalsWrapper
     * @return
     */
    public IPage<RenewalsInfosDTO> selectUserRenewals(Page page,@Param("renewalsInfosVO") UserRenewalsWrapper userRenewalsWrapper);

    
    /**
     * 根据续费单号修改续费状态
     * @param userRenewals
     * @return
     */
    public boolean updateRenewalStatus(UserRenewals userRenewals);
}
