feat(game): 添加 PGT 游戏平台支持
- 新增 PGT 游戏平台的 API接口和实现类 - 添加 PGT 游戏平台的会员账户生成逻辑 - 实现 PGT 游戏平台的余额查询、转账等功能 - 添加 PGT 游戏平台的错误响应和数据模型类main-meitian
parent
ebbf2e14a2
commit
3ce8dba98f
|
@ -58,8 +58,8 @@ public interface PGTClient {
|
||||||
* @param parameters 范围
|
* @param parameters 范围
|
||||||
* @return {@link PGXGameLoginResponse }
|
* @return {@link PGXGameLoginResponse }
|
||||||
*/
|
*/
|
||||||
@Post("/launchGames.aspx?${parameters}")
|
@Post("/logIn")
|
||||||
PGXGameLoginResponse loginWithoutRedirect(@Var("parameters") String parameters);
|
PGXGameLoginResponse loginWithoutRedirect(@JSONBody Map<String, Object> parameters, @Header Map<String, String> headerMap);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -178,7 +178,7 @@ public class GamesPGTServiceImpl implements IGamesService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String loginWithoutRedirect(GamesLogin gamesLogin) {
|
public String loginWithoutRedirect(GamesLogin gamesLogin) {
|
||||||
log.info("GamesPGXServiceImpl [loginWithoutRedirect] 请求参数 {}", gamesLogin);
|
log.info("GamesPGTServiceImpl [loginWithoutRedirect] 请求参数 {}", gamesLogin);
|
||||||
GameSecretKey gameSecretKey = gameSecretKeyService.selectGameSecretKeyByCode(gamesLogin.getAgentId());
|
GameSecretKey gameSecretKey = gameSecretKeyService.selectGameSecretKeyByCode(gamesLogin.getAgentId());
|
||||||
Map<String, Object> params = new LinkedHashMap<>();
|
Map<String, Object> params = new LinkedHashMap<>();
|
||||||
params.put("operatorcode", gamesLogin.getAgentId());
|
params.put("operatorcode", gamesLogin.getAgentId());
|
||||||
|
@ -191,7 +191,7 @@ public class GamesPGTServiceImpl implements IGamesService {
|
||||||
params.put("lang", gamesLogin.getLang());
|
params.put("lang", gamesLogin.getLang());
|
||||||
params.put("html5", 1);
|
params.put("html5", 1);
|
||||||
params.put("signature", key);
|
params.put("signature", key);
|
||||||
PGXGameLoginResponse PGXGameLoginResponse = pgtClient.loginWithoutRedirect(JsonUtil.mapToQueryString(params));
|
PGXGameLoginResponse PGXGameLoginResponse = pgtClient.loginWithoutRedirect(params,key);
|
||||||
//判断是否获取成功
|
//判断是否获取成功
|
||||||
if (this.getIsSuccess(PGXGameLoginResponse.getErrCode())) {
|
if (this.getIsSuccess(PGXGameLoginResponse.getErrCode())) {
|
||||||
return PGXGameLoginResponse.getGameUrl();
|
return PGXGameLoginResponse.getGameUrl();
|
||||||
|
|
Loading…
Reference in New Issue