package com.xhkjedu.sapi.service.system;

import com.xhkjedu.sapi.mapper.system.SyserrorMapper;
import com.xhkjedu.sapi.model.system.TSyserror;
import com.xhkjedu.utils.N_Utils;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author ywx
 * @classname SyserrorService
 * @description 
 * @date 2020/10/9 15:17
 **/
@Service
public class SyserrorService {
    @Resource
    private SyserrorMapper syserrorMapper;

    //添加
    public Integer save(TSyserror model) {
        model.setCreatetime(N_Utils.getSecondTimestamp());
        syserrorMapper.insertUseGeneratedKeys(model);
        return model.getId();
    }

    //获取列表
    public List <TSyserror> listAll(TSyserror error) {
        return syserrorMapper.listAll(error);
    }
}
