-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
Showing
5 changed files
with
142 additions
and
10 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
81 changes: 81 additions & 0 deletions
81
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpMsgTemplate.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,81 @@ | ||
package me.chanjar.weixin.cp.bean; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder; | ||
|
||
import java.io.Serializable; | ||
import java.util.List; | ||
|
||
/** | ||
* 企业群发消息任务 | ||
* <p> | ||
* Created by songfan on 2020/7/14. | ||
*/ | ||
@Data | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class WxCpMsgTemplate implements Serializable { | ||
private static final long serialVersionUID = 3172331565173474358L; | ||
|
||
@SerializedName("chat_type") | ||
private String chatType; | ||
|
||
@SerializedName("external_userid") | ||
private List<String> externalUserid; | ||
|
||
private String sender; | ||
|
||
private Text text; | ||
|
||
private Image image; | ||
|
||
private Link link; | ||
|
||
private Miniprogram miniprogram; | ||
|
||
public static WxCpMsgTemplate fromJson(String json) { | ||
return WxCpGsonBuilder.create().fromJson(json, WxCpMsgTemplate.class); | ||
} | ||
|
||
public String toJson() { | ||
return WxCpGsonBuilder.create().toJson(this); | ||
} | ||
|
||
@Data | ||
public class Text { | ||
private String content; | ||
} | ||
|
||
@Data | ||
public class Image { | ||
|
||
@SerializedName("media_id") | ||
private String mediaId; | ||
|
||
@SerializedName("pic_url") | ||
private String picUrl; | ||
} | ||
|
||
@Data | ||
public class Link { | ||
private String title; | ||
@SerializedName("picurl") | ||
private String picUrl; | ||
private String desc; | ||
private String url; | ||
} | ||
|
||
@Data | ||
public class Miniprogram { | ||
private String title; | ||
@SerializedName("pic_media_id") | ||
private String picMediaId; | ||
private String appid; | ||
private String page; | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpMsgTemplateAddResult.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,36 @@ | ||
package me.chanjar.weixin.cp.bean; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import lombok.Data; | ||
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder; | ||
|
||
import java.io.Serializable; | ||
import java.util.List; | ||
|
||
/** | ||
* Created by songfan on 2020/7/14. | ||
*/ | ||
@Data | ||
public class WxCpMsgTemplateAddResult implements Serializable { | ||
private static final long serialVersionUID = -5166048319463473188L; | ||
|
||
@SerializedName("errcode") | ||
private Integer errCode; | ||
|
||
@SerializedName("errmsg") | ||
private String errMsg; | ||
|
||
@SerializedName("fail_list") | ||
private List<String> failList; | ||
|
||
@SerializedName("msgid") | ||
private String msgId; | ||
|
||
public static WxCpMsgTemplateAddResult fromJson(String json) { | ||
return WxCpGsonBuilder.create().fromJson(json, WxCpMsgTemplateAddResult.class); | ||
} | ||
|
||
public String toJson() { | ||
return WxCpGsonBuilder.create().toJson(this); | ||
} | ||
} |
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