xiaoyong931011
2020-05-25 5f1c26bb2072793cc4391525f608d22342ac8e20
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);
   }
}