From e41f83ce93b31c3d2ed416a8b45dc493177e6dd8 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Wed, 12 May 2021 17:51:57 +0800
Subject: [PATCH] Merge branch 'yunding' of http://120.27.238.55:7000/r/exchange into yunding
---
src/main/java/com/xcong/excoin/modules/yunding/controller/YunDingController.java | 123 +++++++++++++++++++++++++++++++++++++++-
1 files changed, 119 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/modules/yunding/controller/YunDingController.java b/src/main/java/com/xcong/excoin/modules/yunding/controller/YunDingController.java
index ffa347e..f996c80 100644
--- a/src/main/java/com/xcong/excoin/modules/yunding/controller/YunDingController.java
+++ b/src/main/java/com/xcong/excoin/modules/yunding/controller/YunDingController.java
@@ -1,11 +1,16 @@
package com.xcong.excoin.modules.yunding.controller;
-import com.xcong.excoin.modules.activity.service.ActivityService;
+import com.xcong.excoin.common.response.Result;
+import com.xcong.excoin.modules.yunding.dto.InsureChangeUsdtDto;
+import com.xcong.excoin.modules.yunding.dto.PayProductDto;
+import com.xcong.excoin.modules.yunding.dto.YdOrderListDto;
+import com.xcong.excoin.modules.yunding.dto.YdProductListDto;
import com.xcong.excoin.modules.yunding.service.YunDingService;
-import io.swagger.annotations.Api;
+import com.xcong.excoin.modules.yunding.vo.*;
+import io.swagger.annotations.*;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -18,5 +23,115 @@
@Resource
YunDingService yunDingService;
+ /**
+ * 全网数据
+ */
+ @ApiOperation(value = "全网数据")
+ @ApiResponses({
+ @ApiResponse(code = 0, message = "success", response = YdBasicSettingVo.class)
+ })
+ @GetMapping(value = "/findAllInfo")
+ public Result findAllInfo() {
+ return yunDingService.findAllInfo();
+ }
+
+ /**
+ * 算力产品列表
+ */
+ @ApiOperation(value = "产品列表")
+ @ApiResponses({
+ @ApiResponse(code = 0, message = "success", response = YdProductVo.class)
+ })
+ @PostMapping(value = "/getProductList")
+ public Result getProductList(@RequestBody @Validated YdProductListDto ydProductListDto) {
+ return yunDingService.getProductList(ydProductListDto);
+ }
+
+ /**
+ * 获取算力产品详情
+ */
+ @ApiOperation(value = "获取产品详情")
+ @GetMapping(value = "/findProductInfo")
+ public Result findProductInfoById(@ApiParam(name = "id", value = "产品ID", required = true, example = "1")
+ @RequestParam(value = "id") Long id) {
+ return yunDingService.findProductInfoById(id);
+ }
+
+ /**
+ * 获取USDT余额
+ */
+ @ApiOperation(value = "获取USDT余额")
+ @GetMapping(value = "/getBalance")
+ public Result getBalance() {
+ return yunDingService.getBalance();
+ }
+
+ /**
+ * 支付
+ */
+ @ApiOperation(value = "购买,点击支付")
+ @PostMapping(value = "/payProduct")
+ public Result payProduct(@RequestBody @Validated PayProductDto payProductDto) {
+ return yunDingService.payProduct(payProductDto);
+ }
+
+ /**
+ * 订单列表
+ */
+ @ApiOperation(value = "订单列表")
+ @ApiResponses({
+ @ApiResponse(code = 0, message = "success", response = YdOrderVo.class)
+ })
+ @PostMapping(value = "/getOrderList")
+ public Result getOrderList(@RequestBody @Validated YdOrderListDto ydOrderListDto) {
+ return yunDingService.getOrderList(ydOrderListDto);
+ }
+
+ /**
+ * 订单详情
+ */
+ @ApiOperation(value = "订单详情")
+ @ApiResponses({
+ @ApiResponse(code = 0, message = "success", response = YdOrderVo.class)
+ })
+ @GetMapping(value = "/getOrderInfo")
+ public Result getOrderInfo(@ApiParam(name = "id", value = "订单ID", required = true, example = "1")
+ @RequestParam(value = "id") Long id) {
+ return yunDingService.getOrderInfo(id);
+ }
+
+ /**
+ *订单头部数据
+ */
+ @ApiOperation(value = "订单头部数据")
+ @ApiResponses({
+ @ApiResponse(code = 0, message = "success", response = OrderAllInfoVo.class)
+ })
+ @GetMapping(value = "/findOrderAllInfo")
+ public Result findOrderAllInfo() {
+ return yunDingService.findOrderAllInfo();
+ }
+
+ /**
+ * 转换成USDT
+ */
+ @ApiOperation(value = "获取转换成USDT信息")
+ @ApiResponses({
+ @ApiResponse(code = 0, message = "success", response = ChangeVo.class)
+ })
+ @GetMapping(value = "/changeUsdt")
+ public Result changeUsdt() {
+ return yunDingService.changeUsdt();
+ }
+
+ /**
+ * 确认转换成USDT
+ */
+ @ApiOperation(value = "确认转换成USDT")
+ @PostMapping(value = "/insureChangeUsdt")
+ public Result insureChangeUsdt(@RequestBody @Validated InsureChangeUsdtDto insureChangeUsdtdto){
+ return yunDingService.insureChangeUsdt(insureChangeUsdtdto);
+ }
+
}
--
Gitblit v1.9.1