Authored by chenchao

define api req & resp

@@ -4,10 +4,7 @@ import com.yohobuy.ufo.model.order.req.SellerDepositOrderComputeReq; @@ -4,10 +4,7 @@ import com.yohobuy.ufo.model.order.req.SellerDepositOrderComputeReq;
4 import com.yohobuy.ufo.model.order.req.SellerDepositOrderDetailReq; 4 import com.yohobuy.ufo.model.order.req.SellerDepositOrderDetailReq;
5 import com.yohobuy.ufo.model.order.req.SellerDepositOrderListReq; 5 import com.yohobuy.ufo.model.order.req.SellerDepositOrderListReq;
6 import com.yohobuy.ufo.model.order.req.SellerDepositOrderSubmitReq; 6 import com.yohobuy.ufo.model.order.req.SellerDepositOrderSubmitReq;
7 -import com.yohobuy.ufo.model.order.resp.SellerDepositOrderComputeResp;  
8 -import com.yohobuy.ufo.model.order.resp.SellerDepositOrderDetailResp;  
9 -import com.yohobuy.ufo.model.order.resp.SellerDepositOrderListResp;  
10 -import com.yohobuy.ufo.model.order.resp.SellerDepositOrderSubmitResp; 7 +import com.yohobuy.ufo.model.order.resp.*;
11 import com.yohoufo.common.ApiResponse; 8 import com.yohoufo.common.ApiResponse;
12 import com.yohoufo.order.service.seller.deposit.SellerDepositOrderService; 9 import com.yohoufo.order.service.seller.deposit.SellerDepositOrderService;
13 import com.yohoufo.order.utils.LoggerUtils; 10 import com.yohoufo.order.utils.LoggerUtils;
@@ -42,10 +39,9 @@ public class SellerDepositOrderController { @@ -42,10 +39,9 @@ public class SellerDepositOrderController {
42 39
43 @RequestMapping(params = "method=ufo.depositOrder.submit") 40 @RequestMapping(params = "method=ufo.depositOrder.submit")
44 public ApiResponse submit(@RequestParam(name = "uid")int uid, 41 public ApiResponse submit(@RequestParam(name = "uid")int uid,
45 - @RequestParam(name = "goodsList")String goodsList,  
46 - @RequestParam(name = "addressId") String addressId){ 42 + @RequestParam(name = "goodsList")String goodsList){
47 SellerDepositOrderSubmitReq req = SellerDepositOrderSubmitReq.builder() 43 SellerDepositOrderSubmitReq req = SellerDepositOrderSubmitReq.builder()
48 - .uid(uid).goodsList(goodsList).addressId(addressId).build(); 44 + .uid(uid).goodsList(goodsList).build();
49 logger.info("in ufo.depositOrder.submit req {}", req); 45 logger.info("in ufo.depositOrder.submit req {}", req);
50 SellerDepositOrderSubmitResp resp = sellerDepositOrderService.submit(req); 46 SellerDepositOrderSubmitResp resp = sellerDepositOrderService.submit(req);
51 return new ApiResponse.ApiResponseBuilder() 47 return new ApiResponse.ApiResponseBuilder()
@@ -63,14 +59,15 @@ public class SellerDepositOrderController { @@ -63,14 +59,15 @@ public class SellerDepositOrderController {
63 */ 59 */
64 @RequestMapping(params = "method=ufo.depositOrder.list") 60 @RequestMapping(params = "method=ufo.depositOrder.list")
65 public ApiResponse list(@RequestParam(name = "uid")int uid, 61 public ApiResponse list(@RequestParam(name = "uid")int uid,
  62 + @RequestParam(name = "listType")int listType,
66 @RequestParam(value = "page", required = false, defaultValue = "1") int page, 63 @RequestParam(value = "page", required = false, defaultValue = "1") int page,
67 @RequestParam(value = "limit", required = false, defaultValue = "10") int limit){ 64 @RequestParam(value = "limit", required = false, defaultValue = "10") int limit){
68 65
69 SellerDepositOrderListReq req = SellerDepositOrderListReq.builder() 66 SellerDepositOrderListReq req = SellerDepositOrderListReq.builder()
70 - .uid(uid).limit(limit).page(page).build(); 67 + .uid(uid).listType(listType).limit(limit).page(page).build();
71 68
72 logger.info("in ufo.depositOrder.list req {}", req); 69 logger.info("in ufo.depositOrder.list req {}", req);
73 - SellerDepositOrderListResp resp = sellerDepositOrderService.getOrderList(req); 70 + PageResp<SellerDepositOrderListResp> resp = sellerDepositOrderService.getOrderList(req);
74 return new ApiResponse.ApiResponseBuilder() 71 return new ApiResponse.ApiResponseBuilder()
75 .code(200) 72 .code(200)
76 .data(resp) 73 .data(resp)
@@ -92,4 +89,26 @@ public class SellerDepositOrderController { @@ -92,4 +89,26 @@ public class SellerDepositOrderController {
92 .message("寄存订单详情查询成功") 89 .message("寄存订单详情查询成功")
93 .build(); 90 .build();
94 } 91 }
  92 +
  93 + /**
  94 + * 发货
  95 + * @param uid
  96 + * @param orderCode
  97 + * @param depotNum
  98 + * @param addressId
  99 + * @return
  100 + */
  101 + @RequestMapping(params = "method=ufo.depositOrder.deliverToDepot")
  102 + public ApiResponse deliverToDepot(@RequestParam(name = "uid")int uid,
  103 + @RequestParam(name = "orderCode")long orderCode,
  104 + @RequestParam(name = "depotNum")int depotNum,
  105 + @RequestParam(name = "addressId") String addressId){
  106 +
  107 +
  108 + return new ApiResponse.ApiResponseBuilder()
  109 + .code(200)
  110 + .data(null)
  111 + .message("寄存订单发货录入成功")
  112 + .build();
  113 + }
95 } 114 }
@@ -4,10 +4,7 @@ import com.yohobuy.ufo.model.order.req.SellerDepositOrderComputeReq; @@ -4,10 +4,7 @@ import com.yohobuy.ufo.model.order.req.SellerDepositOrderComputeReq;
4 import com.yohobuy.ufo.model.order.req.SellerDepositOrderDetailReq; 4 import com.yohobuy.ufo.model.order.req.SellerDepositOrderDetailReq;
5 import com.yohobuy.ufo.model.order.req.SellerDepositOrderListReq; 5 import com.yohobuy.ufo.model.order.req.SellerDepositOrderListReq;
6 import com.yohobuy.ufo.model.order.req.SellerDepositOrderSubmitReq; 6 import com.yohobuy.ufo.model.order.req.SellerDepositOrderSubmitReq;
7 -import com.yohobuy.ufo.model.order.resp.SellerDepositOrderComputeResp;  
8 -import com.yohobuy.ufo.model.order.resp.SellerDepositOrderDetailResp;  
9 -import com.yohobuy.ufo.model.order.resp.SellerDepositOrderListResp;  
10 -import com.yohobuy.ufo.model.order.resp.SellerDepositOrderSubmitResp; 7 +import com.yohobuy.ufo.model.order.resp.*;
11 import org.springframework.stereotype.Service; 8 import org.springframework.stereotype.Service;
12 9
13 @Service 10 @Service
@@ -24,7 +21,7 @@ public class SellerDepositOrderService { @@ -24,7 +21,7 @@ public class SellerDepositOrderService {
24 21
25 22
26 23
27 - public SellerDepositOrderListResp getOrderList(SellerDepositOrderListReq req ){ 24 + public PageResp<SellerDepositOrderListResp> getOrderList(SellerDepositOrderListReq req ){
28 return null; 25 return null;
29 } 26 }
30 27