package com.cloudcross.ssp.service;

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

import com.cloudcross.ssp.model.OperatorBalance;
import com.cloudcross.ssp.base.service.IGenericService;
import com.cloudcross.ssp.common.utils.Pager;

/**
 * 提现记录服务接口定义
 * @author chenyou
 *
 */
public interface IOperatorBalanceService extends IGenericService<OperatorBalance> {
	/**
	 * 根据运营商id查询该运营商已提现成功的总金额
	 */
	Float findSumAmountByOperatorId(Long operatorId);
	
	/**
	 * 根据运营商id查询上一条记录的可提现金额
	 */
	Float findAvailableMoney(Long operatorId);
	
	public boolean updateStatus(List<Long> idList, String reason, int status);
	
		//导出excel
	List<OperatorBalance> findFinancial(Map<String, Object> paramMap);
	List<OperatorBalance> findByParams(Map<String, Object> paramMap);
	
	/**
	 * 根据提现记录表的id将审核不通过的提现金额返还给运营商
	 */
	public boolean moneyBackToOperator(Long id);

	int countByParamsOperator(Map<String, Object> paramMap);

	List<OperatorBalance> findByParamsOperator(Map<String, Object> paramMap,
			Pager pager);
	
	/**
	 * 审核不通过时，将该条提现记录的状态设为不通过并且把提现金额加回去
	 * @param paramMap
	 * @return
	 */
	boolean failureAudit(Map<String, Object> paramMap);
	
	
}
