增加了Project的时间验证

master
yang.yongquan 2022-07-07 11:56:57 +08:00
parent 9690fff08e
commit f64a11374f
1 changed files with 12 additions and 0 deletions

View File

@ -1,5 +1,6 @@
package cn.edu.hfut.rmdjzz.projectmanagement.entity;
import cn.edu.hfut.rmdjzz.projectmanagement.utils.TimeUtils;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
@ -45,4 +46,15 @@ public class Project {
private Integer projectCreator;
private LocalDateTime projectCreatedTime;
private LocalDate projectClosedDate;
Boolean checkProjectDate() {
if(!TimeUtils.validateTimeLine(projectStartDate, projectFirstTestDate, projectClosedDate, projectEndDate)) {
return false;
}
if(!TimeUtils.validateTimeLine(projectStartDate, projectOnlineDate)) {
return false;
}
return true;
}
}