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

weixin.popular.bean.message.massmessage.MassVideoMessage 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 weixin.popular.bean.message.Uploadvideo;
import weixin.popular.bean.message.preview.Preview;
import weixin.popular.bean.message.preview.VideoPreview;

/**
 * 仅适用于对 openid 发送接口
 *
 * @author LiYi
 */
public class MassVideoMessage extends MassMessage {

    private Uploadvideo mpvideo;

    public MassVideoMessage(Uploadvideo uploadvideo) {
        super();
        mpvideo = uploadvideo;
        super.msgtype = "mpvideo";
    }

    public Uploadvideo getMpvideo() {
        return mpvideo;
    }

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

    @Override
    public Preview convert() {
        //转为 Preview,官方未说明该类型
        Preview preview = new VideoPreview(mpvideo);
        if (this.getTouser() != null && this.getTouser().size() > 0) {
            preview.setTouser(this.getTouser().iterator().next());
        }
        return preview;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy