浏览代码

全景看看

lyhzzz 4 月之前
父节点
当前提交
b09cac3422
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      src/main/java/com/fdkankan/manage/service/impl/AuthorizeRtkServiceImpl.java

+ 8 - 0
src/main/java/com/fdkankan/manage/service/impl/AuthorizeRtkServiceImpl.java

@@ -71,6 +71,14 @@ public class AuthorizeRtkServiceImpl extends ServiceImpl<IAuthorizeRtkMapper, Au
         DateTime startDate = DateUtil.parse(startTime);
         DateTime endDate = DateUtil.parse(endTime);
         if(rtkDevice.getValidStartTime() != null && rtkDevice.getValidEndTime() != null){
+
+            if(startDate.isBefore(rtkDevice.getValidStartTime())){
+                throw new BusinessException(ResultCode.RTK_TIME_ERROR);
+            }
+            if(endDate.isBefore(rtkDevice.getValidEndTime())){
+                throw new BusinessException(ResultCode.RTK_TIME_ERROR);
+            }
+
             if(DateUtil.isIn(startDate,rtkDevice.getValidStartTime(),rtkDevice.getValidEndTime())){
                 throw new BusinessException(ResultCode.RTK_TIME_ERROR);
             }