package com.muyu.server.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.muyu.common.domain.WarnLogs;
import com.muyu.common.domain.resp.WarnLogsResp;
import com.muyu.server.mapper.WarnLogsMapper;
import com.muyu.server.service.WarnLogsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 预警日志Service业务层处理
 *
 * @author muyu
 * @date 2024-09-20
 */
@Service
public class WarnLogsServiceImpl
        extends ServiceImpl<WarnLogsMapper, WarnLogs>
        implements WarnLogsService {
    @Autowired
    private WarnLogsMapper warnLogsMapper;

    /**
     * 精确查询预警日志
     *
     * @param id 预警日志主键
     * @return 预警日志
     */
    @Override
    public WarnLogsResp selectWarnLogsById(Long id)
    {
       return warnLogsMapper.selectWarnLogs(id);
    }


    /**
     * 查询预警日志列表
     * @return 预警日志
     */
    @Override
    public List<WarnLogsResp> selectWarnLogsList()
    {
        return warnLogsMapper.selectWarnLogsList();
    }

    @Override
    public Integer addWarnLogs(WarnLogs warnLogs) {
        return warnLogsMapper.insert(warnLogs);
    }


}
