Commit 0050668b by 水库浪子

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

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