|
@@ -25,6 +25,7 @@ import com.gis.common.util.BaseUtil;
|
|
|
import com.gis.common.util.Result;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.junit.Test;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -71,7 +72,9 @@ public class GameLogServiceImpl extends ServiceImpl<GameLogMapper, GameLogEntity
|
|
|
RoomEntity roomEntity = roomService.getById(roomId);
|
|
|
BaseRuntimeException.isNull(roomEntity, ErrorEnum.FAILURE_SYS_2001);
|
|
|
LocalDateTime endTime = roomEntity.getEndTime();
|
|
|
- BaseRuntimeException.isTrue(endTime.isBefore(LocalDateTime.now()) , null, "活动已结束");
|
|
|
+ LocalDateTime now = LocalDateTime.now();
|
|
|
+ log.info("房间结束时间:{}, 提交答案时间:{}", endTime, now);
|
|
|
+ BaseRuntimeException.isTrue(endTime.isBefore(now) , null, "活动已结束");
|
|
|
|
|
|
entity = this.getById(param.getGameLogId());
|
|
|
BaseRuntimeException.isNull(entity, ErrorEnum.FAILURE_SYS_2001);
|
|
@@ -214,4 +217,11 @@ public class GameLogServiceImpl extends ServiceImpl<GameLogMapper, GameLogEntity
|
|
|
}
|
|
|
|
|
|
|
|
|
+ @Test
|
|
|
+ public void test(){
|
|
|
+ LocalDateTime now = LocalDateTime.now();
|
|
|
+ LocalDateTime time = now.plusMinutes(10);
|
|
|
+ System.out.println("结果:" + now.isBefore(time));
|
|
|
+ }
|
|
|
+
|
|
|
}
|