| | |
| | | import com.stylefeng.guns.modular.specialTrain.model.OrderPrivateCar; |
| | | import com.stylefeng.guns.modular.specialTrain.server.IOrderPrivateCarService; |
| | | import com.stylefeng.guns.modular.system.model.Driver; |
| | | import com.stylefeng.guns.modular.system.model.OrderCancel; |
| | | import com.stylefeng.guns.modular.system.model.OrderPosition; |
| | | import com.stylefeng.guns.modular.system.model.UserInfo; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | |
| | | import com.stylefeng.guns.modular.system.util.Tingg.model.*; |
| | | import com.stylefeng.guns.modular.system.warpper.*; |
| | | import com.stylefeng.guns.modular.taxi.model.OrderTaxi; |
| | | import com.stylefeng.guns.modular.taxi.model.PaymentRecord; |
| | | import com.stylefeng.guns.modular.taxi.model.TransactionDetails; |
| | | import com.stylefeng.guns.modular.taxi.service.IOrderTaxiService; |
| | | import com.stylefeng.guns.modular.taxi.service.IPaymentRecordService; |
| | | import com.stylefeng.guns.modular.taxi.service.ITransactionDetailsService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | |
| | | |
| | | @Autowired |
| | | private ITransactionDetailsService transactionDetailsService; |
| | | |
| | | @Autowired |
| | | private IPaymentRecordService paymentRecordService; |
| | | |
| | | @Autowired |
| | | private IOrderCancelService orderCancelService; |
| | |
| | | @ApiImplicitParam(value = "页条数", name = "size", required = true, dataType = "int"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil<List<OrderWarpper>> queryMyOrderList(Integer type, Integer pageNum, Integer size, HttpServletRequest request){ |
| | | public ResultUtil<List<OrderWarpper>> queryMyOrderList(Integer type, Integer pageNum, Integer size, Integer language, HttpServletRequest request){ |
| | | try { |
| | | Integer uid = userInfoService.getUserIdFormRedis(request); |
| | | if(null == uid){ |
| | |
| | | list = orderCrossCityService.queryMyOrderList(uid, pageNum, size); |
| | | break; |
| | | case 4: |
| | | list = orderLogisticsService.queryMyOrderList(uid, pageNum, size); |
| | | list = orderLogisticsService.queryMyOrderList(uid, pageNum, size, language); |
| | | break; |
| | | case 5: |
| | | list = orderCharteredCarService.queryMyOrderList(uid, pageNum, size); |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 取消订单退款回调 |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/base/orderCancelRefundCallback") |
| | | public PayoutCallbackResponse orderCancelRefundCallback(@RequestBody PayoutCallbackRequest request){ |
| | | try { |
| | | System.err.println("转账回调>>>>" + JSON.toJSONString(request)); |
| | | PayoutCallbackResponse payoutCallbackResponse = new PayoutCallbackResponse(); |
| | | AuthStatus authStatus = new AuthStatus(); |
| | | authStatus.setAuthStatusCode(131); |
| | | authStatus.setAuthStatusDescription("Authentication was successful"); |
| | | payoutCallbackResponse.setAuthStatus(authStatus); |
| | | Results results = new Results(); |
| | | PayoutPacket packet = request.getPayload().getPacket(); |
| | | String statusCode = packet.getStatusCode(); |
| | | String beepTransactionID = packet.getBeepTransactionID(); |
| | | String payerTransactionID = packet.getPayerTransactionID(); |
| | | |
| | | String id = payerTransactionID.substring(17); |
| | | OrderCancel orderCancel = orderCancelService.selectById(id); |
| | | OrderLogistics orderLogistics = orderLogisticsService.selectById(orderCancel.getOrderId()); |
| | | PaymentRecord query = paymentRecordService.query(1, orderLogistics.getUserId(), 1, orderLogistics.getId(), orderLogistics.getType(), 1, 2); |
| | | transactionDetailsService.saveData(orderLogistics.getUserId(), "小件物流取消退款", query.getAmount(), 1, 1, 1, 4, orderLogistics.getId()); |
| | | |
| | | results.setBeepTransactionID(beepTransactionID); |
| | | results.setPayerTransactionID(payerTransactionID); |
| | | results.setStatusCode("188"); |
| | | results.setStatusDescription("Response was received"); |
| | | payoutCallbackResponse.setResults(results); |
| | | return payoutCallbackResponse; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 取消操作支付 |