Commit 53e8b2c0 by 18356073052

todo

1 parent 941833e6
...@@ -11,6 +11,7 @@ import lombok.extern.slf4j.Slf4j; ...@@ -11,6 +11,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -34,7 +35,7 @@ public class WeCustomerMessagePushController extends BaseController { ...@@ -34,7 +35,7 @@ public class WeCustomerMessagePushController extends BaseController {
@PreAuthorize("@ss.hasPermi('system:push:add')") @PreAuthorize("@ss.hasPermi('system:push:add')")
@Log(title = "新增群发消息发送", businessType = BusinessType.INSERT) @Log(title = "新增群发消息发送", businessType = BusinessType.INSERT)
@PostMapping(value = "add") @PostMapping(value = "add")
public AjaxResult add(CustomerMessagePushDto customerMessagePushDto) { public AjaxResult add(@RequestBody CustomerMessagePushDto customerMessagePushDto) {
try { try {
weCustomerMessagePushService.addWeCustomerMessagePush(customerMessagePushDto); weCustomerMessagePushService.addWeCustomerMessagePush(customerMessagePushDto);
} catch (JsonProcessingException e) { } catch (JsonProcessingException e) {
......
...@@ -92,6 +92,8 @@ public class WeCustomer extends BaseEntity ...@@ -92,6 +92,8 @@ public class WeCustomer extends BaseEntity
private Integer status; private Integer status;
/** 部门 */ /** 部门 */
@TableField(exist = false)
private String departmentIds; private String departmentIds;
} }
package com.linkwechat.wecom.domain; package com.linkwechat.wecom.domain;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.linkwechat.common.core.domain.BaseEntity; import com.linkwechat.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import java.util.Date;
/** /**
* 群发消息 原始数据信息表 we_customer_messageOriginal * 群发消息 原始数据信息表 we_customer_messageOriginal
* *
...@@ -63,5 +66,4 @@ public class WeCustomerMessageOriginal extends BaseEntity { ...@@ -63,5 +66,4 @@ public class WeCustomerMessageOriginal extends BaseEntity {
*/ */
private int delFlag; private int delFlag;
} }
...@@ -63,6 +63,7 @@ public class WeGroup { ...@@ -63,6 +63,7 @@ public class WeGroup {
private String endTime; private String endTime;
/**员工id*/ /**员工id*/
@TableField(exist = false)
private String userIds; private String userIds;
......
...@@ -84,7 +84,7 @@ public class WeCustomerMessagePushServiceImpl implements IWeCustomerMessagePushS ...@@ -84,7 +84,7 @@ public class WeCustomerMessagePushServiceImpl implements IWeCustomerMessagePushS
//定义一个任务执行队列 //定义一个任务执行队列
//把任务放入执行队列 //把任务放入执行队列
//任务执行 sendMessgae(WeMessagePush weMessagePush) 方法 //任务执行 sendMessgae(WeMessagePush weMessagePush) 方法
if (DateUtils.diffTime(new Date(), DateUtil.parse(customerMessagePushDto.getSettingTime(), "yyyy-MM-dd HH:mm:ss")) < 0) { if (DateUtils.diffTime(new Date(), DateUtil.parse(customerMessagePushDto.getSettingTime(), "yyyy-MM-dd HH:mm:ss")) > 0) {
throw new WeComException("发送时间不能小于当前时间"); throw new WeComException("发送时间不能小于当前时间");
} }
...@@ -265,7 +265,7 @@ public class WeCustomerMessagePushServiceImpl implements IWeCustomerMessagePushS ...@@ -265,7 +265,7 @@ public class WeCustomerMessagePushServiceImpl implements IWeCustomerMessagePushS
List<String> customers= Lists.newArrayList(); List<String> customers= Lists.newArrayList();
if(pushRange.equals("0")){ if(pushRange.equals("0")){
//查询系统所有客户 //查询系统所有客户
List<WeCustomer> weCustomers = weCustomerService.list(); List<WeCustomer> weCustomers = weCustomerService.selectWeCustomerList(null);
if(CollectionUtils.isNotEmpty(weCustomers)){ if(CollectionUtils.isNotEmpty(weCustomers)){
customers=weCustomers.stream().map(WeCustomer::getExternalUserid).distinct().collect(Collectors.toList()); customers=weCustomers.stream().map(WeCustomer::getExternalUserid).distinct().collect(Collectors.toList());
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!