package org.example.service;

import org.example.entity.AdminUser;
import org.example.mapper.AdminUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AdminUserService {
    
    @Autowired
    private AdminUserMapper adminUserMapper;
    
    public boolean authenticate(String username, String password) {
        AdminUser adminUser = adminUserMapper.findByUsername(username);
        if (adminUser != null && adminUser.getPassword().equals(password)) {
            return true;
        }
        return false;
    }
}