|
@@ -63,12 +63,12 @@ public class WebHandlerAdapter implements HandlerInterceptor {
|
|
|
throw new CustomException(HttpStatusEnum.INVALID_PARAMS);
|
|
|
}
|
|
|
//签名验证
|
|
|
- GameExt gameKey = gameExtService.getByGameId(Long.valueOf(gameId));
|
|
|
- if (gameKey == null || Strings.isBlank(gameKey.getAppKey())) {
|
|
|
+ GameExt gameExt = gameExtService.getByGameAppId(gameId);
|
|
|
+ if (gameExt == null || Strings.isBlank(gameExt.getAppKey())) {
|
|
|
log.error("非法参数, 游戏id对应的前端密钥appKey不存在");
|
|
|
throw new CustomException(HttpStatusEnum.INVALID_PARAMS);
|
|
|
}
|
|
|
- String str = "appKey=" + gameKey.getAppKey() + "&gameId=" + gameId + "×tamp=" + timestamp;
|
|
|
+ String str = "appKey=" + gameExt.getAppKey() + "&gameId=" + gameId + "×tamp=" + timestamp;
|
|
|
String mySign = SignUtil.MD5(str).toUpperCase();
|
|
|
//签名对比
|
|
|
if (!Objects.equals(mySign, sign)) {
|