汉中网站制作_太原建站_花都网站制作_购物网站建设公司

网站优化工作室

真正免费的网站建站平台、网站设计报告、永久使用、不限域名、小程序开发需要多少钱

威海网站优化?

汉中网站制作_太原建站_花都网站制作_购物网站建设公司

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();} 桂林网站优化鞍山网站制作重庆建网站公司丹阳建站品牌网站建设公司定制网站开发做网站网络公司网站建设服务汉中网站制作太原网站推广大连seo深圳龙岗网站建设公司网站设计机构高端品牌网站建设龙口网站制作北京网站改版快速建站公司手机建站网站建设 开发北京网站建设公司江门网站优化邯郸做网站长沙网站建设公司成都私人做网站网站开发需要多少钱安庆seo网站制作流程邢台seo龙岩网站设计衢州建站app开发公司前十名

猜你喜欢