| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.supersavedriving.driver.modular.system.model.DivisionRecord; |
| | | import com.supersavedriving.driver.modular.system.model.Driver; |
| | | import com.supersavedriving.driver.modular.system.model.Order; |
| | | import com.supersavedriving.driver.modular.system.model.RechargeRecord; |
| | | import com.supersavedriving.driver.modular.system.service.IDivisionRecordService; |
| | |
| | | return new ResponseWarpper(500, e.getMessage()); |
| | | } |
| | | } |
| | | @ResponseBody |
| | | @PostMapping("/api/order/transferOrderVerify") |
| | | // @ServiceLog(name = "司机转单操作", url = "/api/order/transferOrder") |
| | | @ApiOperation(value = "司机转单操作验证", tags = {"司机端-服务中"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "phone", name = "phone", required = false, dataType = "string"), |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResponseWarpper transferOrderVerify(String phone){ |
| | | if(phone!=null && !"".equals(phone)) { |
| | | List<Driver> drivers = driverService.selectList(new EntityWrapper<Driver>().eq("phone", phone)); |
| | | if (drivers.size() == 0) { |
| | | return new ResponseWarpper(500,"暂无该司机,无法转单"); |
| | | } else { |
| | | Driver driver = drivers.get(0); |
| | | if (driver.getServerStatus() != 1) { |
| | | return new ResponseWarpper(500,"司机正在服务中,无法转单。"); |
| | | } |
| | | if (driver.getStatus() != 1) { |
| | | return new ResponseWarpper(500,"该司机已被冻结,无法转单。"); |
| | | } |
| | | } |
| | | } |
| | | return ResponseWarpper.success(); |
| | | } |
| | | |
| | | |
| | | @ResponseBody |