package com.td.Dawa.game.excelscene.service;

import com.td.Dawa.common.service.*;
import com.td.Dawa.game.excelscene.pojo.ExcelScene;
import com.td.Dawa.game.excelscene.vo.ExcelSceneVo;
import com.td.Dawa.game.excelscene.repository.ExcelSceneRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

@Service
@Transactional
public class ExcelSceneServiceImpl extends CommonServiceImpl<ExcelSceneVo, ExcelScene, Integer> implements ExcelSceneService{

    @PersistenceContext
    private EntityManager em;
    @Autowired
    private ExcelSceneRepository excelSceneRepository;

    @Override
    public ExcelScene findBySceneId(Integer sceneId) {
        return excelSceneRepository.findBySceneId(sceneId).orElse(null);
    }
}
