2017-03-29 13:05:14 +08:00

38 lines
647 B
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.zone.weixin4j.response;
/**
* 回复图片消息
*
* @className ImageResponse
* @author jinyu(foxinmy@gmail.com)
* @date 2015年5月5日
* @since JDK 1.6
* @see
*/
public class ImageResponse implements WeixinResponse {
/**
* 通过上传多媒体文件得到的id。
*/
private String mediaId;
public ImageResponse(String mediaId) {
this.mediaId = mediaId;
}
@Override
public String toContent() {
return String.format(
"<Image><MediaId><![CDATA[%s]]></MediaId></Image>", mediaId);
}
public String getMediaId() {
return mediaId;
}
@Override
public String getMsgType() {
return "image";
}
}