1
zj
6 days ago cd969de1f50903ca87deda67bff2d6fcc35b4107
src/main/java/com/nq/service/impl/FundsApplyServiceImpl.java
@@ -10,6 +10,7 @@
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;
@@ -72,8 +73,7 @@
        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("【用户交易下单】修改用户金额成功");
@@ -201,9 +201,8 @@
                    /*     */
                    /*     */         } 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();