package com.micer.easyball.service.Impl;

import com.micer.easyball.mapper.EventMapper;
import com.micer.easyball.pojo.Event;
import com.micer.easyball.pojo.ResponseResult;
import com.micer.easyball.service.EventService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EventServiceImpl implements EventService {

    @Autowired
    EventMapper eventMapper;

    @Override
    public ResponseResult getEvents() {
        List<Event> eventList = eventMapper.selectList(null);
        return new ResponseResult(200, "成功", eventList);
    }
}
