package com.ssj.service.weixin.story.service;

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

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import com.ssj.bean.weixin.story.bean.StoryCard;
import com.ssj.framework.core.common.service.BaseService;


public interface StoryCardService  extends BaseService<StoryCard, String> {

	public  Page<StoryCard>  findByPage(Map<String, Object> params, Pageable sp);
	
	public Integer  getUserCount(String userId,String storyId);
	 /**
	  * 打卡的天数
	  * @param userId
	  * @return
	  */
	public Integer  punchCardDays(String userId);
	/**
	  * 获取打卡的总人数
	  * @param userId
	  * @return
	  */
	 public Integer  getUserCard();
	 /**
	  * 查询有多少人打卡
	  * @param storyId
	  * @return
	  */
	 public Integer  getStoryIdCount(String storyId);
	 /**
	  * 获取全部的打卡记录
	  * @param userId
	  * @param storyId
	  * @return
	  */
	 public List<Integer> getStoryCardDayNum(String storyId,String userId);
	 
	 public StoryCard saveStoryCard(StoryCard storyCard,String recording_localId ,String recording_serverId) throws Exception;
	 
	 public void  updateStoryCardVoice(StoryCard storyCard);
	 
	 public List<Map<String,Object>> findByStoryTaskId(String storyTaskId);
	 /**
	  * 周打卡数据
	 * @param storyTaskId
	 * @param num
	 * @return
	 * 创建人：ZhangCaibao 
	 * 2017年9月20日 上午11:32:54 
	 * @List<Map<String,Object>>
	  */
	 public List<Map<String,Object>> findByStoryIdAndNum(String storyId,String num,String userId);
	 
	 /**
	  * 
	  * 查出用户的storyTaskId的列表，或者storyTaskId==null当天的列表
	  * @param userId
	  * @param storyTaskId
	  * @return
	  */
	 public List<Map<String,Object>> findByUserIdList(String userId,String storyTaskId);
	 
	 
}
