| | |
| | | import com.supersavedriving.user.modular.system.model.AppUser; |
| | | import com.supersavedriving.user.modular.system.model.Order; |
| | | import com.supersavedriving.user.modular.system.service.IAppUserService; |
| | | import com.supersavedriving.user.modular.system.service.IBillService; |
| | | import com.supersavedriving.user.modular.system.service.IOrderService; |
| | | import com.supersavedriving.user.modular.system.util.PayMoneyUtil; |
| | | import com.supersavedriving.user.modular.system.util.ResultUtil; |
| | |
| | | |
| | | @Autowired |
| | | private PayMoneyUtil payMoneyUtil; |
| | | |
| | | @Autowired |
| | | private IBillService billService; |
| | | |
| | | |
| | | |
| | |
| | | return ResponseWarpper.success(ResultUtil.tokenErr()); |
| | | } |
| | | OrderInfoWarpper orderInfoWarpper = orderService.queryOrderInfo(uid, orderId); |
| | | return ResponseWarpper.success(orderInfoWarpper); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return new ResponseWarpper(500, e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/order/queryShareOrderInfo") |
| | | // @ServiceLog(name = "获取订单详情", url = "/base/order/queryShareOrderInfo") |
| | | @ApiOperation(value = "获取订单详情", tags = {"用户端-分享"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "long"), |
| | | }) |
| | | public ResponseWarpper<OrderInfoWarpper> queryOrderInfo1(Long orderId){ |
| | | if(null == orderId){ |
| | | return ResponseWarpper.success(ResultUtil.paranErr("orderId")); |
| | | } |
| | | try { |
| | | OrderInfoWarpper orderInfoWarpper = orderService.queryOrderInfo(null, orderId); |
| | | return ResponseWarpper.success(orderInfoWarpper); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | } |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/order/queryMyOrder") |
| | | // @ServiceLog(name = "获取我的行程", url = "/api/order/queryMyOrder") |
| | | @ApiOperation(value = "获取我的行程", tags = {"用户端-个人中心"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "页码,首页1", name = "pageNum", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "页条数", name = "pageSize", required = true, dataType = "int"), |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResponseWarpper<List<OrderListWarpper>> queryMyOrder(Integer pageNum, Integer pageSize){ |
| | | if(null == pageNum){ |
| | | return ResponseWarpper.success(ResultUtil.paranErr("pageNum")); |
| | | } |
| | | if(null == pageSize){ |
| | | return ResponseWarpper.success(ResultUtil.paranErr("pageSize")); |
| | | } |
| | | try { |
| | | Integer uid = appUserService.getUserByRequest(); |
| | | if(null == uid){ |
| | | return ResponseWarpper.success(ResultUtil.tokenErr()); |
| | | } |
| | | List<OrderListWarpper> orderListWarppers = orderService.queryMyOrder(uid, pageNum, pageSize); |
| | | return ResponseWarpper.success(orderListWarppers); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return new ResponseWarpper(500, e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/order/queryNotInvoiceOrder") |
| | | // @ServiceLog(name = "获取未开票订单列表", url = "/api/order/queryNotInvoiceOrder") |
| | | @ApiOperation(value = "获取未开票订单列表", tags = {"用户端-个人中心"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResponseWarpper<List<OrderListWarpper>> queryNotInvoiceOrder(NotInvoiceOrder notInvoiceOrder){ |
| | | try { |
| | | Integer uid = appUserService.getUserByRequest(); |
| | | if(null == uid){ |
| | | return ResponseWarpper.success(ResultUtil.tokenErr()); |
| | | } |
| | | List<OrderListWarpper> orderListWarppers = orderService.queryNotInvoiceOrder(uid, notInvoiceOrder); |
| | | return ResponseWarpper.success(orderListWarppers); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return new ResponseWarpper(500, e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/order/invoicing") |
| | | // @ServiceLog(name = "开票操作", url = "/api/order/invoicing") |
| | | @ApiOperation(value = "开票操作", tags = {"用户端-个人中心"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResponseWarpper invoicing(Invoicing invoicing){ |
| | | try { |
| | | Integer uid = appUserService.getUserByRequest(); |
| | | if(null == uid){ |
| | | return ResponseWarpper.success(ResultUtil.tokenErr()); |
| | | } |
| | | ResultUtil invoicing1 = billService.invoicing(uid, invoicing); |
| | | return ResponseWarpper.success(invoicing1); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return new ResponseWarpper(500, e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/order/queryBillList") |
| | | // @ServiceLog(name = "获取开票历史", url = "/api/order/queryBillList") |
| | | @ApiOperation(value = "获取开票历史", tags = {"用户端-个人中心"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "页码,首页1", name = "pageNum", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "页条数", name = "pageSize", required = true, dataType = "int"), |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResponseWarpper<List<BillWarpper>> queryBillList(Integer pageNum, Integer pageSize){ |
| | | if(null == pageNum){ |
| | | return ResponseWarpper.success(ResultUtil.paranErr("pageNum")); |
| | | } |
| | | if(null == pageSize){ |
| | | return ResponseWarpper.success(ResultUtil.paranErr("pageSize")); |
| | | } |
| | | try { |
| | | Integer uid = appUserService.getUserByRequest(); |
| | | if(null == uid){ |
| | | return ResponseWarpper.success(ResultUtil.tokenErr()); |
| | | } |
| | | List<BillWarpper> billWarppers = billService.queryBillList(uid, pageNum, pageSize); |
| | | return ResponseWarpper.success(billWarppers); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return new ResponseWarpper(500, e.getMessage()); |
| | | } |
| | | } |
| | | } |