fix 报名截止时间精确到时分
This commit is contained in:
@@ -163,9 +163,9 @@ public class PayMeeting implements Serializable {
|
||||
private String meetingContent;
|
||||
|
||||
/**报名截止时间*/
|
||||
@Excel(name = "报名截止时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "报名截止时间", width = 20, format = "yyyy-MM-dd HH:mm")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
|
||||
@ApiModelProperty(value = "报名截止时间")
|
||||
private java.util.Date registerDeadline;
|
||||
|
||||
|
||||
+4
-2
@@ -1,5 +1,6 @@
|
||||
package com.jero.meeting.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateField;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
@@ -272,10 +273,11 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
||||
String meetingId = payMeetingSituation.getMeetingId();
|
||||
PayMeeting payMeeting = meetingService.getById(meetingId);
|
||||
//判断报名时间
|
||||
Date registerDeadline = payMeeting.getRegisterDeadline();
|
||||
DateTime registerDeadline = DateUtil.endOfSecond(payMeeting.getRegisterDeadline());
|
||||
registerDeadline.offset(DateField.SECOND,59);
|
||||
DateTime date = DateUtil.date();
|
||||
if ((DateUtil.compare(date, registerDeadline) > 0)) {
|
||||
throw new JeroBootException("报名截止时间为:" + DateUtil.formatDate(registerDeadline));
|
||||
throw new JeroBootException("报名截止时间为:" + DateUtil.format(registerDeadline,"yyyy-MM-dd HH:mm"));
|
||||
}
|
||||
//会议类型
|
||||
Integer meetingType = payMeeting.getMeetingType();
|
||||
|
||||
@@ -148,9 +148,9 @@ public class PayMeetingVO implements Serializable {
|
||||
private String meetingContent;
|
||||
|
||||
/**报名截止时间*/
|
||||
@Excel(name = "报名截止时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "报名截止时间", width = 20, format = "yyyy-MM-dd HH:mm")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
|
||||
@ApiModelProperty(value = "报名截止时间")
|
||||
@NotNull(message = "报名截止时间不能为空")
|
||||
private java.util.Date registerDeadline;
|
||||
|
||||
Reference in New Issue
Block a user