22301102 | d526daa | 2025-06-07 10:53:27 +0800 | [diff] [blame^] | 1 | package com.pt.service; |
2 | |||||
3 | import com.pt.repository.InvitedCoedRepository; | ||||
4 | import org.springframework.beans.factory.annotation.Autowired; | ||||
5 | import org.springframework.stereotype.Service; | ||||
6 | |||||
7 | @Service | ||||
8 | public class InvitedCodeService { | ||||
9 | |||||
10 | @Autowired | ||||
11 | private InvitedCoedRepository invitedCodeRepository; | ||||
12 | |||||
13 | public boolean isCodeValid(String code) { | ||||
14 | return invitedCodeRepository.findByCode(code) != null; | ||||
15 | } | ||||
16 | } |