package com.iamberry.wechat.service.mapper;

import java.util.List;

import com.iamberry.wechat.core.entity.Page;
import com.iamberry.wechat.core.entity.member.Withdraw;


public interface WithdrawMapper {
	
	
	/**
	 * 查询总条数，和总金额
	 * @return
	 */
	List<Withdraw> selectWithDrawAllSumMoney(Page page);
	
	
	/**
	 * 根据用户条件查找
	 * @return
	 */
	List<Withdraw> selectWithDraw(Page page);
	/**
	 * 获取所有记录数量 
	 * @return
	 */
	Integer getCount();
	/**
	 * 更新一条提现记录
	 * @param withdraw
	 */
	void updateWithdraw(Withdraw withdraw );
	
	/**
	 * 添加一条申请记录
	 * @param withdraw
	 * @return
	 */
	public Integer insertApplyLogs(Withdraw withdraw);
	
	/**
	 * 分页查询提现记录
	 * @param page
	 * @return
	 */
	public List<Withdraw> selectLogsByOpenid(Page page);
	
	/**
	 * 分页的总数据
	 */
	public Integer selectLogsCountByOpenid(Page page);
	
	/**
	 * 根据ID，查询提现记录
	 * @param id
	 * @return
	 */
	public Withdraw selectWithdrawLogsById(Integer id);
	
	/**
	 * 修改提现记录
	 * @param withdraw
	 * @return
	 */
	public Integer updateWithdrawStatusById(Withdraw withdraw);
	
	/**
	 * 根据用户openid，获取当月申请提现记录次数
	 * @param withdraw
	 * @return
	 */
	public int selectUseLogsCount(Withdraw withdraw);
}