|
@@ -1,5 +1,9 @@
|
|
|
package com.zanxiang.game.platform.serve.controller.api;
|
|
|
|
|
|
+import com.zanxiang.game.platform.serve.pojo.dto.PlatformDeYangOrderDTO;
|
|
|
+import com.zanxiang.game.platform.serve.pojo.dto.PlatformDeYangUserDTO;
|
|
|
+import com.zanxiang.game.platform.serve.service.IPlatformDeYangOrderService;
|
|
|
+import com.zanxiang.game.platform.serve.service.IPlatformDeYangUserService;
|
|
|
import com.zanxiang.module.util.JsonUtil;
|
|
|
import com.zanxiang.module.util.pojo.ResultVO;
|
|
|
import io.swagger.annotations.Api;
|
|
@@ -7,13 +11,13 @@ 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.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
-import java.util.Map;
|
|
|
-
|
|
|
/**
|
|
|
* @author : lingfeng
|
|
|
* @time : 2023-05-22
|
|
@@ -25,20 +29,26 @@ import java.util.Map;
|
|
|
@RequestMapping("/api/deYang/game")
|
|
|
public class PlatformDeYangApiController {
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IPlatformDeYangOrderService platformDeYangOrderService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IPlatformDeYangUserService platformDeYangUserService;
|
|
|
+
|
|
|
@ApiOperation(value = "用户信息推送接口")
|
|
|
@PostMapping("/user")
|
|
|
@ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
|
|
|
- public ResultVO<Boolean> pushUserInfo(@RequestBody Map<String, String> userParam) {
|
|
|
- log.error("接收到德扬用户信息推送, userParam : {}", JsonUtil.toString(userParam));
|
|
|
- return ResultVO.ok(Boolean.FALSE);
|
|
|
+ public ResultVO<Boolean> pushUserInfo(@RequestBody @Validated PlatformDeYangUserDTO userDTO) {
|
|
|
+ log.error("接收到德扬用户信息推送, userDTO : {}", JsonUtil.toString(userDTO));
|
|
|
+ return ResultVO.ok(platformDeYangUserService.addOrUpdate(userDTO));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "订单信息推送接口")
|
|
|
@PostMapping("/order")
|
|
|
@ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
|
|
|
- public ResultVO<Boolean> pushOrderInfo(@RequestBody Map<String, String> orderParam) {
|
|
|
- log.error("接收到德扬订单信息推送, orderParam : {}", JsonUtil.toString(orderParam));
|
|
|
- return ResultVO.ok(Boolean.FALSE);
|
|
|
+ public ResultVO<Boolean> pushOrderInfo(@RequestBody @Validated PlatformDeYangOrderDTO orderDTO) {
|
|
|
+ log.error("接收到德扬订单信息推送, orderParam : {}", JsonUtil.toString(orderDTO));
|
|
|
+ return ResultVO.ok(platformDeYangOrderService.addOrUpdate(orderDTO));
|
|
|
}
|
|
|
|
|
|
}
|