package com.palmnest.dao.estateserve;

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

import org.springframework.ui.ModelMap;

import com.palmnest.application.bean.Pagenation;
import com.palmnest.model.estateserve.Product;

/**
 * 充值数据接口
 *
 * @author xiemin
 */
public interface RechargeWebDao {

	/**
	 * 查询充值列表
	 *
	 * @param modelMap
	 * @return
	 * @throws Exception
	 */
	public Pagenation<Map<String, String>> queryRechargeList(ModelMap modelMap) throws Exception;

	/**
	 * 查询产品列表
	 *
	 * @param modelMap
	 * @return
	 */
	public Pagenation<Map<String, String>> queryProductList(ModelMap modelMap) throws Exception;

	/**
	 * 添加产品
	 *
	 * @param pro
	 * @return
	 * @throws Exception
	 */
	public int addProduct(Product pro) throws Exception;

	/**
	 * 更新产品信息
	 *
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public int updateProduct(Map<String, String> map) throws Exception;

	/**
	 * 上架下架
	 *
	 * @param map
	 * @return
	 */
	public int updateAvailable(Map<String, String> map) throws Exception;

	/**
	 * 根据类型和产品名称查询列表
	 *
	 * @param serviceCode
	 * @param type
	 * @return
	 */
	public List<Map<String, String>> findProduct(String serviceCode, String type);

}
