package com.iamberry.wechat.service.mapper;

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

import com.iamberry.wechat.core.entity.flow.TemplateFlowInfo;
import com.iamberry.wechat.core.entity.flow.TemplateReward;

public interface TemplateFlowInfoMapper {

	/**
	 * 根据条件查看返利节点表数据
	 * @param templateFlowInfo
	 * @return
	 * @author liuzhiwei
	 */
	public TemplateFlowInfo getTemplateFlowInfo(TemplateFlowInfo templateFlowInfo);

	/**
	 * 根据条件查看返利节多个点表数据
	 * @param templateFlowInfo
	 * @return
	 * @author liuzhiwei
	 */
	public List<TemplateFlowInfo> getTemplateFlowInfos(Map templateFlowInfo);
	/**
	 * 根据templateId获取模板所有的节点
	 * @param templateId
	 * @return
	 */
	public List<TemplateFlowInfo>  getFlowInfoListByTemplateId(Integer templateId);
	
	
	/**
	 * 批量添加返利节点内容
	 * @param templateFlowList
	 * @return
	 * @author liuzhiwei
	 */
	public Integer addTemplateFlowList(List<TemplateFlowInfo> templateFlowList);
	
	/**
	 * 批量修改返利节点内容
	 * @param templateFlowList
	 * @return
	 * @author liuzhiwei
	 */
	public Integer updateTemplateFlowInfo(List<TemplateFlowInfo> templateFlowList);
	
	/**
	 * 根据模板id，获取已经添加了的产品类型ID
	 * @param tid
	 * @return
	 */
	public List<Integer> getTypeId(Integer tid);
	
	/**
	 * 按产品类型查询大于此数量的奖励信息
	 * @param templateReward
	 * @return
	 */
	public List<TemplateReward> selectRewardList(TemplateReward templateReward);
	
	/**
	 * 按产品类型查询奖励信息,属于逻辑上最小值
	 * @param templateReward
	 * @return
	 */
	public TemplateReward selectRewardMin(TemplateReward templateReward);

}
