View Javadoc
1   package com.zone.weixin4j.qy.event;
2   
3   import com.zone.weixin4j.message.event.EventMessage;
4   import com.zone.weixin4j.type.EventType;
5   
6   import javax.xml.bind.annotation.XmlElement;
7   import java.io.Serializable;
8   
9   /**
10   * 异步任务事件完成通知
11   * 
12   * @className BatchjobresultMessage
13   * @author jinyu(foxinmy@gmail.com)
14   * @date 2015年3月31日
15   * @since JDK 1.6
16   * @see <a
17   *      href="http://qydev.weixin.qq.com/wiki/index.php?title=%E6%8E%A5%E6%94%B6%E4%BA%8B%E4%BB%B6#.E5.BC.82.E6.AD.A5.E4.BB.BB.E5.8A.A1.E5.AE.8C.E6.88.90.E4.BA.8B.E4.BB.B6.E6.8E.A8.E9.80.81">异步任务事件完成通知</a>
18   */
19  public class BatchjobresultMessage extends EventMessage {
20  
21  	private static final long serialVersionUID = 8014540441322209657L;
22  
23  	public BatchjobresultMessage() {
24  		super(EventType.batch_job_result.name());
25  	}
26  
27  	/**
28  	 * 任务信息
29  	 */
30  	@XmlElement(name = "BatchJob")
31  	private BatchJob batchJob;
32  
33  	public BatchJob getBatchJob() {
34  		return batchJob;
35  	}
36  
37  	/**
38  	 * 任务信息
39  	 * 
40  	 * @className BatchJob
41  	 * @author jinyu(foxinmy@gmail.com)
42  	 * @date 2015年4月1日
43  	 * @since JDK 1.6
44  	 * @see
45  	 */
46  	public static class BatchJob implements Serializable {
47  		private static final long serialVersionUID = -7520032656787156391L;
48  		/**
49  		 * 异步任务id,最大长度为64字符
50  		 */
51  		@XmlElement(name = "JobId")
52  		private String jobId;
53  		/**
54  		 * 操作类型,字符串,目前分别有: 1. sync_user(增量更新成员) 2. replace_user(全量覆盖成员) 3.
55  		 * invite_user(邀请成员关注) 4. replace_party(全量覆盖部门)
56  		 * 
57  		 * @see com.foxinmy.weixin4j.qy.type.BatchType
58  		 */
59  		@XmlElement(name = "JobType")
60  		private String jobType;
61  		/**
62  		 * 返回码
63  		 */
64  		@XmlElement(name = "ErrCode")
65  		private String ErrCode;
66  		/**
67  		 * 对返回码的文本描述内容
68  		 */
69  		@XmlElement(name = "ErrMsg")
70  		private String errMsg;
71  
72  		public String getJobId() {
73  			return jobId;
74  		}
75  
76  		public String getJobType() {
77  			return jobType;
78  		}
79  
80  		public String getErrCode() {
81  			return ErrCode;
82  		}
83  
84  		public String getErrMsg() {
85  			return errMsg;
86  		}
87  
88  		@Override
89  		public String toString() {
90  			return "[jobId=" + jobId + ", jobType=" + jobType + ", ErrCode="
91  					+ ErrCode + ", errMsg=" + errMsg + "]";
92  		}
93  	}
94  
95  	@Override
96  	public String toString() {
97  		return "BatchjobresultMessage [batchJob=" + batchJob + ", "
98  				+ super.toString() + "]";
99  	}
100 }