🎨 修复家校沟通部分接口问题
This commit is contained in:
@@ -12,6 +12,12 @@ import java.util.List;
|
||||
/**
|
||||
* 审批信息
|
||||
*
|
||||
* 审批申请状态变化回调通知
|
||||
* https://developer.work.weixin.qq.com/document/path/91815
|
||||
*
|
||||
* 自建应用审批状态变化通知回调
|
||||
* https://developer.work.weixin.qq.com/document/path/90269
|
||||
*
|
||||
* @author Gyv12345
|
||||
*/
|
||||
@XStreamAlias("ApprovalInfo")
|
||||
@@ -19,6 +25,212 @@ import java.util.List;
|
||||
public class WxCpXmlApprovalInfo implements Serializable {
|
||||
private static final long serialVersionUID = 8136329462880646091L;
|
||||
|
||||
|
||||
// 自建应用审批状态变化通知回调
|
||||
/**
|
||||
* 审批单编号,由开发者在发起申请时自定义
|
||||
*/
|
||||
@XStreamAlias("ThirdNo")
|
||||
@XStreamConverter(value = XStreamCDataConverter.class)
|
||||
private String thirdNo;
|
||||
|
||||
/**
|
||||
* 审批模板名称
|
||||
*/
|
||||
@XStreamAlias("OpenSpName")
|
||||
@XStreamConverter(value = XStreamCDataConverter.class)
|
||||
private String openSpName;
|
||||
|
||||
/**
|
||||
* 审批模板id
|
||||
*/
|
||||
@XStreamAlias("OpenTemplateId")
|
||||
@XStreamConverter(value = XStreamCDataConverter.class)
|
||||
private String openTemplateId;
|
||||
|
||||
/**
|
||||
* 申请单当前审批状态:1-审批中;2-已通过;3-已驳回;4-已撤销
|
||||
*/
|
||||
@XStreamAlias("OpenSpStatus")
|
||||
private Integer openSpStatus;
|
||||
|
||||
/**
|
||||
* 提交者姓名
|
||||
*/
|
||||
@XStreamAlias("ApplyUserName")
|
||||
@XStreamConverter(value = XStreamCDataConverter.class)
|
||||
private String applyUserName;
|
||||
|
||||
/**
|
||||
* 提交者userid
|
||||
*/
|
||||
@XStreamAlias("ApplyUserId")
|
||||
@XStreamConverter(value = XStreamCDataConverter.class)
|
||||
private String applyUserId;
|
||||
|
||||
/**
|
||||
* 提交者所在部门
|
||||
*/
|
||||
@XStreamAlias("ApplyUserParty")
|
||||
@XStreamConverter(value = XStreamCDataConverter.class)
|
||||
private String applyUserParty;
|
||||
|
||||
/**
|
||||
* 提交者头像
|
||||
*/
|
||||
@XStreamAlias("ApplyUserImage")
|
||||
@XStreamConverter(value = XStreamCDataConverter.class)
|
||||
private String applyUserImage;
|
||||
|
||||
/**
|
||||
* 当前审批节点:0-第一个审批节点;1-第二个审批节点…以此类推
|
||||
*/
|
||||
@XStreamAlias("ApproverStep")
|
||||
private Integer approverStep;
|
||||
|
||||
/**
|
||||
* 审批流程信息
|
||||
*/
|
||||
@XStreamImplicit(itemFieldName = "ApprovalNodes")
|
||||
private List<ApprovalNode> approvalNodes;
|
||||
|
||||
/**
|
||||
* 抄送信息,可能有多个抄送人
|
||||
*/
|
||||
@XStreamImplicit(itemFieldName = "NotifyNodes")
|
||||
private List<NotifyNode> notifyNodes;
|
||||
|
||||
/**
|
||||
* 抄送人信息
|
||||
*/
|
||||
@XStreamAlias("NotifyNodes")
|
||||
@Data
|
||||
public static class NotifyNode implements Serializable {
|
||||
private static final long serialVersionUID = -979255011922209018L;
|
||||
|
||||
/**
|
||||
* 抄送人姓名
|
||||
*/
|
||||
@XStreamAlias("ItemName")
|
||||
@XStreamConverter(value = XStreamCDataConverter.class)
|
||||
private String itemName;
|
||||
|
||||
/**
|
||||
* 抄送人userid
|
||||
*/
|
||||
@XStreamAlias("ItemUserid")
|
||||
@XStreamConverter(value = XStreamCDataConverter.class)
|
||||
private String itemUserId;
|
||||
|
||||
/**
|
||||
* 抄送人所在部门
|
||||
*/
|
||||
@XStreamAlias("ItemParty")
|
||||
@XStreamConverter(value = XStreamCDataConverter.class)
|
||||
private String itemParty;
|
||||
|
||||
/**
|
||||
* 抄送人头像
|
||||
*/
|
||||
@XStreamAlias("ItemImage")
|
||||
@XStreamConverter(value = XStreamCDataConverter.class)
|
||||
private String itemImage;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 审批流程信息,可以有多个审批节点
|
||||
*/
|
||||
@XStreamAlias("ApprovalNodes")
|
||||
@Data
|
||||
public static class ApprovalNode implements Serializable {
|
||||
private static final long serialVersionUID = -979255011922209018L;
|
||||
|
||||
/**
|
||||
* 节点审批操作状态:1-审批中;2-已同意;3-已驳回;4-已转审
|
||||
*/
|
||||
@XStreamAlias("NodeStatus")
|
||||
private Integer nodeStatus;
|
||||
|
||||
/**
|
||||
* 审批节点属性:1-或签;2-会签
|
||||
*/
|
||||
@XStreamAlias("NodeAttr")
|
||||
private Integer nodeAttr;
|
||||
|
||||
/**
|
||||
* 审批节点类型:1-固定成员;2-标签;3-上级
|
||||
*/
|
||||
@XStreamAlias("NodeType")
|
||||
private Integer nodeType;
|
||||
|
||||
/**
|
||||
* 审批节点信息,当节点为标签或上级时,一个节点可能有多个分支
|
||||
*/
|
||||
@XStreamImplicit(itemFieldName = "Items")
|
||||
private List<Item> items;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 审批节点分支,当节点为标签或上级时,一个节点可能有多个分支
|
||||
*/
|
||||
@XStreamAlias("Items")
|
||||
@Data
|
||||
public static class Item implements Serializable {
|
||||
private static final long serialVersionUID = -979255011922209018L;
|
||||
|
||||
/**
|
||||
* 分支审批人姓名
|
||||
*/
|
||||
@XStreamAlias("ItemName")
|
||||
@XStreamConverter(value = XStreamCDataConverter.class)
|
||||
private String itemName;
|
||||
|
||||
/**
|
||||
* 分支审批人userid
|
||||
*/
|
||||
@XStreamAlias("ItemUserid")
|
||||
@XStreamConverter(value = XStreamCDataConverter.class)
|
||||
private String itemUserId;
|
||||
|
||||
/**
|
||||
* 分支审批人所在部门
|
||||
*/
|
||||
@XStreamAlias("ItemParty")
|
||||
@XStreamConverter(value = XStreamCDataConverter.class)
|
||||
private String itemParty;
|
||||
|
||||
/**
|
||||
* 分支审批人头像
|
||||
*/
|
||||
@XStreamAlias("ItemImage")
|
||||
@XStreamConverter(value = XStreamCDataConverter.class)
|
||||
private String itemImage;
|
||||
|
||||
/**
|
||||
* 分支审批人审批意见
|
||||
*/
|
||||
@XStreamAlias("ItemSpeech")
|
||||
@XStreamConverter(value = XStreamCDataConverter.class)
|
||||
private String itemSpeech;
|
||||
|
||||
/**
|
||||
* 分支审批审批操作状态:1-审批中;2-已同意;3-已驳回;4-已转审
|
||||
*/
|
||||
@XStreamAlias("ItemStatus")
|
||||
private Integer itemStatus;
|
||||
|
||||
/**
|
||||
* 分支审批人操作时间
|
||||
*/
|
||||
@XStreamAlias("ItemOpTime")
|
||||
private Long itemOpTime;
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 审批申请状态变化回调通知
|
||||
/**
|
||||
* 审批编号
|
||||
*/
|
||||
@@ -44,6 +256,7 @@ public class WxCpXmlApprovalInfo implements Serializable {
|
||||
@XStreamAlias("TemplateId")
|
||||
@XStreamConverter(value = XStreamCDataConverter.class)
|
||||
private String templateId;
|
||||
|
||||
/**
|
||||
* 审批申请提交时间,Unix时间戳
|
||||
*/
|
||||
@@ -249,4 +462,5 @@ public class WxCpXmlApprovalInfo implements Serializable {
|
||||
@XStreamAlias("UserId")
|
||||
private String userId;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -474,6 +474,15 @@ public class WxCpXmlMessage implements Serializable {
|
||||
private SendLocationInfo sendLocationInfo = new SendLocationInfo();
|
||||
|
||||
|
||||
/**
|
||||
* 审批消息
|
||||
*
|
||||
* 审批申请状态变化回调通知
|
||||
* https://developer.work.weixin.qq.com/document/path/91815
|
||||
*
|
||||
* 自建应用审批状态变化通知回调
|
||||
* https://developer.work.weixin.qq.com/document/path/90269
|
||||
*/
|
||||
@XStreamAlias("ApprovalInfo")
|
||||
private WxCpXmlApprovalInfo approvalInfo = new WxCpXmlApprovalInfo();
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ public class WxCpAllowScope extends WxCpBaseResp implements Serializable {
|
||||
private List<Student> students;
|
||||
|
||||
@SerializedName("departments")
|
||||
private List<Integer> departments;
|
||||
private Department departments;
|
||||
|
||||
public static AllowScope fromJson(String json) {
|
||||
return WxCpGsonBuilder.create().fromJson(json, AllowScope.class);
|
||||
@@ -42,6 +42,23 @@ public class WxCpAllowScope extends WxCpBaseResp implements Serializable {
|
||||
|
||||
}
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public static class Department implements Serializable {
|
||||
|
||||
@SerializedName("partyid")
|
||||
private List<Integer> partyId;
|
||||
|
||||
public static Department fromJson(String json) {
|
||||
return WxCpGsonBuilder.create().fromJson(json, Department.class);
|
||||
}
|
||||
|
||||
public String toJson() {
|
||||
return WxCpGsonBuilder.create().toJson(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public static class Student implements Serializable {
|
||||
|
||||
@@ -110,6 +110,7 @@ public class WxCpConsts {
|
||||
|
||||
/**
|
||||
* 企业微信审批事件推送(自建应用审批)
|
||||
* https://developer.work.weixin.qq.com/document/path/90269
|
||||
*/
|
||||
public static final String OPEN_APPROVAL_CHANGE = "open_approval_change";
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package me.chanjar.weixin.cp.util.xml;
|
||||
|
||||
import com.thoughtworks.xstream.XStream;
|
||||
import me.chanjar.weixin.common.util.xml.XStreamInitializer;
|
||||
import me.chanjar.weixin.cp.bean.WxCpTpXmlPackage;
|
||||
import me.chanjar.weixin.cp.bean.message.*;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.thoughtworks.xstream.XStream;
|
||||
import me.chanjar.weixin.common.util.xml.XStreamInitializer;
|
||||
import me.chanjar.weixin.cp.bean.message.*;
|
||||
import me.chanjar.weixin.cp.bean.WxCpTpXmlPackage;
|
||||
|
||||
public class XStreamTransformer {
|
||||
|
||||
protected static final Map<Class, XStream> CLASS_2_XSTREAM_INSTANCE = configXStreamInstance();
|
||||
|
||||
Reference in New Issue
Block a user