|
@@ -61,14 +61,17 @@ public class GameAppletServiceImpl extends ServiceImpl<GameAppletMapper, GameApp
|
|
|
@Override
|
|
|
public String appletMsgCheck(String appId, String signature, String timestamp, String nonce, String echoStr) throws Exception {
|
|
|
GameAppletDTO gameAppletDTO = this.getByAppId(appId);
|
|
|
+ log.error("gameAppletDTO : {}", JsonUtil.toString(gameAppletDTO));
|
|
|
GameAppletDTO.MsgConfigBean msgConfigBean = gameAppletDTO.getMsgConfigBean();
|
|
|
if (msgConfigBean == null) {
|
|
|
throw new BaseException("参数错误, 小游戏应用缺少消息推送配置");
|
|
|
}
|
|
|
String mySignature = SignUtil.SHA1(msgConfigBean.getMsgPushToken(), timestamp, nonce);
|
|
|
+ log.error("mySignature : {}, signature : {}", mySignature, signature);
|
|
|
if (!Objects.equals(mySignature, signature)) {
|
|
|
throw new BaseException("验证签名不匹配");
|
|
|
}
|
|
|
+ log.error("返回腾讯信息, echoStr : {}", echoStr);
|
|
|
return echoStr;
|
|
|
}
|
|
|
|