| | |
| | | if (recharge == null) { |
| | | recharge = findByOrderNo(id); |
| | | if (recharge == null) { |
| | | throw new YamiShopBindException("参数错误!"); |
| | | throw new YamiShopBindException("Invalid parameters!"); |
| | | } |
| | | } |
| | | User party = userService.getById(recharge.getPartyId()); |
| | | if (party == null) { |
| | | throw new YamiShopBindException("用户不存在!"); |
| | | throw new YamiShopBindException("User does not exist!"); |
| | | } |
| | | |
| | | if (recharge.getSucceeded() == 1) { |
| | | throw new YamiShopBindException("已操作过了!"); |
| | | throw new YamiShopBindException("Already processed!"); |
| | | } |
| | | recharge.setReviewTime(new Date()); |
| | | recharge.setSucceeded(1); |
| | |
| | | // if (realtime_list.size() > 0) { |
| | | // realtime = realtime_list.get(0); |
| | | // } else { |
| | | // throw new YamiShopBindException("系统错误,请稍后重试"); |
| | | // throw new YamiShopBindException("System error, please try again later"); |
| | | // } |
| | | // 对应usdt价格 |
| | | // double transfer_usdt = realtime.getClose().doubleValue(); |
| | |
| | | // 用户未完成USDT订单 |
| | | List<RechargeBlockchainOrder> orders = this.findByPartyIdAndSucceeded(recharge.getPartyId(), 0); |
| | | if (null != orders && 1 == recharge_only_one) { |
| | | throw new YamiShopBindException("提交失败,当前有未处理USDT订单"); |
| | | throw new YamiShopBindException("Submission failed, pending USDT order exists"); |
| | | } |
| | | |
| | | |
| | |
| | | // recharge.getSymbol(), recharge.getChannelAddress()); |
| | | // |
| | | // if (channel == null || !recharge.getSymbol().toUpperCase().equals(channel.getCoin().toUpperCase())) { |
| | | // throw new YamiShopBindException("充值链错误"); |
| | | // throw new YamiShopBindException("Invalid recharge chain"); |
| | | // } |
| | | // } |
| | | |
| | |
| | | double recharge_limit_max = Double.valueOf(sysparaService.find("recharge_limit_max").getSvalue()); |
| | | if ("usdt".equals(recharge.getSymbol())) { |
| | | if (recharge.getVolume() < recharge_limit_min) { |
| | | throw new YamiShopBindException("充值数量不得小于最小限额"); |
| | | throw new YamiShopBindException("Recharge amount must not be less than the minimum limit"); |
| | | } |
| | | |
| | | if (recharge.getVolume() > recharge_limit_max) { |
| | | throw new YamiShopBindException("充值数量不得大于最大限额"); |
| | | throw new YamiShopBindException("Recharge amount must not exceed the maximum limit"); |
| | | } |
| | | |
| | | } |
| | |
| | | public void refusalApply(String id, String content, String userName) { |
| | | RechargeBlockchainOrder recharge = getById(id); |
| | | if (recharge == null) { |
| | | throw new YamiShopBindException("参数错误!"); |
| | | throw new YamiShopBindException("Invalid parameters!"); |
| | | } |
| | | // 通过后不可驳回 |
| | | if (recharge.getSucceeded() == 2 || recharge.getSucceeded() == 1) { |