| | |
| | | package com.doumee.api.web; |
| | | |
| | | import com.doumee.core.annotation.LoginDriverRequired; |
| | | import com.doumee.core.annotation.LoginRequired; |
| | | import com.doumee.core.annotation.LoginShopRequired; |
| | | import com.doumee.core.model.ApiResponse; |
| | |
| | | @Autowired |
| | | private RevenueService revenueService; |
| | | |
| | | @LoginRequired |
| | | @LoginDriverRequired |
| | | @ApiOperation(value = "司机提现申请", notes = "小程序端") |
| | | @PostMapping("/driverApply") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true), |
| | | }) |
| | | public ApiResponse driverApply(@RequestBody @Validated WithdrawalDTO dto) { |
| | | withdrawalOrdersService.applyDriverWithdrawal(dto, getMemberId()); |
| | | withdrawalOrdersService.applyDriverWithdrawal(dto, getDriverId()); |
| | | return ApiResponse.success("提现申请已提交"); |
| | | } |
| | | |
| | |
| | | return ApiResponse.success("查询成功", revenueService.getShopRevenueStatistics(getShopId())); |
| | | } |
| | | |
| | | @LoginRequired |
| | | @LoginDriverRequired |
| | | @ApiOperation(value = "司机收益统计", notes = "当前登录司机的收益/提现统计") |
| | | @GetMapping("/driverStatistics") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true) |
| | | }) |
| | | public ApiResponse<RevenueStatisticsVO> driverStatistics() { |
| | | return ApiResponse.success("查询成功", revenueService.getDriverRevenueStatistics(getMemberId())); |
| | | return ApiResponse.success("查询成功", revenueService.getDriverRevenueStatistics(getDriverId())); |
| | | } |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "提现详情", notes = "根据提现主键查询详情(含审批人信息)") |
| | | @GetMapping("/detail/{id}") |
| | | @LoginShopRequired |
| | | @ApiOperation(value = "门店提现详情", notes = "根据提现主键查询详情(含审批人信息)") |
| | | @GetMapping("/shopDetail/{id}") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true), |
| | | @ApiImplicitParam(paramType = "path", dataType = "Integer", name = "id", value = "提现记录主键", required = true) |
| | | }) |
| | | public ApiResponse<WithdrawalOrders> detail(@PathVariable Integer id) { |
| | | public ApiResponse<WithdrawalOrders> shopDetail(@PathVariable Integer id) { |
| | | return ApiResponse.success("查询成功", withdrawalOrdersService.findById(id)); |
| | | } |
| | | |
| | | |
| | | @LoginDriverRequired |
| | | @ApiOperation(value = "司机提现详情", notes = "根据提现主键查询详情(含审批人信息)") |
| | | @GetMapping("/driverDetail/{id}") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true), |
| | | @ApiImplicitParam(paramType = "path", dataType = "Integer", name = "id", value = "提现记录主键", required = true) |
| | | }) |
| | | public ApiResponse<WithdrawalOrders> driverDetail(@PathVariable Integer id) { |
| | | return ApiResponse.success("查询成功", withdrawalOrdersService.findById(id)); |
| | | } |
| | | |