后端:删除购物车模块,合并到订单模块

后端:设计订单价格计算相关方法
This commit is contained in:
YunaiV
2019-04-09 23:39:38 +08:00
parent 6eda8734a6
commit 3e485c2d0f
32 changed files with 535 additions and 413 deletions

View File

@@ -0,0 +1,22 @@
package cn.iocoder.mall.order.application.controller.users;
import cn.iocoder.common.framework.vo.CommonResult;
import cn.iocoder.mall.order.api.CartService;
import cn.iocoder.mall.order.api.OrderService;
public class UsersCartController {
// TODO 注入
private CartService cartService;
// TODO 注入
private OrderService orderService;
public CommonResult<Object> confirmOrder() {
// 查询购物车列表(选中的)
// cartService.list(userId, true);
// 查询确认订单信息的明细
return null;
}
}

View File

@@ -6,7 +6,6 @@ import cn.iocoder.mall.order.api.bo.OrderCreateBO;
import cn.iocoder.mall.order.api.bo.OrderPageBO;
import cn.iocoder.mall.order.api.dto.OrderCreateDTO;
import cn.iocoder.mall.order.api.dto.OrderQueryDTO;
import cn.iocoder.mall.order.api.dto.OrderUserPageDTO;
import cn.iocoder.mall.order.application.convert.OrderConvertAPP;
import cn.iocoder.mall.order.application.po.user.OrderCreatePO;
import cn.iocoder.mall.user.sdk.context.UserSecurityContextHolder;

View File

@@ -0,0 +1,26 @@
package cn.iocoder.mall.order.application.vo;
public class FeeMessageVO {
/**
* 总价
*/
private Integer originalTotal;
/**
* 优惠总价
*
* 注意,满多少元包邮,不算在优惠中。
*/
private Integer discountTotal;
/**
* 邮费
*/
private Integer postageTotal;
/**
* 最终价格
*
* 计算公式 = 总价 - 优惠总价 + 邮费
*/
private Integer presentTotal;
}

View File

@@ -0,0 +1,5 @@
package cn.iocoder.mall.order.application.vo;
public class UsersCartItemVO {
}

View File

@@ -0,0 +1,11 @@
package cn.iocoder.mall.order.application.vo;
import java.util.List;
public class UsersCartListVO {
private List<UsersCartItemVO> items;
private FeeMessageVO feeMessage;
}