|
|
@@ -122,7 +122,7 @@ func (self *OrderController) Create() {
|
|
|
order.Save()
|
|
|
//创建订单明细
|
|
|
go new(order_model.OrderDetail).Create(order.OrderId, order.Id, product.Id, product.Price, product.RoboBalancePrice, product.Name,
|
|
|
- sizeName, colorName, count)
|
|
|
+ sizeName, colorName, count, wxUser.Depart)
|
|
|
//未支付订单加入取消队列
|
|
|
cancelKey := lib_redis.GetOrderCancelList()
|
|
|
lib_redis.ThrowInRedisList(cancelKey, order.OrderId)
|
|
|
@@ -235,7 +235,7 @@ func (self *OrderController) MultipleCreate() {
|
|
|
}
|
|
|
//创建订单明细
|
|
|
totalPrice += product.Price * cNums
|
|
|
- CreateOrderDetails(product, order, cNums)
|
|
|
+ CreateOrderDetails(product, order, cNums, wxUser.Depart)
|
|
|
}
|
|
|
freight := base_config.GetFreight()
|
|
|
if totalPrice >= base_config.GetOrderLimit() {
|
|
|
@@ -315,7 +315,7 @@ func (self *OrderController) MultShopCreate() {
|
|
|
}
|
|
|
//创建订单明细
|
|
|
totalPrice += product.Price * cNums
|
|
|
- CreateOrderDetails(product, order, cNums)
|
|
|
+ CreateOrderDetails(product, order, cNums, wxUser.Depart)
|
|
|
}
|
|
|
freight := base_config.GetFreight()
|
|
|
if totalPrice >= base_config.GetOrderLimit() {
|
|
|
@@ -419,7 +419,7 @@ func (self *OrderController) MultCentCreate() {
|
|
|
if product == nil {
|
|
|
self.ReturnError(403, apps.NoExist, "", nil)
|
|
|
}
|
|
|
- CreateOrderDetails(product, order, cNums)
|
|
|
+ CreateOrderDetails(product, order, cNums, wxUser.Depart)
|
|
|
}
|
|
|
order.TotalPrice = totalPrice
|
|
|
order.Freight = freight
|
|
|
@@ -653,7 +653,7 @@ func (self *OrderController) MerchantListCount() {
|
|
|
self.ServeJSON()
|
|
|
}
|
|
|
|
|
|
-func CreateOrderDetails(product *product_model.Product, order *order_model.Order, cNums int64) {
|
|
|
+func CreateOrderDetails(product *product_model.Product, order *order_model.Order, cNums, depart int64) {
|
|
|
//获取商品属性详情
|
|
|
sizeName := ""
|
|
|
colorName := ""
|
|
|
@@ -669,5 +669,5 @@ func CreateOrderDetails(product *product_model.Product, order *order_model.Order
|
|
|
colorName = productColor.Name
|
|
|
}
|
|
|
}
|
|
|
- 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, depart)
|
|
|
}
|