| | |
| | | |
| | | |
| | | SiteSetting siteSetting = this.iSiteSettingService.getSiteSetting(); |
| | | |
| | | SiteProduct siteProduct = iSiteProductService.getProductSetting(); |
| | | if ((new BigDecimal(amt)).compareTo(new BigDecimal(siteSetting.getWithMinAmt().intValue())) == -1) { |
| | | |
| | | return ServerResponse.createByErrorMsg("出金金额不得低于" + siteSetting.getWithMinAmt() + "元"); |
| | |
| | | Calendar c = Calendar.getInstance(); |
| | | c.setTime(today); |
| | | int weekday = c.get(Calendar.DAY_OF_WEEK); |
| | | if (weekday == 1) { |
| | | if (weekday == 1 && siteProduct.getTranWithdrawDisplay()) { |
| | | return ServerResponse.createByErrorMsg("周末或节假日不能出金!"); |
| | | } |
| | | if (weekday == 7) { |
| | | if (weekday == 7 && siteProduct.getTranWithdrawDisplay()) { |
| | | return ServerResponse.createByErrorMsg("周末或节假日不能出金!"); |
| | | } |
| | | |
| | |
| | | |
| | | int with_time_end = siteSetting.getWithTimeEnd().intValue(); |
| | | |
| | | SiteProduct siteProduct = iSiteProductService.getProductSetting(); |
| | | if(siteProduct.getHolidayDisplay()){ |
| | | // if(!siteProduct.getTranWithdrawDisplay()){ |
| | | // return ServerResponse.createByErrorMsg("提款失败,当前不能出金!"); |
| | | // } |
| | | |
| | | if(siteProduct.getHolidayDisplay() && siteProduct.getTranWithdrawDisplay()){ |
| | | return ServerResponse.createByErrorMsg("周末或节假日不能出金!"); |
| | | } |
| | | |
| | | if (!WithDrawUtils.checkIsWithTime(with_time_begin, with_time_end)) { |
| | | if (!WithDrawUtils.checkIsWithTime(with_time_begin, with_time_end) && siteProduct.getTranWithdrawDisplay()) { |
| | | |
| | | return ServerResponse.createByErrorMsg("提款失败,提款时间" + with_time_begin + "点 - " + with_time_end + "点 之间"); |
| | | |
| | |
| | | |
| | | synchronized (UserWithdrawServiceImpl.class){ |
| | | //可取港币资金 |
| | | BigDecimal hkAmt=user.getHkAmt(); |
| | | BigDecimal hkAmt=user.getEnaleWithdrawAmt(); |
| | | |
| | | int compareAmt = hkAmt.compareTo(new BigDecimal(amt)); |
| | | |
| | |
| | | |
| | | BigDecimal reckon_hkAmt = hkAmt.subtract(new BigDecimal(amt)); |
| | | |
| | | user.setHkAmt(reckon_hkAmt); |
| | | user.setEnaleWithdrawAmt(reckon_hkAmt); |
| | | |
| | | log.info("提现前,港币金额={},提现后,港币金额={}",hkAmt,reckon_hkAmt); |
| | | |