|
@@ -2,8 +2,8 @@ package order_controller
|
|
|
|
|
|
|
|
import (
|
|
import (
|
|
|
"fmt"
|
|
"fmt"
|
|
|
- "fohow.com/apps/models/base_config"
|
|
|
|
|
"fohow.com/apps/models/cent_model"
|
|
"fohow.com/apps/models/cent_model"
|
|
|
|
|
+ "fohow.com/apps/models/sys_config"
|
|
|
"fohow.com/libs/lib_redis"
|
|
"fohow.com/libs/lib_redis"
|
|
|
// "fmt"
|
|
// "fmt"
|
|
|
"strconv"
|
|
"strconv"
|
|
@@ -113,8 +113,8 @@ func (self *OrderController) Create() {
|
|
|
if wxUId == 76 {
|
|
if wxUId == 76 {
|
|
|
totalPrice = 1
|
|
totalPrice = 1
|
|
|
}
|
|
}
|
|
|
- freight := base_config.GetFreight()
|
|
|
|
|
- if totalPrice >= base_config.GetOrderLimit() {
|
|
|
|
|
|
|
+ freight := sys_config.GetFreight()
|
|
|
|
|
+ if totalPrice >= sys_config.GetOrderLimit() {
|
|
|
freight = int64(0)
|
|
freight = int64(0)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -246,8 +246,8 @@ func (self *OrderController) MultipleCreate() {
|
|
|
totalPrice += product.Price * cNums
|
|
totalPrice += product.Price * cNums
|
|
|
CreateOrderDetails(product, order, cNums, wxUser.Depart)
|
|
CreateOrderDetails(product, order, cNums, wxUser.Depart)
|
|
|
}
|
|
}
|
|
|
- freight := base_config.GetFreight()
|
|
|
|
|
- if totalPrice >= base_config.GetOrderLimit() {
|
|
|
|
|
|
|
+ freight := sys_config.GetFreight()
|
|
|
|
|
+ if totalPrice >= sys_config.GetOrderLimit() {
|
|
|
freight = int64(0)
|
|
freight = int64(0)
|
|
|
}
|
|
}
|
|
|
order.TotalPrice = totalPrice
|
|
order.TotalPrice = totalPrice
|
|
@@ -329,8 +329,8 @@ func (self *OrderController) MultShopCreate() {
|
|
|
totalPrice += product.Price * cNums
|
|
totalPrice += product.Price * cNums
|
|
|
CreateOrderDetails(product, order, cNums, wxUser.Depart)
|
|
CreateOrderDetails(product, order, cNums, wxUser.Depart)
|
|
|
}
|
|
}
|
|
|
- freight := base_config.GetFreight()
|
|
|
|
|
- if totalPrice >= base_config.GetOrderLimit() {
|
|
|
|
|
|
|
+ freight := sys_config.GetFreight()
|
|
|
|
|
+ if totalPrice >= sys_config.GetOrderLimit() {
|
|
|
freight = int64(0)
|
|
freight = int64(0)
|
|
|
}
|
|
}
|
|
|
order.TotalPrice = totalPrice
|
|
order.TotalPrice = totalPrice
|
|
@@ -407,9 +407,9 @@ func (self *OrderController) MultCentCreate() {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//订单合法性判断
|
|
//订单合法性判断
|
|
|
- freight := base_config.GetFreight()
|
|
|
|
|
- if totalPrice < base_config.GetOrderLimit() {
|
|
|
|
|
- self.ReturnError(403, []string{apps.OrderNotEnough[0], fmt.Sprintf("订单金额不能低于%d积分", base_config.GetOrderLimit()/int64(100))}, "", nil)
|
|
|
|
|
|
|
+ freight := sys_config.GetFreight()
|
|
|
|
|
+ if totalPrice < sys_config.GetOrderLimit() {
|
|
|
|
|
+ self.ReturnError(403, []string{apps.OrderNotEnough[0], fmt.Sprintf("订单金额不能低于%d积分", sys_config.GetOrderLimit()/int64(100))}, "", nil)
|
|
|
} else {
|
|
} else {
|
|
|
freight = int64(0)
|
|
freight = int64(0)
|
|
|
}
|
|
}
|