From 38b2613add0361422029cf9a853fdc626394b4cb Mon Sep 17 00:00:00 2001 From: YunaiV <> Date: Sun, 14 Apr 2019 01:28:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E7=AB=AF=20+=20=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=EF=BC=9A=E6=8F=90=E4=BA=A4=E8=B4=AD=E7=89=A9=E8=BD=A6=E8=AE=A2?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mobile-web/src/api/order.js | 25 ++++++- mobile-web/src/page/cart/index.vue | 2 +- mobile-web/src/page/shipping/order.vue | 70 +++++++++++++------ .../users/UsersOrderController.java | 32 +++++++++ .../application/convert/OrderConvertAPP.java | 23 ++++-- .../iocoder/mall/order/api/CartService.java | 2 +- .../api/constant/CartItemStatusEnum.java | 2 +- .../api/constant/OrderErrorCodeEnum.java | 1 + .../mall/order/biz/dao/CartMapper.java | 7 +- .../order/biz/service/CartServiceImpl.java | 9 ++- .../src/main/resources/mapper/CartMapper.xml | 11 ++- 11 files changed, 146 insertions(+), 38 deletions(-) diff --git a/mobile-web/src/api/order.js b/mobile-web/src/api/order.js index faefcb6b2..72fdb1f6f 100644 --- a/mobile-web/src/api/order.js +++ b/mobile-web/src/api/order.js @@ -21,7 +21,7 @@ export function confirmReceiving(orderId) { }); } -export function getConfirmCreateOrder(skuId, quantity) { +export function getOrderConfirmCreateOrder(skuId, quantity) { return request({ url: '/order-api/users/order/confirm_create_order', method: 'get', @@ -45,6 +45,18 @@ export function createOrder(params) { }); } +export function createOrderFromCart(userAddressId, + remark) { + return request({ + url: '/order-api/users/order/create_order_from_cart', + method: 'post', + params: { + userAddressId, + remark, + } + }); +} + // Cart export function addCart(skuId, quantity) { @@ -87,6 +99,17 @@ export function updateCartSelected(skuIds, selected) { }); } +export function getCartConfirmCreateOrder(skuId, quantity) { + return request({ + url: '/order-api/users/cart/confirm_create_order', + method: 'get', + params: { + skuId, + quantity, + } + }); +} + // 物流信息 export function getLogisticsInfo(params) { diff --git a/mobile-web/src/page/cart/index.vue b/mobile-web/src/page/cart/index.vue index 33136d849..47cce44fb 100644 --- a/mobile-web/src/page/cart/index.vue +++ b/mobile-web/src/page/cart/index.vue @@ -157,7 +157,7 @@ export default { }) }, onSubmit() { - this.$router.push('/order') + this.$router.push('/order?from=cart') }, convertProduct(item) { // debugger; diff --git a/mobile-web/src/page/shipping/order.vue b/mobile-web/src/page/shipping/order.vue index 7cb647b6e..5e6fea44d 100644 --- a/mobile-web/src/page/shipping/order.vue +++ b/mobile-web/src/page/shipping/order.vue @@ -68,7 +68,12 @@