-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a647fe8
commit fd8e02a
Showing
5 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
weixin-java-mp/src/main/java/me/chanjar/weixin/mp/builder/kefu/MpNewsArticleBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package me.chanjar.weixin.mp.builder.kefu; | ||
|
||
import me.chanjar.weixin.common.api.WxConsts; | ||
import me.chanjar.weixin.mp.bean.kefu.WxMpKefuMessage; | ||
|
||
/** | ||
* 图文消息builder | ||
* <pre> | ||
* 用法: | ||
* WxMpKefuMessage m = WxMpKefuMessage.MPNEWSARTICLE().articleId("xxxxx").toUser(...).build(); | ||
* </pre> | ||
* | ||
* @author <a href="https://github.com/leejuncheng">JCLee</a> | ||
*/ | ||
public final class MpNewsArticleBuilder extends BaseBuilder<MpNewsArticleBuilder>{ | ||
private String articleId; | ||
|
||
public MpNewsArticleBuilder() { | ||
this.msgType = WxConsts.KefuMsgType.MP_NEWS_ARTICLE; | ||
} | ||
|
||
public MpNewsArticleBuilder articleId(String articleId) { | ||
this.articleId = articleId; | ||
return this; | ||
} | ||
|
||
@Override | ||
public WxMpKefuMessage build() { | ||
WxMpKefuMessage m = super.build(); | ||
m.setMpNewsArticleId(this.articleId); | ||
return m; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters