|
@@ -243,15 +243,10 @@ public class CallBackServiceImpl implements ICallBackService {
|
|
|
}
|
|
|
|
|
|
private TtRoleRegisterRpcDTO transform(User user, Agent agent, GameUserRole gameUserRole, GameApplet gameApplet) {
|
|
|
- TtAccountRpcDTO ttAccountRpcDTO = TtAccountRpcDTO.builder()
|
|
|
- .accountId(agent.getAccountId())
|
|
|
- .reportToken(agent.getReportToken())
|
|
|
- .reportUrl(agent.getReportUrl())
|
|
|
- .build();
|
|
|
return TtRoleRegisterRpcDTO.builder()
|
|
|
.gameId(agent.getGameId())
|
|
|
.backPolicyId(agent.getBackPolicyId())
|
|
|
- .accountReport(ttAccountRpcDTO)
|
|
|
+ .accountReport(this.transform(agent))
|
|
|
.wechatAppId(gameApplet == null ? null : gameApplet.getAppId())
|
|
|
.wechatOpenId(user.getOpenId())
|
|
|
.agentKey(agent.getAgentKey())
|
|
@@ -275,16 +270,11 @@ public class CallBackServiceImpl implements ICallBackService {
|
|
|
}
|
|
|
|
|
|
private TtUserActiveRpcDTO transform(User user, Agent agent, GameApplet gameApplet, Map<String, String> urlParamMap) {
|
|
|
- TtAccountRpcDTO ttAccountRpcDTO = TtAccountRpcDTO.builder()
|
|
|
- .accountId(agent.getAccountId())
|
|
|
- .reportToken(agent.getReportToken())
|
|
|
- .reportUrl(agent.getReportUrl())
|
|
|
- .build();
|
|
|
return TtUserActiveRpcDTO.builder()
|
|
|
.gameId(agent.getGameId())
|
|
|
.wechatAppId(gameApplet == null ? null : gameApplet.getAppId())
|
|
|
.wechatOpenId(user.getOpenId())
|
|
|
- .accountReport(ttAccountRpcDTO)
|
|
|
+ .accountReport(this.transform(agent))
|
|
|
.agentKey(agent.getAgentKey())
|
|
|
.backPolicyId(agent.getBackPolicyId())
|
|
|
.activeTime(user.getCreateTime())
|
|
@@ -317,14 +307,9 @@ public class CallBackServiceImpl implements ICallBackService {
|
|
|
}
|
|
|
|
|
|
private TtOrderRpcDTO transform(PlatformOrderDTO platformOrderDTO, String openId, Agent agent, GameApplet gameApplet, LocalDateTime regTime) {
|
|
|
- TtAccountRpcDTO ttAccountRpcDTO = TtAccountRpcDTO.builder()
|
|
|
- .accountId(agent.getAccountId())
|
|
|
- .reportToken(agent.getReportToken())
|
|
|
- .reportUrl(agent.getReportUrl())
|
|
|
- .build();
|
|
|
return TtOrderRpcDTO.builder()
|
|
|
.gameId(agent.getGameId())
|
|
|
- .accountReport(ttAccountRpcDTO)
|
|
|
+ .accountReport(this.transform(agent))
|
|
|
.wechatAppId(gameApplet == null ? null : gameApplet.getAppId())
|
|
|
.wechatOpenId(openId)
|
|
|
.orderId(platformOrderDTO.getOrderId())
|
|
@@ -339,4 +324,12 @@ public class CallBackServiceImpl implements ICallBackService {
|
|
|
.roleName(platformOrderDTO.getRoleName())
|
|
|
.build();
|
|
|
}
|
|
|
+
|
|
|
+ private TtAccountRpcDTO transform(Agent agent) {
|
|
|
+ return TtAccountRpcDTO.builder()
|
|
|
+ .accountId(agent.getAccountId())
|
|
|
+ .reportToken(agent.getReportToken())
|
|
|
+ .reportUrl(agent.getReportUrl())
|
|
|
+ .build();
|
|
|
+ }
|
|
|
}
|