View Javadoc
1   package com.zone.weixin4j.response;
2   
3   /**
4    * 消息转移到客服
5    * 
6    * @className TransferCustomerResponse
7    * @author jinyu(foxinmy@gmail.com)
8    * @date 2015年5月5日
9    * @since JDK 1.6
10   * @see <a
11   *      href="http://mp.weixin.qq.com/wiki/5/ae230189c9bd07a6b221f48619aeef35.html">转移消息到多客服</a>
12   */
13  public class TransferCustomerResponse implements WeixinResponse {
14  
15  	/**
16  	 * 指定会话接入的客服账号
17  	 */
18  	private String kfAccount;
19  
20  	public TransferCustomerResponse(String kfAccount) {
21  		this.kfAccount = kfAccount;
22  	}
23  
24  	public String getKfAccount() {
25  		return kfAccount;
26  	}
27  
28  	@Override
29  	public String toContent() {
30  		String content = "";
31  		if (kfAccount != null && !kfAccount.trim().isEmpty()) {
32  			content = String
33  					.format("<TransInfo><KfAccount><![CDATA[%s]]></KfAccount></TransInfo>",
34  							kfAccount);
35  		}
36  		return content;
37  	}
38  
39  	@Override
40  	public String getMsgType() {
41  		return "transfer_customer_service";
42  	}
43  }