xuwenbo
2021-05-21 00:34:35 +08:00
parent 38ccbe1aa1
commit 8c1e172c24
3 changed files with 8 additions and 0 deletions

View File

@ -131,6 +131,12 @@ public class YxWechatLive implements Serializable {
private String productId;
/**
* 购物直播封面图 建议尺寸800*800
*/
@TableField(exist = false)
private String feedsImg;
public void copy(YxWechatLive source){
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
}

View File

@ -20,6 +20,7 @@ public class WxMaLiveInfo {
private Integer roomid;
private String coverImg;
private String shareImg;
private String feedsImg;
private Integer liveStatus;
private Long startTime;
private Long endTime;

View File

@ -161,6 +161,7 @@ public class YxWechatLiveServiceImpl extends BaseServiceImpl<YxWechatLiveMapper,
public boolean saveLive(YxWechatLive resources){
WxMaService wxMaService = WxMaConfiguration.getWxMaService();
try {
resources.setFeedsImg(uploadPhotoToWx(wxMaService,resources.getFeedsImg()).getMediaId());
resources.setStartTime(Long.valueOf(OrderUtil.dateToTimestamp(resources.getStartDate())));
resources.setEndTime(Long.valueOf(OrderUtil.dateToTimestamp(resources.getEndDate())));
resources.setAnchorImg(uploadPhotoToWx(wxMaService,resources.getAnchorImge()).getMediaId());