| | |
| | | }
|
| | | // 需要先
|
| | | 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("买入额度受限");
|
| | | // 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 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;
|
| | | //查询当前价
|