| | |
| | | import com.nq.service.IUserService; |
| | | import com.nq.utils.DateTimeUtil; |
| | | import com.nq.utils.KeyUtils; |
| | | import com.nq.utils.UserFundUtil; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | ret = fundsApplyMapper.insert(model); |
| | | if(ret>0){ |
| | | //修改用户可用余额= 当前余额-支付金额 |
| | | BigDecimal reckon_enable = user_enable_amt.subtract(pay_amount); |
| | | user.setEnableAmt(reckon_enable); |
| | | UserFundUtil.deductEnableAndWithdraw(user, pay_amount); |
| | | int updateUserCount = this.userMapper.updateByPrimaryKeySelective(user); |
| | | if (updateUserCount > 0) { |
| | | log.info("【用户交易下单】修改用户金额成功"); |
| | |
| | | /* */ |
| | | /* */ } else { |
| | | /* */ |
| | | /* 205 */ BigDecimal reckon_enable = user_enable_amt.add(fundsApply.getPayAmount()); |
| | | /* 206 */ user.setEnableAmt(reckon_enable); |
| | | /* 207 */ int updateUserCount = this.userMapper.updateByPrimaryKeySelective(user); |
| | | /* 205 */ UserFundUtil.refundEnableAndWithdraw(user, fundsApply.getPayAmount()); |
| | | /* 206 */ int updateUserCount = this.userMapper.updateByPrimaryKeySelective(user); |
| | | /* 208 */ if (updateUserCount > 0) { |
| | | /* 209 */ log.info("【配资审核未通过】修改用户金额成功"); |
| | | /* 210 */ UserCashDetail ucd = new UserCashDetail(); |