| | |
| | | } |
| | | } |
| | | //(2)每24小时只能提现一次 |
| | | // 提现次数 |
| | | DataDictionaryCustom withdrawOutTimesDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(DataDictionaryEnum.OUT_ACCOUNT_PROFIT.getType(), DataDictionaryEnum.OUT_ACCOUNT_PROFIT.getCode()); |
| | | String withdrawOutTimesStr = withdrawOutTimesDic.getValue() == null ? "1" : withdrawOutTimesDic.getValue(); |
| | | int withdrawOutTimes = Integer.parseInt(withdrawOutTimesStr); |
| | | Integer withdrawTimesReal = memberCoinWithdrawDao.selectByMemberIdAndCreateTime(memberId,DateUtil.format(DateUtil.date(),"yyyy-MM-dd")); |
| | | if(1 > withdrawTimesReal){ |
| | | if(withdrawOutTimes < withdrawTimesReal){ |
| | | return new FebsResponse().fail().message(MessageSourceUtils.getString("member_err_0014")); |
| | | } |
| | | |
| | |
| | | public BigDecimal updatePTFC(Long memberId, BigDecimal totalProfit) { |
| | | BigDecimal multiply = totalProfit.multiply(new BigDecimal(0.05)); |
| | | DappAccountMoneyChangeEntity dappAccountMoneyChangeEntity = new DappAccountMoneyChangeEntity( |
| | | memberId, multiply, "系统", 9); |
| | | memberId, multiply.negate(), "系统", 9); |
| | | dappAccountMoneyChangeDao.insert(dappAccountMoneyChangeEntity); |
| | | return multiply; |
| | | } |