修改微信小程序token验证
This commit is contained in:
@ -17,8 +17,19 @@ public class WxMaLiveInfo implements Serializable {
|
|||||||
@Data
|
@Data
|
||||||
public static class RoomInfo implements Serializable {
|
public static class RoomInfo implements Serializable {
|
||||||
private static final long serialVersionUID = 7745775280267417154L;
|
private static final long serialVersionUID = 7745775280267417154L;
|
||||||
|
/**
|
||||||
|
* 直播间名字,最短3个汉字,最长17个汉字,1个汉字相当于2个字符
|
||||||
|
*/
|
||||||
private String name;
|
private String name;
|
||||||
|
/**
|
||||||
|
* 直播房间id
|
||||||
|
*/
|
||||||
private Integer roomid;
|
private Integer roomid;
|
||||||
|
/**
|
||||||
|
* 背景图,填入mediaID(mediaID获取后,三天内有效);图片mediaID的获取,
|
||||||
|
* 请参考以下文档: https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/New_temporary_materials.html;
|
||||||
|
* 直播间背景图,图片规则:建议像素1080*1920,大小不超过2M
|
||||||
|
*/
|
||||||
private String coverImg;
|
private String coverImg;
|
||||||
private String shareImg;
|
private String shareImg;
|
||||||
private Integer liveStatus;
|
private Integer liveStatus;
|
||||||
|
@ -12,6 +12,8 @@ import co.yixiang.utils.ShopKeyUtils;
|
|||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
import javax.annotation.PostConstruct;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -42,12 +44,13 @@ public class WxMaConfiguration {
|
|||||||
config.setSecret(RedisUtil.get(ShopKeyUtils.getWxAppSecret()));
|
config.setSecret(RedisUtil.get(ShopKeyUtils.getWxAppSecret()));
|
||||||
config.setToken(RedisUtil.get(ShopKeyUtils.getWechatMaToken()));
|
config.setToken(RedisUtil.get(ShopKeyUtils.getWechatMaToken()));
|
||||||
config.setAesKey(RedisUtil.get(ShopKeyUtils.getWechatMaEncodingAESKey()));
|
config.setAesKey(RedisUtil.get(ShopKeyUtils.getWechatMaEncodingAESKey()));
|
||||||
WxMaService service = new WxMaServiceImpl();
|
wxMaService = new WxMaServiceImpl();
|
||||||
|
wxMaService.setWxMaConfig(config);
|
||||||
maServices.put(ShopKeyUtils.getYshopWeiXinMaSevice(), wxMaService);
|
maServices.put(ShopKeyUtils.getYshopWeiXinMaSevice(), wxMaService);
|
||||||
routers.put(ShopKeyUtils.getYshopWeiXinMaSevice(), newRouter(wxMaService));
|
routers.put(ShopKeyUtils.getYshopWeiXinMaSevice(), newRouter(wxMaService));
|
||||||
//增加标识
|
//增加标识
|
||||||
redisUtils.set(ShopKeyUtils.getYshopWeiXinMaSevice(),"yshop");
|
redisUtils.set(ShopKeyUtils.getYshopWeiXinMaSevice(),"yshop");
|
||||||
service.setWxMaConfig(config);
|
|
||||||
}
|
}
|
||||||
return wxMaService;
|
return wxMaService;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user