From e13b1f9d6817a29f528f70493685371ae4004eb7 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Thu, 10 Jun 2021 16:49:42 +0800
Subject: [PATCH] modify
---
src/main/java/com/xcong/excoin/modules/otc/controller/OtcMarketBussinessController.java | 32 ++++++++++++++++++++++++++------
1 files changed, 26 insertions(+), 6 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/modules/otc/controller/OtcMarketBussinessController.java b/src/main/java/com/xcong/excoin/modules/otc/controller/OtcMarketBussinessController.java
index 3666fdc..cf0f695 100644
--- a/src/main/java/com/xcong/excoin/modules/otc/controller/OtcMarketBussinessController.java
+++ b/src/main/java/com/xcong/excoin/modules/otc/controller/OtcMarketBussinessController.java
@@ -3,12 +3,15 @@
import com.xcong.excoin.common.LoginUserUtils;
import com.xcong.excoin.common.response.Result;
import com.xcong.excoin.modules.member.dao.MemberDao;
+import com.xcong.excoin.modules.member.dao.MemberWalletCoinDao;
import com.xcong.excoin.modules.member.entity.MemberEntity;
+import com.xcong.excoin.modules.member.entity.MemberWalletCoinEntity;
import com.xcong.excoin.modules.otc.dto.MbAddDto;
import com.xcong.excoin.modules.otc.entity.OtcMarketBussiness;
import com.xcong.excoin.modules.otc.mapper.OtcMarketBussinessMapper;
import com.xcong.excoin.modules.otc.service.OtcEntrustOrderService;
import com.xcong.excoin.modules.otc.service.OtcMarketBussinessService;
+import com.xcong.excoin.modules.otc.vo.ApplyConditionsVo;
import com.xcong.excoin.modules.otc.vo.MarketBussinessInfoVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -30,14 +33,23 @@
public class OtcMarketBussinessController {
private final OtcMarketBussinessService otcMarketBussinessService;
- private final OtcEntrustOrderService otcEntrustOrderService;
+ private final MemberWalletCoinDao memberWalletCoinDao;
private final MemberDao memberDao;
+ @ApiOperation(value = "申请条件", notes = "申请条件")
+ @ApiResponses({
+ @ApiResponse(code = 200, message = "获取成功", response = ApplyConditionsVo.class)
+ })
+ @PostMapping(value = "/applyConditions")
+ public Result applyConditions() {
+ return otcMarketBussinessService.applyConditions();
+ }
-// @ApiOperation(value = "applyMarketBussiness", notes = "申请市商接口")
+
+ @ApiOperation(value = "申请市商接口", notes = "申请市商接口")
@PostMapping(value = "/applyMaketBussiness")
- public Result applyMarketBussiness(@RequestBody MbAddDto mbAddDto) {
- otcMarketBussinessService.add(mbAddDto);
+ public Result applyMarketBussiness() {
+ otcMarketBussinessService.add();
return Result.ok("申请成功, 等待审核");
}
@@ -59,12 +71,12 @@
OtcMarketBussiness otcMb = new OtcMarketBussiness();
otcMb.setId(mbAddDto.getId());
- otcMb.setNikename(mbAddDto.getNickname());
+// otcMb.setNikename(mbAddDto.getNickname());
otcMarketBussinessService.updateById(otcMb);
return Result.ok("修改成功");
}
-// @ApiOperation(value = "findMarketBussinessStatus", notes = "获取市商申请状态接口")
+ @ApiOperation(value = "findMarketBussinessStatus", notes = "获取市商申请状态接口")
@GetMapping(value = "/findMarketBussinessStatus")
public Result findMarketBussinessStatus() {
return Result.ok("获取成功", otcMarketBussinessService.findMbStatus());
@@ -94,4 +106,12 @@
return Result.ok("修改成功");
}
+ @ApiOperation(value = "查询当前用户可用")
+ @GetMapping(value = "/memberWallet")
+ public Result memberWallet() {
+ MemberEntity member = LoginUserUtils.getAppLoginUser();
+ MemberWalletCoinEntity wallet = memberWalletCoinDao.selectWalletCoinBymIdAndCode(member.getId(), "USDT");
+ return Result.ok(wallet.getAvailableBalance());
+ }
+
}
--
Gitblit v1.9.1