puzhibing
2024-05-06 7c26ec693561ecce9fba31ab4e83e9f30d641aad
DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/WithdrawalController.java
@@ -5,6 +5,7 @@
import com.stylefeng.guns.modular.system.service.IDriverService;
import com.stylefeng.guns.modular.system.service.IWithdrawalService;
import com.stylefeng.guns.modular.system.util.ResultUtil;
import com.stylefeng.guns.modular.system.warpper.WithdrawalListWarpper;
import com.stylefeng.guns.modular.system.warpper.WithdrawalWarpper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
@@ -91,21 +92,26 @@
     */
    @ResponseBody
    @PostMapping("/api/withdrawal/queryWithdrawal")
    @ApiOperation(value = "获取历史提现数据", tags = {"司机端-个人中心"}, notes = "")
    @ApiOperation(value = "获取历史提现数据【2.0】", tags = {"司机端-个人中心"}, notes = "开发中")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "页码,首页1", name = "pageNum", required = true, dataType = "int"),
            @ApiImplicitParam(value = "页条数", name = "size", required = true, dataType = "int"),
            @ApiImplicitParam(value = "提现类型(1=活动收入提现,2=业务收入提现)", name = "type", required = true, dataType = "int"),
            @ApiImplicitParam(value = "体现类型(1=活动收入提现,2=业务收入提现)", name = "type", required = true, dataType = "int"),
            @ApiImplicitParam(value = "状态(1=处理中,2=已提现,3=提现失败)", name = "state", required = false, dataType = "int"),
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResultUtil<List<WithdrawalWarpper>> queryWithdrawal(Integer language, Integer pageNum, Integer size, Integer type, HttpServletRequest request){
    public ResultUtil<WithdrawalWarpper> queryWithdrawal(Integer language, Integer pageNum, Integer size, Integer type, Integer state, HttpServletRequest request){
        try {
            Integer uid = driverService.getUserIdFormRedis(request);
            if(null == uid){
                return ResultUtil.tokenErr();
            }
            List<Map<String, Object>> list = withdrawalService.queryWithdrawal(language, uid, type, pageNum, size);
            return ResultUtil.success(WithdrawalWarpper.getWithdrawalWarpper(list));
            List<Map<String, Object>> list = withdrawalService.queryWithdrawal(language, uid, type, state, pageNum, size);
            List<WithdrawalListWarpper> withdrawalWarpper = WithdrawalListWarpper.getWithdrawalWarpper(list);
            WithdrawalWarpper withdrawalWarpper1 = new WithdrawalWarpper();
            withdrawalWarpper1.setTotal(0D);
            withdrawalWarpper1.setList(withdrawalWarpper);
            return ResultUtil.success(withdrawalWarpper1);
        }catch (Exception e){
            e.printStackTrace();
            return ResultUtil.runErr();