Comments (8)
接口文档:https://developer.work.weixin.qq.com/document/path/92698
from wxjava.
欢迎直接提供修复代码
from wxjava.
欢迎直接提供修复代码
企微接口文最近有更新,我在WxCpMsgTemplate新增了chat_id_list和allow_select两个参数,源码如下:
package me.chanjar.weixin.cp.bean.external;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import me.chanjar.weixin.cp.bean.external.msg.Attachment;
import me.chanjar.weixin.cp.bean.external.msg.Text;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
import java.util.List;
/**
- 企业群发消息任务
-
- Created by songfan on 2020/7/14.
- @author songfan & Mr.Pan
*/
@DaTa
@builder
@NoArgsConstructor
@AllArgsConstructor
public class WxCpMsgTemplate implements Serializable {
private static final long serialVersionUID = 3172331565173474358L;
/**
- 群发任务的类型,默认为single,表示发送给客户,group表示发送给客户群
*/
@SerializedName("chat_type")
private String chatType;
/**
- 客户的外部联系人id列表,仅在chat_type为single时有效,不可与sender同时为空,最多可传入1万个客户
*/
@SerializedName("external_userid")
private List externalUserid;
/**
- 客户群id列表,仅在chat_type为group时有效,最多可一次指定2000个客户群。指定群id之后,收到任务的群主无须再选择客户群,仅对4.1.10及以上版本的企业微信终端生效
*/
@SerializedName("chat_id_list")
private List chatIdList;
/**
- 发送企业群发消息的成员userid,当类型为发送给客户群时必填
*/
private String sender;
/**
- 是否允许成员在待发送客户列表中重新进行选择,默认为false,仅支持客户群发场景
*/
@SerializedName("allow_select")
private Boolean allowSelect;
/**
- 消息文本内容,最多4000个字节
*/
private Text text;
/**
- 附件,最多支持添加9个附件
*/
private List attachments;
/**
- From json wx cp msg template.
- @param json the json
- @return the wx cp msg template
*/
public static WxCpMsgTemplate fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpMsgTemplate.class);
}
/**
- To json string.
- @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
from wxjava.
欢迎直接提供修复代码
企微最近有更新企业群发的接口文档,我在WxCpMsgTemplate新增了chat_id_list和allow_select两个参数,代码如下:
package me.chanjar.weixin.cp.bean.external;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import me.chanjar.weixin.cp.bean.external.msg.Attachment;
import me.chanjar.weixin.cp.bean.external.msg.Text;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
import java.util.List;
/**
- 企业群发消息任务
-
- Created by songfan on 2020/7/14.
- @author songfan & Mr.Pan
*/
@DaTa
@builder
@NoArgsConstructor
@AllArgsConstructor
public class WxCpMsgTemplate implements Serializable {
private static final long serialVersionUID = 3172331565173474358L;
/**
- 群发任务的类型,默认为single,表示发送给客户,group表示发送给客户群
*/
@SerializedName("chat_type")
private String chatType;
/**
- 客户的外部联系人id列表,仅在chat_type为single时有效,不可与sender同时为空,最多可传入1万个客户
*/
@SerializedName("external_userid")
private List externalUserid;
/**
- 客户群id列表,仅在chat_type为group时有效,最多可一次指定2000个客户群。指定群id之后,收到任务的群主无须再选择客户群,仅对4.1.10及以上版本的企业微信终端生效
*/
@SerializedName("chat_id_list")
private List chatIdList;
/**
- 发送企业群发消息的成员userid,当类型为发送给客户群时必填
*/
private String sender;
/**
- 是否允许成员在待发送客户列表中重新进行选择,默认为false,仅支持客户群发场景
*/
@SerializedName("allow_select")
private Boolean allowSelect;
/**
- 消息文本内容,最多4000个字节
*/
private Text text;
/**
- 附件,最多支持添加9个附件
*/
private List attachments;
/**
- From json wx cp msg template.
- @param json the json
- @return the wx cp msg template
*/
public static WxCpMsgTemplate fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpMsgTemplate.class);
}
/**
- To json string.
- @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
from wxjava.
from wxjava.
另外还有一个需要新增的参数tag_filter.group_list.tag_list,这个就需要新增类去处理了,可能要麻烦大佬有空再帮忙处理一下 [抱拳]
from wxjava.
你可以直接提交PR的
from wxjava.
你可以直接提交PR的
已提交,谢谢大佬
from wxjava.
Related Issues (20)
- 有没有类似延迟加载,或避免加载配置的方法 HOT 2
- wx-java-miniapp-spring-boot-starter当wx.miniapp.config-storage.type = RedisTemplate时 host的配置问题 HOT 2
- 微信商户商场商圈的相关功能接口 HOT 2
- 企业微信-审批-批量获取审批单号缺少参数
- 微信小程序的 交易投诉类接口 HOT 1
- 方法抛出 'com.google.gson.JsonIOException' 异常 HOT 1
- 企业微信-会话内容存档,获取解密的聊天数据接口反序列化失败 HOT 2
- 第三方平台设置服务器域名接口调整
- 微信支付分停车服务 HOT 1
- 视频号助手开放接口 有计划加入么大佬? HOT 1
- 企业微信获取客户群详情 没有member_version字段 HOT 1
- 企业微信代开发应用的corpSecret是企业授权后才产生的,WxCpTpRedissonConfigImpl无法动态配置
- 公众号开发永久下载图片和声音的接口 materialImageOrVoiceDownload 无法正常刷新 AccessToken
- 关于getAccessToken接口IP白名单问题 HOT 4
- 请问本项目推荐的jdk版本和Maven版本 HOT 1
- java.lang.NoSuchMethodError: 'java.lang.Long redis.clients.jedis.Jedis.ttl(java.lang.String)' HOT 3
- me.chanjar.weixin.cp.bean.message.WxCpXmlMessage 类缺少客户群变更回调字段MemChangeList HOT 1
- weixin-java-openx希望增加 快速设置小程序服务器域名 HOT 3
- 服务端获取openId有时成功,有时失败,错误代码:40029, 错误信息:不合法的 oauth_code HOT 1
- 使用jdk21的时候,企业微信会话存档解密报错IllegalAccessError HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wxjava.