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 8b68a348
authored
Dec 30, 2020
by
18356073052
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
群发消息任务代码重构
1 parent
ca30039d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/dto/message/CustomerMessagePushDto.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/dto/message/CustomerMessagePushDto.java
View file @
8b68a34
...
...
@@ -68,4 +68,39 @@ public class CustomerMessagePushDto {
*/
private
MiniprogramMessageDto
miniprogramMessage
;
/**
* 消息内容
*
* @param customerMessagePushDto
* @return
*/
public
String
content
()
{
if
(
this
.
getMessageType
()!=
null
)
{
// 消息类型 0 文本消息 1 图片消息 2 链接消息 3 小程序消息
if
(
this
.
getMessageType
().
equals
(
"0"
))
{
return
this
.
getTextMessage
().
getContent
();
}
if
(
this
.
getMessageType
().
equals
(
"1"
))
{
return
this
.
getImageMessage
().
getPic_url
();
}
if
(
this
.
getMessageType
().
equals
(
"2"
))
{
return
this
.
getLinkMessage
().
getTitle
()
+
":"
+
this
.
getLinkMessage
().
getPicurl
()
+
":"
+
this
.
getLinkMessage
().
getUrl
()
+
""
+
this
.
getLinkMessage
().
getDesc
();
}
if
(
this
.
getMessageType
().
equals
(
"3"
))
{
return
this
.
getMiniprogramMessage
().
getTitle
()
+
":"
+
this
.
getMiniprogramMessage
().
getPage
();
}
}
return
null
;
}
}
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