From 5013f71d0b9a886de77f936606de061ce1eb2aee Mon Sep 17 00:00:00 2001
From: gao <gaoleox@163>
Date: Wed, 27 May 2020 11:53:28 +0800
Subject: [PATCH] 平台收款方式接口

---
 src/main/java/com/xcong/excoin/modules/platform/service/impl/PlatformPaymentMethodServiceImpl.java |   32 +++++++++++---------------------
 1 files changed, 11 insertions(+), 21 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/modules/platform/service/impl/PlatformPaymentMethodServiceImpl.java b/src/main/java/com/xcong/excoin/modules/platform/service/impl/PlatformPaymentMethodServiceImpl.java
index 2a5d998..b4a011e 100644
--- a/src/main/java/com/xcong/excoin/modules/platform/service/impl/PlatformPaymentMethodServiceImpl.java
+++ b/src/main/java/com/xcong/excoin/modules/platform/service/impl/PlatformPaymentMethodServiceImpl.java
@@ -1,38 +1,28 @@
 package com.xcong.excoin.modules.platform.service.impl;
 
-import java.math.BigDecimal;
-import java.util.HashMap;
-import java.util.Map;
+import java.util.List;
 
 import javax.annotation.Resource;
 
 import org.springframework.stereotype.Service;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.xcong.excoin.common.response.Result;
-import com.xcong.excoin.modules.platform.dao.PlatformCnyUsdtExchangeDao;
-import com.xcong.excoin.modules.platform.entity.PlatformCnyUsdtExchangeEntity;
-import com.xcong.excoin.modules.platform.service.PlatformCnyUsdtExchangeService;
+import com.xcong.excoin.modules.platform.dao.PlatformPaymentMethodDao;
+import com.xcong.excoin.modules.platform.entity.PlatformPaymentMethodEntity;
+import com.xcong.excoin.modules.platform.service.PlatformPaymentMethodService;
 
 @Service
-public class PlatformPaymentMethodServiceImpl extends ServiceImpl<PlatformCnyUsdtExchangeDao, PlatformCnyUsdtExchangeEntity> implements PlatformCnyUsdtExchangeService{
+public class PlatformPaymentMethodServiceImpl extends ServiceImpl<PlatformPaymentMethodDao, PlatformPaymentMethodEntity> implements PlatformPaymentMethodService{
 	@Resource
-	PlatformCnyUsdtExchangeDao platformCnyUsdtExchangeDao;
+	PlatformPaymentMethodDao platformPaymentMethodDao;
 	
 	@Override
-	public Result findUsdtCnyExchange(String type) {
-		// 查询当前兑换价格
-		Map<String, Object> map = new HashMap<String, Object>();
-		PlatformCnyUsdtExchangeEntity platformCnyUsdtExchangeEntity = platformCnyUsdtExchangeDao.selectById(1);
-		BigDecimal cnyUsdt = platformCnyUsdtExchangeEntity.getValue();
-		if ("B".equals(type)) {
-			// 买的时候提高价格
-			map.put("exchange", cnyUsdt.add(platformCnyUsdtExchangeEntity.getDiff()));
-		}else {
-			// 卖的时候降低
-			map.put("exchange", cnyUsdt.subtract(platformCnyUsdtExchangeEntity.getDiff()));
-		}
-		return Result.ok(map);
+	public Result findAll() {
+		QueryWrapper<PlatformPaymentMethodEntity> queryWrapper = new QueryWrapper<>();
+		List<PlatformPaymentMethodEntity> paymentMethodList = platformPaymentMethodDao.selectList(queryWrapper);
+		return Result.ok(paymentMethodList);
 	}
 	
 }

--
Gitblit v1.9.1