千峰商城-springboot项目搭建-83-订单提交及支付-显示支付结果
作者:互联网
一、流程分析
二、接口实现
OrderService:
public interface OrderService { public Map<String,String> addOrder(String cids, Orders order) throws SQLException; public int updateOrderStatus(String orderId,String status); public ResultVO GetOrderById(String orderId); }
OrderServiceImpl:
@Override public ResultVO GetOrderById(String orderId) { Orders orders = ordersMapper.selectByPrimaryKey(orderId); return new ResultVO(ResStatus.OK,"success", orders.getStatus()); }
OrderController:
@GetMapping("/status/{oid}") public ResultVO getOrderStatus(@PathVariable("oid") String orderId,@RequestHeader("token")String token){ ResultVO resultVO = orderService.GetOrderById(orderId); return resultVO; }
三、接口测试
标签:orderId,GetOrderById,String,ResultVO,status,支付,83,public,springboot 来源: https://www.cnblogs.com/lysboke/p/16537380.html