Commit 1ec2af62b73a2459c3b3de5e8d2c5b9c56136e58

Authored by Jiang
1 parent 537c3508

增加买家Controller的订单详情和订单列表接口

mobsite-getway-web/src/main/java/com/diligrp/mobsite/getway/web/api/buyer/order/BuyerOrderController.java
... ... @@ -18,6 +18,10 @@ import com.diligrp.mobsite.getway.domain.protocol.order.PayOrderReq;
18 18 import com.diligrp.mobsite.getway.domain.protocol.order.PayOrderResp;
19 19 import com.diligrp.mobsite.getway.domain.protocol.order.SubmitOrderReq;
20 20 import com.diligrp.mobsite.getway.domain.protocol.order.SubmitOrderResp;
  21 +import com.diligrp.mobsite.getway.domain.protocol.saler.order.GetOrderDetailReq;
  22 +import com.diligrp.mobsite.getway.domain.protocol.saler.order.GetOrderDetailResp;
  23 +import com.diligrp.mobsite.getway.domain.protocol.saler.order.SearchOrderListReq;
  24 +import com.diligrp.mobsite.getway.domain.protocol.saler.order.SearchOrderListResp;
21 25 import com.diligrp.mobsite.getway.service.buyer.BuyerOrderService;
22 26 import com.diligrp.mobsite.getway.web.api.base.BaseApiController;
23 27  
... ... @@ -81,4 +85,26 @@ public class BuyerOrderController extends BaseApiController {
81 85 super.sendError(e.getMessage());
82 86 }
83 87 }
  88 +
  89 + @RequestMapping(value = "/detail", method = RequestMethod.POST)
  90 + public void detail(@RequestBody GetOrderDetailReq req) {
  91 + try {
  92 + GetOrderDetailResp resp = buyerOrderService.getOrderById(req);
  93 + super.sendSuccessResp(resp);
  94 + } catch (Exception e) {
  95 + log.error("提交订单失败", e);
  96 + super.sendError(e.getMessage());
  97 + }
  98 + }
  99 +
  100 + @RequestMapping(value = "/list", method = RequestMethod.POST)
  101 + public void list(@RequestBody SearchOrderListReq req) {
  102 + try {
  103 + SearchOrderListResp resp = this.buyerOrderService.searchOrders(req);
  104 + super.sendSuccessResp(resp);
  105 + } catch (Exception e) {
  106 + log.error("提交订单失败", e);
  107 + super.sendError(e.getMessage());
  108 + }
  109 + }
84 110 }
... ...