From def723a6fa9cbe05734afe9011a6f90d2fa32196 Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Wed, 03 Jun 2020 17:07:23 +0800 Subject: [PATCH] interface tiaozheng --- src/main/java/com/xcong/excoin/modules/home/controller/MemberQuickBuySaleController.java | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 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 8b7b99a..a6dbf07 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 @@ -5,9 +5,11 @@ 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.PostMapping; 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.RequestParam; import org.springframework.web.bind.annotation.RestController; import com.alibaba.druid.util.StringUtils; @@ -55,8 +57,6 @@ if (StringUtils.isEmpty(tradePasswordWeb)) { return Result.fail("请输入交易密码"); } - // System.out.println("交易密码:"+MD5.GetMD5Code(tradePasswordWeb)+" tradePassword = - // "+tradePassword); // 验证交易密码 if (!tradePassword.equals(SecureUtil.md5(tradePasswordWeb))) { return Result.fail("请输入正确的交易密码"); @@ -67,7 +67,7 @@ @ApiOperation(value = "commitPay", notes = "USDT充值支付确认") @RequestMapping(value = "/commitPay", method = RequestMethod.POST) - public Result commitPay(@RequestBody MemberQuickBuySaleCommitDto memberQuickBuySaleCommitDto) { + public Result commitPay(@RequestBody @Valid MemberQuickBuySaleCommitDto memberQuickBuySaleCommitDto) { return memberQuickBuySaleService.commitPay(memberQuickBuySaleCommitDto); } @@ -77,9 +77,15 @@ return memberQuickBuySaleService.selectById(id); } + @ApiOperation(value = "selectAll", notes = "查询用户所有的买卖记录") + @GetMapping(value = "/selectAll") + public Result selectAll(@RequestParam(value = "type") String type) { + return memberQuickBuySaleService.selectAll(type); + } + @ApiOperation(value = "cancel", notes = "充值撤销") - @GetMapping(value = "/cancel/{id}") - public Result cancel(@PathVariable(value = "id") Long id) { + @GetMapping(value = "/cancel") + public Result cancel(@RequestParam(value = "id") Long id) { return memberQuickBuySaleService.cancelRecharge(id); } -- Gitblit v1.9.1