From caef53a16aff2baadad1c5f49e80a915ba97f674 Mon Sep 17 00:00:00 2001
From: gao <gaoleox@163>
Date: Mon, 25 May 2020 11:25:49 +0800
Subject: [PATCH] 快捷买卖接口

---
 src/main/java/com/xcong/excoin/modules/home/controller/MemberQuickBuySaleController.java |   51 +++++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 45 insertions(+), 6 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/modules/home/controller/MemberQuickBuySaleController.java b/src/main/java/com/xcong/excoin/modules/home/controller/MemberQuickBuySaleController.java
index d877e07..32725f9 100644
--- a/src/main/java/com/xcong/excoin/modules/home/controller/MemberQuickBuySaleController.java
+++ b/src/main/java/com/xcong/excoin/modules/home/controller/MemberQuickBuySaleController.java
@@ -1,25 +1,64 @@
 package com.xcong.excoin.modules.home.controller;
 
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
 
+import com.xcong.excoin.common.response.Result;
+import com.xcong.excoin.modules.home.dto.MemberQuickBuySaleCommitDto;
 import com.xcong.excoin.modules.home.dto.MemberQuickBuySaleDto;
+import com.xcong.excoin.modules.home.service.MemberQuickBuySaleService;
 
-import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 
 @RestController
 @RequestMapping(value = "/api/quick")
+@Api(value = "USDT快捷买卖类", tags = "USDT快捷买卖类")
 public class MemberQuickBuySaleController {
 
+	@Autowired
+	MemberQuickBuySaleService memberQuickBuySaleService;
+
 	@ApiOperation(value = "USDT快速充值", notes = "USDT快速充值")
-	@ApiImplicitParam(name = "token", value = "token", required = false, dataType = "String", paramType = "body")
 	@RequestMapping(value = "/recharge", method = RequestMethod.POST)
-	public void recharge(@RequestBody MemberQuickBuySaleDto memberQuickBuySaleDto) {
-		// 获取当前登录用户
-		// String mId = (String) redisUtil.get(token);
-		
+	public Result recharge(@RequestBody MemberQuickBuySaleDto memberQuickBuySaleDto) {
+		return memberQuickBuySaleService.recharge(memberQuickBuySaleDto);
 	}
+	
+	
+	@ApiOperation(value = "USDT充值支付确认", notes = "USDT充值支付确认")
+	@RequestMapping(value = "/commitPay", method = RequestMethod.POST)
+	public Result commitPay(@RequestBody MemberQuickBuySaleCommitDto memberQuickBuySaleCommitDto) {
+		return memberQuickBuySaleService.commitPay(memberQuickBuySaleCommitDto);
+	}
+	
+	@ApiOperation(value = "查询单个买卖记录", notes = "查询单个买卖记录")
+	@GetMapping(value = "/selectById/{id}")
+	public Result selectById(@PathVariable(value = "id") Long id) {
+		return memberQuickBuySaleService.selectById(id);
+	}
+	
+	
+	
+	/**
+	 * 充值撤销
+	 * 
+	 * @param memberChargeUsdt
+	 * @param page
+	 * @param rows
+	 * @return
+	 */
+	@ApiOperation(value = "充值撤销", notes = "充值撤销")
+	@GetMapping(value = "/cancel/{id}")
+	public Result cancel(@PathVariable(value = "id") Long id) {
+		return memberQuickBuySaleService.cancelRecharge(id);
+	}
+	
+	
+	
 }

--
Gitblit v1.9.1