修改微信小程序token验证

This commit is contained in:
xuwenbo
2020-08-10 15:23:41 +08:00
parent 496f5cd6a0
commit 61d5e010c9
2 changed files with 16 additions and 2 deletions

View File

@ -17,8 +17,19 @@ public class WxMaLiveInfo implements Serializable {
@Data
public static class RoomInfo implements Serializable {
private static final long serialVersionUID = 7745775280267417154L;
/**
* 直播间名字最短3个汉字最长17个汉字1个汉字相当于2个字符
*/
private String name;
/**
* 直播房间id
*/
private Integer roomid;
/**
* 背景图填入mediaIDmediaID获取后三天内有效图片mediaID的获取
* 请参考以下文档: https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/New_temporary_materials.html
* 直播间背景图图片规则建议像素1080*1920大小不超过2M
*/
private String coverImg;
private String shareImg;
private Integer liveStatus;

View File

@ -12,6 +12,8 @@ import co.yixiang.utils.ShopKeyUtils;
import com.google.common.collect.Maps;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import javax.annotation.PostConstruct;
import java.util.Map;
/**
@ -42,12 +44,13 @@ public class WxMaConfiguration {
config.setSecret(RedisUtil.get(ShopKeyUtils.getWxAppSecret()));
config.setToken(RedisUtil.get(ShopKeyUtils.getWechatMaToken()));
config.setAesKey(RedisUtil.get(ShopKeyUtils.getWechatMaEncodingAESKey()));
WxMaService service = new WxMaServiceImpl();
wxMaService = new WxMaServiceImpl();
wxMaService.setWxMaConfig(config);
maServices.put(ShopKeyUtils.getYshopWeiXinMaSevice(), wxMaService);
routers.put(ShopKeyUtils.getYshopWeiXinMaSevice(), newRouter(wxMaService));
//增加标识
redisUtils.set(ShopKeyUtils.getYshopWeiXinMaSevice(),"yshop");
service.setWxMaConfig(config);
}
return wxMaService;
}