|
|
@@ -161,7 +161,7 @@ func (self *OrderController) MultipleCreate() {
|
|
|
}
|
|
|
//创建订单明细
|
|
|
totalPrice += product.Price * cNums
|
|
|
- go CreateOrderDetails(product, order, cNums)
|
|
|
+ CreateOrderDetails(product, order, cNums)
|
|
|
}
|
|
|
freight := order_model.FREIGHT
|
|
|
if totalPrice >= order_model.FREIGHT_LIMIT || beego.AppConfig.String("RunMode") == "dev" {
|
|
|
@@ -220,7 +220,7 @@ func (self *OrderController) MultShopCreate() {
|
|
|
|
|
|
//创建订单明细
|
|
|
totalPrice += product.Price * cNums
|
|
|
- go CreateOrderDetails(product, order, cNums)
|
|
|
+ CreateOrderDetails(product, order, cNums)
|
|
|
}
|
|
|
freight := order_model.FREIGHT
|
|
|
if totalPrice >= order_model.FREIGHT_LIMIT || beego.AppConfig.String("RunMode") == "dev" {
|
|
|
@@ -241,7 +241,7 @@ func (self *OrderController) MultShopCreate() {
|
|
|
}
|
|
|
|
|
|
func ClearCart(userId int64, orderId string) {
|
|
|
- orderDetails := order_model.GetAllDetailsOrderId(orderId, true)
|
|
|
+ orderDetails := order_model.GetAllDetailsOrderId(orderId, false)
|
|
|
for _, item := range orderDetails {
|
|
|
cartItem := order_model.GetCartByUidAndPid(userId, item.ProductId)
|
|
|
if cartItem != nil {
|
|
|
@@ -473,5 +473,5 @@ func CreateOrderDetails(product *product_model.Product, order *order_model.Order
|
|
|
colorName = productColor.Name
|
|
|
}
|
|
|
}
|
|
|
- go new(order_model.OrderDetail).Create(order.OrderId, order.Id, product.Id, product.Price, product.RoboBalancePrice, product.Name, sizeName, colorName, cNums)
|
|
|
+ new(order_model.OrderDetail).Create(order.OrderId, order.Id, product.Id, product.Price, product.RoboBalancePrice, product.Name, sizeName, colorName, cNums)
|
|
|
}
|