|
@@ -0,0 +1,48 @@
|
|
|
+package com.zanxiang.game.module.sdk.controller;
|
|
|
+
|
|
|
+import com.zanxiang.game.module.sdk.annotation.ValidLogin;
|
|
|
+import com.zanxiang.game.module.sdk.pojo.param.CallBackControlParam;
|
|
|
+import com.zanxiang.game.module.sdk.pojo.param.UserData;
|
|
|
+import com.zanxiang.game.module.sdk.service.ICallBackService;
|
|
|
+import com.zanxiang.game.module.sdk.service.IGameService;
|
|
|
+import com.zanxiang.module.util.pojo.ResultVO;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import io.swagger.annotations.ApiResponse;
|
|
|
+import io.swagger.annotations.ApiResponses;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author : lingfeng
|
|
|
+ * @time : 2024-06-26
|
|
|
+ * @description : 回传相关接口
|
|
|
+ */
|
|
|
+@Api(tags = "回传控制相关接口")
|
|
|
+@RestController
|
|
|
+@Slf4j
|
|
|
+@RequestMapping(value = "/api/ad/back")
|
|
|
+public class CallBackController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IGameService gameService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ICallBackService callBackService;
|
|
|
+
|
|
|
+ @ApiOperation(value = "获取游戏广告媒体回传sdk配置")
|
|
|
+ @GetMapping("/ad/sdk/config")
|
|
|
+ @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = String.class)})
|
|
|
+ public ResultVO<String> getAdSdkConfig(UserData userData) {
|
|
|
+ return ResultVO.ok(gameService.getAdSdkConfig(userData));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "判断事件是否回传")
|
|
|
+ @PostMapping("/call/judge")
|
|
|
+ @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
|
|
|
+ public ResultVO<Boolean> callBackJudge(@Validated @RequestBody CallBackControlParam param, @ValidLogin UserData userData) {
|
|
|
+ return ResultVO.ok(callBackService.callBackJudge(param, userData));
|
|
|
+ }
|
|
|
+}
|