package com.tykj.dev.device.matching.service.impl;

import com.tykj.dev.device.matching.repository.MatchingDeviceModelDao;
import com.tykj.dev.device.matching.service.MatchingDeviceModelService;
import com.tykj.dev.device.matching.subject.domin.MatchingDeviceModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MatchingDeviceModelServiceImpl implements MatchingDeviceModelService {

    @Autowired
    private MatchingDeviceModelDao matchingDeviceModelDao;

    @Override
    public MatchingDeviceModel addEntity(MatchingDeviceModel matchingDeviceModel) {
        return matchingDeviceModelDao.save(matchingDeviceModel);
    }

    @Override
    public MatchingDeviceModel findByModel(String model) {
        return matchingDeviceModelDao.findByModel(model);
    }

    @Override
    public MatchingDeviceModel findByModelAndName(String model, String name) {
        return matchingDeviceModelDao.findByModelAndName(model,name);
    }
}
