|
@@ -11,10 +11,7 @@ import com.zanxiang.game.back.base.tencent.pojo.dto.TencentOrderDTO;
|
|
|
import com.zanxiang.game.back.base.tencent.pojo.dto.TencentUserDTO;
|
|
|
import com.zanxiang.game.back.base.tencent.rpc.IGameBackTencentRpc;
|
|
|
import com.zanxiang.game.module.base.pojo.enums.GameCategoryEnum;
|
|
|
-import com.zanxiang.game.module.mybatis.entity.Agent;
|
|
|
-import com.zanxiang.game.module.mybatis.entity.Game;
|
|
|
-import com.zanxiang.game.module.mybatis.entity.GameApplet;
|
|
|
-import com.zanxiang.game.module.mybatis.entity.User;
|
|
|
+import com.zanxiang.game.module.mybatis.entity.*;
|
|
|
import com.zanxiang.game.module.sdk.pojo.dto.PlatformOrderDTO;
|
|
|
import com.zanxiang.game.module.sdk.service.*;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -53,8 +50,16 @@ public class CallBackServiceImpl implements ICallBackService {
|
|
|
@Autowired
|
|
|
private IUserService userService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IGameExtService gameExtService;
|
|
|
+
|
|
|
@Override
|
|
|
public void userCallBack(User user, Tuple2<Long, Map<String, String>> tuple2) {
|
|
|
+ //判断游戏是否开启广告回传, 未开启, 不回传
|
|
|
+ GameExt gameExt = gameExtService.getByGameId(user.getGameId());
|
|
|
+ if (!Objects.equals(gameExt.getAdCallBackSwitch(), Boolean.TRUE)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
Long agentId = tuple2.getT1();
|
|
|
Map<String, String> urlParamMap = tuple2.getT2();
|
|
|
//自然量, 或者跳转链接参数不存在, 不做回传处理
|
|
@@ -92,6 +97,11 @@ public class CallBackServiceImpl implements ICallBackService {
|
|
|
|
|
|
@Override
|
|
|
public void orderCallBack(PlatformOrderDTO platformOrderDTO) {
|
|
|
+ //判断游戏是否开启广告回传, 未开启, 不回传
|
|
|
+ GameExt gameExt = gameExtService.getByGameId(platformOrderDTO.getGameId());
|
|
|
+ if (!Objects.equals(gameExt.getAdCallBackSwitch(), Boolean.TRUE)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
//查询用户渠道信息
|
|
|
Agent agent = agentService.getById(platformOrderDTO.getAgentId());
|
|
|
if (agent == null) {
|