22301102 | aa5adbc | 2025-05-18 17:51:55 +0800 | [diff] [blame^] | 1 | package com.pt.service; |
| 2 | |
| 3 | import com.pt.entity.Admin; |
| 4 | import org.springframework.beans.factory.annotation.Autowired; |
| 5 | import org.springframework.stereotype.Service; |
| 6 | |
| 7 | import com.pt.repository.AdminRepository; |
| 8 | |
| 9 | @Service |
| 10 | public 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 | } |