blob: a4ce98aa2002f74f8d827fb9cf19ee2c783a1293 [file] [log] [blame]
22301102aa5adbc2025-05-18 17:51:55 +08001package com.pt.service;
2
3import com.pt.entity.Admin;
4import org.springframework.beans.factory.annotation.Autowired;
5import org.springframework.stereotype.Service;
6
7import com.pt.repository.AdminRepository;
8
9@Service
10public class AdminService {
11
12 @Autowired
13 private AdminRepository adminRepository;
14
15 public AdminService(AdminRepository adminRepository) {
16 this.adminRepository = adminRepository;
17 }
18
19 public Admin findByUsernameAndPassword(String username, String password) {
20 return adminRepository.findByUsernameAndPassword(username, password);
21 }
22
23}