| | |
| | | import com.doumee.core.annotation.LoginDriverRequired; |
| | | import com.doumee.core.annotation.LoginRequired; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.config.jwt.JwtTokenUtil; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | |
| | | |
| | | import javax.validation.Valid; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 司机验证码登录接口 |
| | |
| | | |
| | | @LoginDriverRequired |
| | | @Trace |
| | | @ApiOperation(value = "司机累计统计", notes = "累计佣金、待结算佣金、订单总数、钱包余额") |
| | | @GetMapping("/stats") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true) |
| | | }) |
| | | public ApiResponse<com.doumee.dao.vo.DriverStatsVO> stats() { |
| | | return ApiResponse.success("操作成功", driverInfoService.getDriverStats(this.getDriverId())); |
| | | } |
| | | |
| | | @LoginDriverRequired |
| | | @Trace |
| | | @ApiOperation(value = "司机抢单大厅", notes = "分页查询可抢的异地寄存订单") |
| | | @PostMapping("/grabOrderHall") |
| | | @ApiImplicitParams({ |
| | |
| | | return ApiResponse.success("操作成功"); |
| | | } |
| | | |
| | | @LoginDriverRequired |
| | | @Trace |
| | | @ApiOperation(value = "司机修改密码", notes = "新密码必须同时包含字母和数字,修改成功后需重新登录") |
| | | @GetMapping("/changePassword") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true), |
| | | }) |
| | | public ApiResponse changePassword(@RequestParam String newPassword) { |
| | | String token = this.getRequest().getHeader(JwtTokenUtil.HEADER_KEY); |
| | | driverInfoService.changePassword(this.getDriverId(), newPassword, token); |
| | | return ApiResponse.success("密码修改成功,请重新登录"); |
| | | } |
| | | |
| | | @LoginDriverRequired |
| | | @Trace |
| | | @ApiOperation(value = "进行中订单数量", notes = "返回已抢单和派送中的订单数量") |
| | | @GetMapping("/activeOrderCount") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true) |
| | | }) |
| | | public ApiResponse<Map<String, Integer>> activeOrderCount() { |
| | | return ApiResponse.success("操作成功", driverInfoService.getActiveOrderCount(this.getDriverId())); |
| | | } |
| | | |
| | | } |