Commit 06b22254 by 高鹏

Merge branch 'mymaster' into 'master'

C1000805_微信群群发支持计划式多次发送,增加时间判断

See merge request rays/pcloud-book!16
parents 9f8ceb83 c2f6446a
......@@ -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