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

import com.td.boss.common.service.*;
import com.td.boss.game.comequiptype.pojo.ComEquipType;
import com.td.boss.game.comequiptype.vo.ComEquipTypeVo;
import com.td.boss.game.comequiptype.repository.ComEquipTypeRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
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 ComEquipTypeServiceImpl extends CommonServiceImpl<ComEquipTypeVo, ComEquipType, Integer> implements ComEquipTypeService{

    @PersistenceContext
    private EntityManager em;
    @Autowired
    private ComEquipTypeRepository comEquipTypeRepository;

    @Override
    @Cacheable(value = "comEquipTypeAll")
    public List<ComEquipType> findAllComEquipType() {
        return comEquipTypeRepository.findAll();
    }
}
