Commit 046180d3 by 裴大威

Merge branch 'master' of http://192.168.89.173/rays/pcloud-book

parents 707d39ea 06b22254
......@@ -37,6 +37,15 @@ public class PushCheck {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "群发类型不能为空!");
}
checkPushTime(push);
if (push.getStartTime() != null && (push.getStartTime().getTime() - DateUtils.getDayStart(new Date()).getTime() < 0)) {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "开始时间必须在现在时间之后!");
}
if (push.getEndTime() != null && (push.getEndTime().getTime() - System.currentTimeMillis() <= 0)) {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "结束时间必须在现在时间之后!");
}
if (push.getStartTime() != null && push.getEndTime() != null && push.getStartTime().getTime() - push.getEndTime().getTime() > 0) {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "开始时间必须在结束时间之前!");
}
if (ListUtils.isEmpty(push.getPushGroups())) {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "发送群不能为空!");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment