package com.YuyeTech.HeartRate.service.impl;


import com.YuyeTech.HeartRate.dataobject.AdminInfo;
import com.YuyeTech.HeartRate.repository.AdminInfoRepository;
import com.YuyeTech.HeartRate.service.AdminInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AdminInfoServiceImpl implements AdminInfoService {

    @Autowired
    private AdminInfoRepository adminInfoRepository;

    @Override
    public AdminInfo findByNameAndPassword(String name, String password) {
        return adminInfoRepository.findByAdminNameAndAdminPassword(name,password).orElse(null);
    }
}
