|
@@ -0,0 +1,50 @@
|
|
|
+package com.zanxiang.game.back.serve.rpc.impl;
|
|
|
+
|
|
|
+import com.zanxiang.game.back.base.pojo.dto.*;
|
|
|
+import com.zanxiang.game.back.base.pojo.enums.OrderStatusEnum;
|
|
|
+import com.zanxiang.game.back.base.rpc.ITtAppBackRpc;
|
|
|
+import com.zanxiang.game.back.serve.service.IGameBackPolicyService;
|
|
|
+import com.zanxiang.game.module.base.ServerInfo;
|
|
|
+import com.zanxiang.game.module.base.rpc.IAgentRpc;
|
|
|
+import com.zanxiang.module.util.JsonUtil;
|
|
|
+import com.zanxiang.module.util.pojo.ResultVO;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.dubbo.config.annotation.DubboReference;
|
|
|
+import org.apache.dubbo.config.annotation.DubboService;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+
|
|
|
+import java.util.Objects;
|
|
|
+
|
|
|
+@Slf4j
|
|
|
+@DubboService
|
|
|
+public class TtAppBackRpcImpl implements ITtAppBackRpc {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IGameBackPolicyService gameBackPolicyService;
|
|
|
+
|
|
|
+ @DubboReference(providedBy = ServerInfo.SERVER_DUBBO_NAME)
|
|
|
+ private IAgentRpc agentRpc;
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public ResultVO<Boolean> userActiveReport(TtUserActiveAppRpcDTO dto) {
|
|
|
+ log.error("头条 APP用户回传收到:{}", JsonUtil.toString(dto));
|
|
|
+ return ResultVO.ok(Boolean.TRUE);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public ResultVO<Boolean> orderReport(TtOrderAppRpcDTO dto) {
|
|
|
+ if (Objects.equals(OrderStatusEnum.SUCCESS_PAY.getValue(), dto.getOrderStatus())) {
|
|
|
+ log.error("头条 APP订单回传收到:{}。", JsonUtil.toString(dto));
|
|
|
+ } else {
|
|
|
+ log.error("头条 APP订单回传收到:{}。订单未支付,直接过滤", JsonUtil.toString(dto));
|
|
|
+ return ResultVO.ok(true);
|
|
|
+ }
|
|
|
+ return ResultVO.ok(Boolean.TRUE);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public ResultVO<Boolean> roleRegisterReport(TtRoleRegisterAppRpcDTO dto) {
|
|
|
+ log.error("头条 APP创角回传收到:{}", JsonUtil.toString(dto));
|
|
|
+ return ResultVO.ok(Boolean.TRUE);
|
|
|
+ }
|
|
|
+}
|