package com.muyu.car.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.muyu.car.domain.CarMessage;
import com.muyu.car.mapper.SysCarMessageMapper;
import com.muyu.car.service.SysCarMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysCarMessageServiceImpl extends ServiceImpl<SysCarMessageMapper, CarMessage> implements SysCarMessageService {

    @Autowired
    private SysCarMessageMapper sysCarMessageMapper;
    /**
     * 查询所有报文信息
     * @param templateId
     * @return
     */
    @Override
    public List<CarMessage> selectMessageShow(Long templateId) {
        return sysCarMessageMapper.selectMessageShow(templateId);
    }

    /**
     * 通过id查询报文信息
     * @param messageId
     * @return
     */
    @Override
    public CarMessage selectMessageByMessageId(Long messageId) {
        return sysCarMessageMapper.selectById(messageId);
    }
}
