perf(商城): 下单流程

代码优化
master
hequan_waynaqua 4 years ago
parent 60de41a326
commit 2763bce459

@ -4,6 +4,9 @@ import lombok.Data;
import java.util.List;
/**
* VO
*/
@Data
public class OrderVO {

@ -5,6 +5,9 @@ import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
*
*/
@Data
public class OrderDTO implements Serializable {

@ -195,9 +195,6 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
// 优惠卷抵扣费用
BigDecimal couponPrice = new BigDecimal("0.00");
// 团购抵扣费用
BigDecimal grouponPrice = new BigDecimal("0.00");
// 订单费用
BigDecimal orderTotalPrice = checkedGoodsPrice.add(freightPrice).subtract(couponPrice).max(new BigDecimal("0.00"));
@ -208,7 +205,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
map.put("order", orderDTO);
map.put("notifyUrl", WaynConfig.getMobileUrl() + "/message/order/submit");
// 异步发送邮件
// 异步下单
rabbitTemplate.convertAndSend("OrderDirectExchange", "OrderDirectRouting", map);
return R.success().add("actualPrice", actualPrice).add("orderSn", orderSn);
}
@ -316,7 +313,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
}
@Override
@Transactional
@Transactional(rollbackFor = Exception.class)
public R prepay(String orderSn, HttpServletRequest request) {
// 获取订单详情
Order order = getOne(new QueryWrapper<Order>().eq("order_sn", orderSn));
@ -357,7 +354,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
@Override
@Transactional
@Transactional(rollbackFor = Exception.class)
public R h5pay(String orderSn, HttpServletRequest request) {
// 获取订单详情
Order order = getOne(new QueryWrapper<Order>().eq("order_sn", orderSn));

Loading…
Cancel
Save