package com.bizzan.bitrade.dao;

import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;

import com.bizzan.bitrade.dao.base.BaseDao;
import com.bizzan.bitrade.entity.GameAdmit;
import com.bizzan.bitrade.entity.GameRecord;

public interface GameAdmitDao extends BaseDao<GameAdmit> {

	@Transactional
    @Modifying
    @Query("update GameAdmit admit set admit.admitStatus = 1 where admit.id = :id")
	int updateAdmitStatus(@Param("id") long id);
	
	GameAdmit findByOrder(GameRecord order);
}
