package com.td.boss.game.comconfigland.service;

import com.td.boss.common.service.*;
import com.td.boss.game.comconfigland.pojo.ComConfigLand;
import com.td.boss.game.comconfigland.vo.ComConfigLandVo;
import com.td.boss.game.comconfigland.repository.ComConfigLandRepository;
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;
import java.util.List;

@Service
@Transactional
public class ComConfigLandServiceImpl extends CommonServiceImpl<ComConfigLandVo, ComConfigLand, Integer> implements ComConfigLandService{

    @PersistenceContext
    private EntityManager em;
    @Autowired
    private ComConfigLandRepository comConfigLandRepository;


    @Override
    public ComConfigLand findById(Integer id) {
        return comConfigLandRepository.findById(id).orElse(null);
    }

    @Override
    public List<ComConfigLand> findConfigLandAll() {
        return comConfigLandRepository.findAll();
    }
}
