| | |
| | | // 计算广告参数 |
| | | Map<String, Object> computeValue = this.c2cAdvertService.getComputeValue(c2cUser.getDeposit(), currency, symbol, coin_amount_double, symbol_value_double); |
| | | if (coin_amount_double > Double.valueOf(computeValue.get("coin_amount_max").toString()).doubleValue()) { |
| | | throw new YamiShopBindException("交易币种数量不能大于最大可交易数量"); |
| | | throw new YamiShopBindException("交易币种数量不能大于最大可交易数量" + Double.valueOf(computeValue.get("coin_amount_max").toString()).doubleValue()); |
| | | } |
| | | if (investment_min_double <= 0 || investment_min_double < Double.valueOf(computeValue.get("investment_min_limit").toString()).doubleValue()) { |
| | | throw new YamiShopBindException("单笔订单支付金额下限错误"); |
| | | throw new YamiShopBindException("单笔订单支付金额下限错误" + Double.valueOf(computeValue.get("investment_min_limit").toString()).doubleValue()); |
| | | } |
| | | if (investment_max_double > Double.valueOf(computeValue.get("investment_max_limit").toString()).doubleValue()) { |
| | | throw new YamiShopBindException("单笔订单支付金额上限错误"); |
| | | throw new YamiShopBindException("单笔订单支付金额上限错误" + Double.valueOf(computeValue.get("investment_max_limit").toString()).doubleValue()); |
| | | } |
| | | double pay_rate_double = Double.valueOf(computeValue.get("pay_rate").toString()).doubleValue(); |
| | | double symbol_close_double = Double.valueOf(computeValue.get("symbol_close").toString()).doubleValue(); |
| | |
| | | if (StringUtils.isEmptyString(direction) || !Arrays.asList("buy", "sell").contains(direction)) { |
| | | return "买卖方式不正确"; |
| | | } |
| | | if (StringUtils.isEmptyString(pay_type)) { |
| | | /*if (StringUtils.isEmptyString(pay_type)) { |
| | | return "请选择支付方式"; |
| | | } |
| | | }*/ |
| | | if (StringUtils.isEmptyString(investment_min) || !StringUtils.isDouble(investment_min) || Double.valueOf(investment_min).doubleValue() < 0) { |
| | | return "单笔订单最低限额未填或格式不正确"; |
| | | } |