|
|
@@ -256,6 +256,9 @@ public class RoomService {
|
|
|
|
|
|
public void uploadResult(Long userId, Long roomId, String screenShot, MultipartFile file) throws IOException {
|
|
|
Room room = roomRepo.findById(roomId).orElseThrow(new BusinessException("房间无记录"));
|
|
|
+ if (LocalDateTime.now().isBefore(room.getStartAt().plusMinutes(10))) {
|
|
|
+ throw new BusinessException("比赛时间过短:10分钟");
|
|
|
+ }
|
|
|
if (room.isNeedAudit()) {
|
|
|
if (!(room.getStatus() == RoomStatus.GAMING || room.getStatus() == RoomStatus.AUDIT)) {
|
|
|
throw new BusinessException("当前房间状态无法上传截图");
|