From c794a77a28e6685528e7c29abe745c4ef42ee5f6 Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Wed, 14 Oct 2020 18:05:37 +0800 Subject: [PATCH] modify --- src/main/java/com/xcong/excoin/modules/coin/service/impl/OrderCoinServiceImpl.java | 58 +++++++++++++++++++++++++++++----------------------------- 1 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/main/java/com/xcong/excoin/modules/coin/service/impl/OrderCoinServiceImpl.java b/src/main/java/com/xcong/excoin/modules/coin/service/impl/OrderCoinServiceImpl.java index de569fb..892309d 100644 --- a/src/main/java/com/xcong/excoin/modules/coin/service/impl/OrderCoinServiceImpl.java +++ b/src/main/java/com/xcong/excoin/modules/coin/service/impl/OrderCoinServiceImpl.java @@ -350,35 +350,35 @@ } // 需要先 String phone = memberEntity.getPhone(); - if (!"13632989240".equals(phone) && !"15158130575".equals(phone)) { - if (OrderCoinsEntity.ORDERTYPE_BUY.equals(type)) { - // 不能超过800个 - -// if (amount != null && amount.compareTo(new BigDecimal("800")) > 0) { -// return Result.fail("买入额度受限"); -// } -// BigDecimal bigDecimal = orderCoinDealDao.sumTodayBuyAmount(memberId, symbol); -// if (bigDecimal == null) { -// bigDecimal = BigDecimal.ZERO; -// } -// amount = amount == null ? BigDecimal.ZERO : amount; -// bigDecimal = bigDecimal.add(amount); -// if (bigDecimal != null && bigDecimal.compareTo(new BigDecimal("800")) > 0) { -// return Result.fail("买入额度受限"); -// } -// // 挂单不能超过800 -// BigDecimal bigDecimal1 = orderCoinDealDao.sumTodayEntrustCntBuyAmount(memberId, symbol); -// if (bigDecimal1 == null) { -// bigDecimal1 = BigDecimal.ZERO; -// } -// bigDecimal1 = bigDecimal1.add(amount); -// if (bigDecimal1 != null && bigDecimal1.compareTo(new BigDecimal("800")) > 0) { -// return Result.fail("买入额度受限"); -// } - } else { - return Result.fail("卖出受限"); - } - } +// if (!"13632989240".equals(phone) && !"15158130575".equals(phone)) { +// if (OrderCoinsEntity.ORDERTYPE_BUY.equals(type)) { +// // 不能超过800个 +// +//// if (amount != null && amount.compareTo(new BigDecimal("800")) > 0) { +//// return Result.fail("买入额度受限"); +//// } +//// BigDecimal bigDecimal = orderCoinDealDao.sumTodayBuyAmount(memberId, symbol); +//// if (bigDecimal == null) { +//// bigDecimal = BigDecimal.ZERO; +//// } +//// amount = amount == null ? BigDecimal.ZERO : amount; +//// bigDecimal = bigDecimal.add(amount); +//// if (bigDecimal != null && bigDecimal.compareTo(new BigDecimal("800")) > 0) { +//// return Result.fail("买入额度受限"); +//// } +//// // 挂单不能超过800 +//// BigDecimal bigDecimal1 = orderCoinDealDao.sumTodayEntrustCntBuyAmount(memberId, symbol); +//// if (bigDecimal1 == null) { +//// bigDecimal1 = BigDecimal.ZERO; +//// } +//// bigDecimal1 = bigDecimal1.add(amount); +//// if (bigDecimal1 != null && bigDecimal1.compareTo(new BigDecimal("800")) > 0) { +//// return Result.fail("买入额度受限"); +//// } +// } else { +// return Result.fail("卖出受限"); +// } +// } BigDecimal nowPriceinBigDecimal = price; //查询当前价 -- Gitblit v1.9.1