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 92c100b2
authored
Dec 15, 2020
by
18356073052
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
群发任务的类型枚举
1 parent
b8b48798
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
linkwe-common/src/main/java/com/linkwechat/common/enums/ChatType.java
linkwe-common/src/main/java/com/linkwechat/common/enums/ChatType.java
0 → 100644
View file @
92c100b
package
com
.
linkwechat
.
common
.
enums
;
import
lombok.Getter
;
import
java.util.stream.Stream
;
/**
* 群发任务的类型,默认为single,表示发送给客户,group表示发送给客户群
*/
@Getter
public
enum
ChatType
{
/**
* 发给客户
*/
SINGLE
(
"single"
,
"0"
),
/**
* 发给客户群
*/
GROUP
(
"group"
,
"1"
)
;
private
String
name
;
private
String
type
;
ChatType
(
String
name
,
String
type
)
{
this
.
name
=
name
;
this
.
type
=
type
;
}
public
static
ChatType
of
(
String
type
){
return
Stream
.
of
(
values
()).
filter
(
s
->
s
.
getType
().
equals
(
type
)).
findFirst
().
orElseGet
(
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