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