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

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

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

@Repository
public interface ParkingApplyDAO {
	int insert(ParkingApply entity);
	int update(ParkingApply entity);
	int exist(String id);
	ParkingApply get(String id);
	int delete(String id);
	List<ParkingApply> list();
	List<ParkingApply> search(Map<String, Object> searchParams, List<Sort> sortList);

    ParkingApply findByPopedomIdAndStatus(@Param("popedomId") String popedomId, @Param("status") String status);

	ParkingApply findByPopedomIdAndPayStatus(@Param("popedomId") String popedomId, @Param("payStatus") int payStatus);

    ParkingApply findByOrderId(String orderId);

    List<ParkingApply> findByPopedomId(String popedomId);
}