| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.PrintWriter; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | @ApiOperation(value = "服务完成后修改订单状态", tags = {"司机端-服务中"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "long"), |
| | | @ApiImplicitParam(value = "107(线上支付),108(完成线下支付)", name = "state", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "支付方式(1=线上,2=线下)", name = "payType", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "107(待支付),108(已完成)", name = "state", required = true, dataType = "int"), |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResponseWarpper setOrderStatus(Long orderId, Integer state){ |
| | | public ResponseWarpper setOrderStatus(Long orderId, Integer payType, Integer state){ |
| | | if(ToolUtil.isEmpty(orderId)){ |
| | | return ResponseWarpper.success(ResultUtil.paranErr("orderId")); |
| | | } |
| | |
| | | if(null == uid){ |
| | | return ResponseWarpper.tokenErr(); |
| | | } |
| | | ResultUtil resultUtil = orderService.setOrderStatus(uid, orderId, state); |
| | | ResultUtil resultUtil = orderService.setOrderStatus(uid, orderId, payType, state); |
| | | return ResponseWarpper.success(resultUtil); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | @PostMapping("/base/order/cloudRecordingCallback") |
| | | public void cloudRecordingCallback(HttpServletRequest request, HttpServletResponse response){ |
| | | CloudRecordingCallback cloudRecordingCallback = RongYunUtil.cloudRecordingCallback(request); |
| | | // System.err.println("-------------------云端录制状态回调!-------------------"); |
| | | // System.err.println(JSON.toJSONString(cloudRecordingCallback)); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | System.err.println(sdf.format(new Date()) + "-------------------云端录制状态回调!-------------------"); |
| | | System.err.println(JSON.toJSONString(cloudRecordingCallback)); |
| | | if(null == cloudRecordingCallback){ |
| | | System.err.println("云端录制状态回调解析出错!"); |
| | | return; |