xuhy
2025-02-17 1cc7231bab6d4af58ea89f4484e9da9ac76170c5
ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TWithdrawalController.java
@@ -1,11 +1,16 @@
package com.stylefeng.guns.modular.system.controller.general;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.plugins.Page;
import com.stylefeng.guns.core.base.controller.BaseController;
import com.stylefeng.guns.core.common.constant.factory.PageFactory;
import com.stylefeng.guns.core.log.LogObjectHolder;
import com.stylefeng.guns.core.util.SinataUtil;
import com.stylefeng.guns.modular.system.controller.util.ExcelUtil;
import com.stylefeng.guns.modular.system.controller.util.HttpUtils;
import com.stylefeng.guns.modular.system.model.TDriver;
import com.stylefeng.guns.modular.system.model.TWithdrawal;
import com.stylefeng.guns.modular.system.service.ITDriverService;
import com.stylefeng.guns.modular.system.service.ITWithdrawalService;
@@ -131,6 +136,12 @@
        if(withdrawal.getStatus() == 3){
            withdrawal.setRemark(withdrawal.getRemark());
            TWithdrawal tWithdrawal = withdrawalService.selectById(withdrawal.getId());
            TDriver driver = driverService.selectById(tWithdrawal.getDriverId());
            BigDecimal balance = driver.getBalance();
            BigDecimal withdrawalMoney = tWithdrawal.getWithdrawalMoney();
            driver.setBalance(balance.add(withdrawalMoney));
            driverService.updateById(driver);
        }
        withdrawalService.updateById(withdrawal);