Merge remote-tracking branch 'origin/master'

master
白封羽 2022-07-07 12:06:17 +08:00
commit 5bcf064ae9
1 changed files with 12 additions and 0 deletions

View File

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