| | |
| | | package com.xcong.excoin.modules.home.controller;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.validation.Valid;
|
| | |
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | |
| | | import com.xcong.excoin.modules.home.dto.MemberQuickBuySaleDto;
|
| | | import com.xcong.excoin.modules.home.service.MemberQuickBuySaleService;
|
| | | import com.xcong.excoin.modules.member.entity.MemberEntity;
|
| | | import com.xcong.excoin.modules.member.service.MemberService;
|
| | |
|
| | | import cn.hutool.crypto.SecureUtil;
|
| | | import io.swagger.annotations.Api;
|
| | |
| | |
|
| | | @Autowired
|
| | | MemberQuickBuySaleService memberQuickBuySaleService;
|
| | | @Autowired
|
| | | MemberService memberService;
|
| | |
|
| | | @ApiOperation(value = "recharge", notes = "USDT快速充值")
|
| | | @RequestMapping(value = "/recharge", method = RequestMethod.POST)
|
| | |
| | | @RequestMapping(value = "/sell", method = RequestMethod.POST)
|
| | | public Result sell(@RequestBody @Valid MemberQuickBuySaleDto memberQuickBuySaleDto) {
|
| | | // 获取当前登录用户
|
| | | MemberEntity member = LoginUserUtils.getAppLoginUser();
|
| | | if (MemberEntity.CERTIFY_STATUS_Y.equals(member.getCertifyStatus())) {
|
| | | Long memberId = LoginUserUtils.getAppLoginUser().getId();
|
| | | MemberEntity member = memberService.getById(memberId);
|
| | | if (!MemberEntity.CERTIFY_STATUS_Y.equals(member.getCertifyStatus())) {
|
| | | return Result.fail("请先实名认证");
|
| | | }
|
| | | String tradePasswordWeb = memberQuickBuySaleDto.getTradePassword();
|
| | |
| | | }
|
| | | return memberQuickBuySaleService.sell(member,memberQuickBuySaleDto);
|
| | | }
|
| | | |
| | | @ApiOperation(value = "cancelSell", notes = "提现撤销")
|
| | | @GetMapping(value = "/cancelSell")
|
| | | public Result cancelSell(@RequestParam(value = "id") Long id) {
|
| | | return memberQuickBuySaleService.cancelSell(id);
|
| | | }
|
| | | }
|