Commit f6bdf752 by 水库浪子

修改消息群发,前端时间为空,消息无法立即发送问题

1 parent 911896e7
......@@ -74,17 +74,24 @@ public class WeCustomerMessagePushServiceImpl implements IWeCustomerMessagePushS
@Transactional(rollbackFor = Exception.class)
public void addWeCustomerMessagePush(CustomerMessagePushDto customerMessagePushDto) throws JsonProcessingException, ParseException {
if ((null != customerMessagePushDto.getSettingTime() && !"".equals(customerMessagePushDto.getSettingTime()))
&& DateUtils.diffTime(new Date(), DateUtil.parse(customerMessagePushDto.getSettingTime(), "yyyy-MM-dd HH:mm")) > 0) {
throw new WeComException("发送时间不能小于当前时间");
// if ((null != customerMessagePushDto.getSettingTime() && !"".equals(customerMessagePushDto.getSettingTime()))
// && DateUtils.diffTime(new Date(), DateUtil.parse(customerMessagePushDto.getSettingTime(), "yyyy-MM-dd HH:mm")) > 0) {
// throw new WeComException("发送时间不能小于当前时间");
// }
if(StrUtil.isNotBlank(customerMessagePushDto.getSettingTime())){
if(DateUtils.diffTime(new Date(), DateUtil.parse(customerMessagePushDto.getSettingTime(), "yyyy-MM-dd HH:mm")) > 0){
throw new WeComException("发送时间不能小于当前时间");
}
}
/*if(StrUtil.isBlank(customerMessagePushDto.getSettingTime())){
throw new WeComException("发送时间不能为空");
}*/
List<WeCustomer> customers = Lists.newArrayList();
List<WeGroup> groups = new ArrayList<>();
// 0 发给客户
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!