All Downloads are FREE. Search and download functionalities are using the official Maven repository.

weixin.popular.bean.message.massmessage.MassMPvideoMessage Maven / Gradle / Ivy

Go to download

The weixin-popular is a JAVA SDK for weixin. Weixin web url is https://mp.weixin.qq.com.

There is a newer version: 2.8.32
Show newest version
package weixin.popular.bean.message.massmessage;

import java.util.HashMap;
import java.util.Map;

import weixin.popular.bean.message.preview.MpvideoPreview;
import weixin.popular.bean.message.preview.Preview;

public class MassMPvideoMessage extends MassMessage{

	private Map mpvideo;

	/**
	 *
	 * @param media_id  MessageAPI mediaUploadvideo 返回的media_id
	 */
	public MassMPvideoMessage(String media_id) {
		super();
		mpvideo = new HashMap();
		mpvideo.put("media_id",media_id);
		super.msgtype = "mpvideo";
	}

	public Map getMpvideo() {
		return mpvideo;
	}

	public void setMpvideo(Map mpvideo) {
		this.mpvideo = mpvideo;
	}

	@Override
	public Preview convert() {
		Preview preview = new MpvideoPreview(mpvideo.get("media_id"));
		if(this.getTouser()!=null && this.getTouser().size()>0){
			preview.setTouser(this.getTouser().iterator().next());
		}
		return preview;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy