Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0082627e
authored
Dec 17, 2020
by
18356073052
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
todo
1 parent
17dac7f7
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
4 deletions
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeCustomerMessagePushController.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WeCustomer.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WeCustomerMessageOriginal.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WeGroup.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCustomerMessagePushServiceImpl.java
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeCustomerMessagePushController.java
View file @
0082627
...
@@ -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
)
{
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WeCustomer.java
View file @
0082627
...
@@ -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
;
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WeCustomerMessageOriginal.java
View file @
0082627
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
;
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WeGroup.java
View file @
0082627
...
@@ -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
;
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCustomerMessagePushServiceImpl.java
View file @
0082627
...
@@ -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
());
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment