puzhibing
2023-05-25 380c0e958fbc3f2b42a3e38ae5dc9af3254b8f5c
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TRevenueController.java
@@ -5,19 +5,18 @@
import com.stylefeng.guns.modular.system.controller.resp.RevenueExpenditureResp;
import com.stylefeng.guns.modular.system.controller.resp.TDriverCommissionResp;
import com.stylefeng.guns.modular.system.controller.util.ExcelUtil;
import com.stylefeng.guns.modular.system.model.TCashWithdrawal;
import com.stylefeng.guns.modular.system.model.TDriver;
import com.stylefeng.guns.modular.system.service.ITCashWithdrawalService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.*;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.beans.factory.annotation.Autowired;
import com.stylefeng.guns.core.log.LogObjectHolder;
import org.springframework.web.bind.annotation.RequestParam;
import com.stylefeng.guns.modular.system.model.TRevenue;
import com.stylefeng.guns.modular.system.service.ITRevenueService;
@@ -44,6 +43,13 @@
    @Autowired
    private ITRevenueService tRevenueService;
    @Autowired
    private ITCashWithdrawalService cashWithdrawalService;
    /**
     * 跳转到首页
@@ -216,4 +222,19 @@
            e.printStackTrace();
        }
    }
    /**
     * 同意提现
     * @param id
     * @return
     */
    @ResponseBody
    @PostMapping("/agreeWithdraw")
    public Object agreeWithdraw(Integer id){
        TCashWithdrawal tCashWithdrawal = cashWithdrawalService.selectById(id);
        tCashWithdrawal.setState(2);
        cashWithdrawalService.updateById(tCashWithdrawal);
        return SUCCESS;
    }
}