收费网站建设_甘肃网站建设_微商城开发_成都 网站建设 2.1、海量数据的解决方案:">

石家庄网站制作公司

南充网站建设、淮北建网站、永久使用、不限域名、南昌网站建设

汕头建网站?

收费网站建设_甘肃网站建设_微商城开发_成都 网站建设

public class BuyerOrderController {@Autowiredprivate OrderService orderService;@Autowiredprivate BuyerService buyerService;//创建订单@PostMapping("/create")public ResultVO<Map<String, String>> create(@Valid OrderForm orderForm,BindingResult bindingResult) {if (bindingResult.hasErrors()) {log.error("【创建订单】参数不正确, orderForm={}", orderForm);throw new SellException(ResultEnum.PARAM_ERROR.getCode(),bindingResult.getFieldError().getDefaultMessage());}OrderDTO orderDTO = OrderForm2OrderDTOConverter.convert(orderForm);if (CollectionUtils.isEmpty(orderDTO.getOrderDetailList())) {log.error("【创建订单】购物车不能为空");throw new SellException(ResultEnum.CART_EMPTY);}OrderDTO createResult = orderService.create(orderDTO);Map<String, String> map = new HashMap<>();map.put("orderId", createResult.getOrderId());return ResultVOUtil.success(map);}//订单列表@GetMapping("/listByStatus")public ResultVO<List<OrderDTO>> listByStatus(@RequestParam("openid") String openid,@RequestParam(value = "orderStatus", defaultValue = "0") Integer orderStatus) {if (StringUtils.isEmpty(openid)) {log.error("【查询订单列表】openid为空");throw new SellException(ResultEnum.PARAM_ERROR);}List<OrderDTO> orderList = buyerService.findOrderList(openid, orderStatus);return ResultVOUtil.success(orderList);}//订单详情@GetMapping("/detail")public ResultVO<OrderDTO> detail(@RequestParam("openid") String openid,@RequestParam("orderId") String orderId) {OrderDTO orderDTO = buyerService.findOrderOne(openid, orderId);return ResultVOUtil.success(orderDTO);}//确认收货@PostMapping("/sure")public ResultVO sure(@RequestParam("openid") String openid,@RequestParam("orderId") String orderId) {buyerService.cancelOrder(openid, orderId);return ResultVOUtil.success();}//取消订单@PostMapping("/cancel")public ResultVO cancel(@RequestParam("openid") String openid,@RequestParam("orderId") String orderId) {buyerService.cancelOrder(openid, orderId);return ResultVOUtil.success();} 莱州网站建设网站建设策划长治网站制作网站设计建设公司手机网站建设设计个人网站建设青海网站建设网站设计报价揭阳网站制作成都 网站建设兰州app开发电子商务网站建设长安网站建设广州平台网站建设广州app开发漳州网站建设英文网站建设门户网站模板宁波网站制作网站设计团队长沙网站建设网站建设推广柳州网站建设桂林网站设计湖南长沙网站建设社交电商app开发网站网站建设网站安康网站建设公司银川网站建设软件app开发公司上网站建设

猜你喜欢