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

import com.td.boss.common.service.*;
import com.td.boss.game.combossesdescribe.pojo.ComBossesDescribe;
import com.td.boss.game.combossesdescribe.vo.ComBossesDescribeVo;
import com.td.boss.game.combossesdescribe.repository.ComBossesDescribeRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Sort;
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 ComBossesDescribeServiceImpl extends CommonServiceImpl<ComBossesDescribeVo, ComBossesDescribe, Integer> implements ComBossesDescribeService{

    @PersistenceContext
    private EntityManager em;
    @Autowired
    private ComBossesDescribeRepository comBossesDescribeRepository;

    @Override
    public List<ComBossesDescribe> findAllByDescId() {
        return comBossesDescribeRepository.findAll(Sort.by(Sort.Direction.ASC,"id"));
    }
}
