From d61072f997839b4564ce35132d5902a1b6f7d54f Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Mon, 03 Aug 2020 17:39:10 +0800
Subject: [PATCH] modify
---
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