feat(game): 添加 PGT 游戏平台支持

- 新增 PGT 游戏平台的 API接口和实现类
- 添加 PGT 游戏平台的会员账户生成逻辑
- 实现 PGT 游戏平台的余额查询、转账等功能
- 添加 PGT 游戏平台的错误响应和数据模型类
main-meitian
shi 2025-04-03 16:57:14 +08:00
parent ebbf2e14a2
commit 3ce8dba98f
2 changed files with 4 additions and 4 deletions

View File

@ -58,8 +58,8 @@ public interface PGTClient {
* @param parameters
* @return {@link PGXGameLoginResponse }
*/
@Post("/launchGames.aspx?${parameters}")
PGXGameLoginResponse loginWithoutRedirect(@Var("parameters") String parameters);
@Post("/logIn")
PGXGameLoginResponse loginWithoutRedirect(@JSONBody Map<String, Object> parameters, @Header Map<String, String> headerMap);

View File

@ -178,7 +178,7 @@ public class GamesPGTServiceImpl implements IGamesService {
*/
@Override
public String loginWithoutRedirect(GamesLogin gamesLogin) {
log.info("GamesPGXServiceImpl [loginWithoutRedirect] 请求参数 {}", gamesLogin);
log.info("GamesPGTServiceImpl [loginWithoutRedirect] 请求参数 {}", gamesLogin);
GameSecretKey gameSecretKey = gameSecretKeyService.selectGameSecretKeyByCode(gamesLogin.getAgentId());
Map<String, Object> params = new LinkedHashMap<>();
params.put("operatorcode", gamesLogin.getAgentId());
@ -191,7 +191,7 @@ public class GamesPGTServiceImpl implements IGamesService {
params.put("lang", gamesLogin.getLang());
params.put("html5", 1);
params.put("signature", key);
PGXGameLoginResponse PGXGameLoginResponse = pgtClient.loginWithoutRedirect(JsonUtil.mapToQueryString(params));
PGXGameLoginResponse PGXGameLoginResponse = pgtClient.loginWithoutRedirect(params,key);
//判断是否获取成功
if (this.getIsSuccess(PGXGameLoginResponse.getErrCode())) {
return PGXGameLoginResponse.getGameUrl();