package com.ruoyi.demo.service.impl;


import com.ruoyi.demo.entity.ManageType;
import com.ruoyi.demo.mapper.ManageTypeDao;
import com.ruoyi.demo.service.ManageTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class ManageTypeServiceImpl implements ManageTypeService {
    @Autowired
    ManageTypeDao manageTypeDao;
    @Override
    public void writeData(List<ManageType> list) {
        for (ManageType manageType : list) {
            manageTypeDao.insert(manageType);
        }

    }

    @Override
    public List<ManageType> getData() {
        return manageTypeDao.selectList(null);
    }
}
