package com.YuyeTech.TPlat.service.impl;


import com.YuyeTech.TPlat.dataobject.AdminInfo;
import com.YuyeTech.TPlat.repository.AdminInfoRepository;
import com.YuyeTech.TPlat.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);
    }
}
