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 f6bdf752
authored
Apr 28, 2021
by
水库浪子
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改消息群发,前端时间为空,消息无法立即发送问题
1 parent
911896e7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCustomerMessagePushServiceImpl.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCustomerMessagePushServiceImpl.java
View file @
f6bdf75
...
...
@@ -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 发给客户
...
...
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