|
@@ -8,8 +8,11 @@ import com.github.sd4324530.jtuple.Tuple2;
|
|
import com.github.sd4324530.jtuple.Tuple3;
|
|
import com.github.sd4324530.jtuple.Tuple3;
|
|
import com.zanxiang.advertising.tencent.base.AdvertisingTencentServer;
|
|
import com.zanxiang.advertising.tencent.base.AdvertisingTencentServer;
|
|
import com.zanxiang.advertising.tencent.base.pojo.dto.DataReportOfAccountIdRpcDTO;
|
|
import com.zanxiang.advertising.tencent.base.pojo.dto.DataReportOfAccountIdRpcDTO;
|
|
|
|
+import com.zanxiang.advertising.tencent.base.pojo.dto.DataReportOfAccountIdV3RpcDTO;
|
|
import com.zanxiang.advertising.tencent.base.pojo.dto.UserActionRpcDTO;
|
|
import com.zanxiang.advertising.tencent.base.pojo.dto.UserActionRpcDTO;
|
|
|
|
+import com.zanxiang.advertising.tencent.base.pojo.dto.UserActionV3RpcDTO;
|
|
import com.zanxiang.advertising.tencent.base.rpc.IUserActionSetRpc;
|
|
import com.zanxiang.advertising.tencent.base.rpc.IUserActionSetRpc;
|
|
|
|
+import com.zanxiang.advertising.tencent.base.rpc.IUserActionSetV3Rpc;
|
|
import com.zanxiang.game.back.base.pojo.enums.OrderStatusEnum;
|
|
import com.zanxiang.game.back.base.pojo.enums.OrderStatusEnum;
|
|
import com.zanxiang.game.back.serve.dao.mapper.GameTencentAppApiOrderMapper;
|
|
import com.zanxiang.game.back.serve.dao.mapper.GameTencentAppApiOrderMapper;
|
|
import com.zanxiang.game.back.serve.pojo.TencentAppReport;
|
|
import com.zanxiang.game.back.serve.pojo.TencentAppReport;
|
|
@@ -22,6 +25,7 @@ import com.zanxiang.game.back.serve.service.*;
|
|
import com.zanxiang.game.back.serve.utils.BackPolicyUtil;
|
|
import com.zanxiang.game.back.serve.utils.BackPolicyUtil;
|
|
import com.zanxiang.module.util.DateUtil;
|
|
import com.zanxiang.module.util.DateUtil;
|
|
import com.zanxiang.module.util.NumberUtil;
|
|
import com.zanxiang.module.util.NumberUtil;
|
|
|
|
+import com.zanxiang.module.util.ObjectUtil;
|
|
import com.zanxiang.module.util.URIUtil;
|
|
import com.zanxiang.module.util.URIUtil;
|
|
import com.zanxiang.module.util.encryption.Md5Util;
|
|
import com.zanxiang.module.util.encryption.Md5Util;
|
|
import com.zanxiang.module.util.exception.BaseException;
|
|
import com.zanxiang.module.util.exception.BaseException;
|
|
@@ -46,7 +50,7 @@ public class GameTencentAppApiOrderServiceImpl extends ServiceImpl<GameTencentAp
|
|
implements IGameTencentAppApiOrderService {
|
|
implements IGameTencentAppApiOrderService {
|
|
|
|
|
|
@DubboReference(providedBy = AdvertisingTencentServer.SERVER_DUBBO_NAME)
|
|
@DubboReference(providedBy = AdvertisingTencentServer.SERVER_DUBBO_NAME)
|
|
- private IUserActionSetRpc userActionSetRpc;
|
|
|
|
|
|
+ private IUserActionSetV3Rpc userActionSetRpc;
|
|
@Autowired
|
|
@Autowired
|
|
private IGameTencentAppApiBackLogService gameTencentAppApiBackLogService;
|
|
private IGameTencentAppApiBackLogService gameTencentAppApiBackLogService;
|
|
@Autowired
|
|
@Autowired
|
|
@@ -219,20 +223,32 @@ implements IGameTencentAppApiOrderService {
|
|
}
|
|
}
|
|
GameTencentAppCallback callback = gameTencentAppCallbackService.getById(user.getCallbackId());
|
|
GameTencentAppCallback callback = gameTencentAppCallbackService.getById(user.getCallbackId());
|
|
|
|
|
|
|
|
+ UserActionV3RpcDTO.UserIdRpcDTO userId = UserActionV3RpcDTO.UserIdRpcDTO.builder().build();
|
|
|
|
+ if ("android".equalsIgnoreCase(callback.getDeviceOsType())) {
|
|
|
|
+ if(StringUtils.isNotBlank(callback.getMuid())) {
|
|
|
|
+ userId.setHashImei(callback.getMuid());
|
|
|
|
+ }
|
|
|
|
+ if(StringUtils.isNotBlank(callback.getHashOaid())) {
|
|
|
|
+ userId.setHashOaid(callback.getHashOaid());
|
|
|
|
+ }
|
|
|
|
+ if(StringUtils.isNotBlank(callback.getHashAndroidId())) {
|
|
|
|
+ userId.setHashAndroidId(callback.getHashAndroidId());
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ if(StringUtils.isNotBlank(callback.getMuid())) {
|
|
|
|
+ userId.setHashIdfa(callback.getMuid());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
Map<String, Object> actionParams = new HashMap<>();
|
|
Map<String, Object> actionParams = new HashMap<>();
|
|
actionParams.put("value", backMoney);
|
|
actionParams.put("value", backMoney);
|
|
- DataReportOfAccountIdRpcDTO dataReportOfAccountIdRpcDTO = DataReportOfAccountIdRpcDTO.builder()
|
|
|
|
|
|
+ DataReportOfAccountIdV3RpcDTO dataReportOfAccountIdRpcDTO = DataReportOfAccountIdV3RpcDTO.builder()
|
|
.accountId(user.getAdAccountId())
|
|
.accountId(user.getAdAccountId())
|
|
.userActionSetId(user.getUserActionSetId())
|
|
.userActionSetId(user.getUserActionSetId())
|
|
- .action(UserActionRpcDTO.builder()
|
|
|
|
|
|
+ .action(UserActionV3RpcDTO.builder()
|
|
.actionTime(backTime)
|
|
.actionTime(backTime)
|
|
.actionType(ActionTypeEnum.PURCHASE.getActionType())
|
|
.actionType(ActionTypeEnum.PURCHASE.getActionType())
|
|
- .userId(UserActionRpcDTO.UserIdRpcDTO.builder()
|
|
|
|
- .hashImei(StringUtils.isBlank(user.getImei()) ? null : Md5Util.encrypt32(user.getImei().toLowerCase()).toLowerCase())
|
|
|
|
- .hashIdfa(StringUtils.isBlank(user.getOaid()) ? null : Md5Util.encrypt32(user.getIdfa().toLowerCase()).toLowerCase())
|
|
|
|
- .hashOaid(StringUtils.isBlank(user.getOaid()) ? null : Md5Util.encrypt32(user.getOaid().toLowerCase()).toLowerCase())
|
|
|
|
- .build())
|
|
|
|
- .trace(UserActionRpcDTO.TraceRpcDTO.builder()
|
|
|
|
|
|
+ .userId(userId)
|
|
|
|
+ .trace(UserActionV3RpcDTO.TraceRpcDTO.builder()
|
|
.clickId(callback.getClickId())
|
|
.clickId(callback.getClickId())
|
|
.build())
|
|
.build())
|
|
.actionParam(actionParams)
|
|
.actionParam(actionParams)
|
|
@@ -447,7 +463,7 @@ implements IGameTencentAppApiOrderService {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public Long totalRechargeAmount() {
|
|
public Long totalRechargeAmount() {
|
|
- return gameTencentAppApiOrderService.count(new QueryWrapper<GameTencentAppApiOrder>()
|
|
|
|
|
|
+ Map<String, Object> data = gameTencentAppApiOrderService.getMap(new QueryWrapper<GameTencentAppApiOrder>()
|
|
.select("ifnull(sum(recharge_money), 0) as recharge_money").lambda()
|
|
.select("ifnull(sum(recharge_money), 0) as recharge_money").lambda()
|
|
.eq(GameTencentAppApiOrder::getGameId, orderLog.getGameId())
|
|
.eq(GameTencentAppApiOrder::getGameId, orderLog.getGameId())
|
|
.eq(GameTencentAppApiOrder::getAdAccountId, orderLog.getAdAccountId())
|
|
.eq(GameTencentAppApiOrder::getAdAccountId, orderLog.getAdAccountId())
|
|
@@ -456,6 +472,7 @@ implements IGameTencentAppApiOrderService {
|
|
.eq(GameTencentAppApiOrder::getUserId, orderLog.getUserId())
|
|
.eq(GameTencentAppApiOrder::getUserId, orderLog.getUserId())
|
|
.ne(GameTencentAppApiOrder::getOrderId, orderLog.getOrderId())
|
|
.ne(GameTencentAppApiOrder::getOrderId, orderLog.getOrderId())
|
|
);
|
|
);
|
|
|
|
+ return ObjectUtil.objToLong(data.get("recharge_money"), 0L);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|