| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.data.domain.Sort; |
| | | import org.springframework.data.domain.Sort; |
| | | import java.util.Optional; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.util.StringUtils; |
| | | import org.slf4j.Logger; |
| | |
| | | .orElse(null); |
| | | } |
| | | |
| | | /** |
| | | * 根据用户ID获取评委信息 |
| | | */ |
| | | public Judge findByUserId(Long userId) { |
| | | Optional<Judge> judge = judgeRepository.findByUserId(userId); |
| | | return judge.orElse(null); |
| | | } |
| | | |
| | | @Transactional |
| | | public JudgeResponse save(JudgeInput input) { |
| | | Judge judge; |