package com.jpsoft.shinestar.modules.base.dao;

import java.util.Date;
import java.util.List;

import com.jpsoft.shinestar.modules.base.entity.CanteenDiningRecord;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.Map;
import com.jpsoft.shinestar.modules.common.dto.Sort;

@Repository
public interface CanteenDiningRecordDAO {
	int insert(CanteenDiningRecord entity);
	int update(CanteenDiningRecord entity);
	int exist(String id);
	CanteenDiningRecord get(String id);
	int delete(String id);
	List<CanteenDiningRecord> list();
	int findCountByPersonId(Long personId);
	List<CanteenDiningRecord> findByPersonId(Long personId);
	int findCountByPersonIdAndAddress(@Param("searchParams")Map<String,Object> searchParams);
	CanteenDiningRecord lastEatTime(Long personId);
	CanteenDiningRecord findByPersonIdAndRecordTime(@Param("personId") long personId, @Param("startTime")Date startTime, @Param("endTime")Date endTime);
	List<CanteenDiningRecord> search(Map<String,Object> searchParams,List<Sort> sortList);
	List<Map> canteenDiningRecordDetailList(Map<String,Object> searchParams,List<Sort> sortList);
	List<Map> canteenDiningRecordCompanyList(Map<String,Object> searchParams,List<Sort> sortList);
	List<Map> canteenDiningRecordCompanyDetail(Map<String,Object> searchParams,List<Sort> sortList);

	List<Map> canteenDiningRecordDetail(Map<String,Object> searchParams,List<Sort> sortList);


	List<Map> canteenHqPersonList(Map<String,Object> searchParams,List<Sort> sortList);

}