优化
This commit is contained in:
@ -126,6 +126,15 @@ public class BgtProjectRecruitServiceImpl extends ServicePlusImpl<BgtProjectRecr
|
||||
* @param entity 实体类数据
|
||||
*/
|
||||
private void validEntityBeforeSave(BgtProjectRecruit entity){
|
||||
|
||||
if (entity.getRecruitEndTime().isBefore(entity.getRecruitBeginTime())){
|
||||
throw new BaseException("报名截止时间不能早于开始时间");
|
||||
}
|
||||
|
||||
if(entity.getRecruitEndTime().isBefore(LocalDate.now())){
|
||||
throw new BaseException("报名截止时间不能早于当前时间");
|
||||
}
|
||||
|
||||
if(entity.getId()!=null){
|
||||
BgtProjectRecruit recruit = getById(entity.getId());
|
||||
if(recruit == null) {
|
||||
|
Reference in New Issue
Block a user