|
@@ -143,7 +143,7 @@ func (self *OrderController) Create() {
|
|
|
|
|
|
|
|
//提货券
|
|
//提货券
|
|
|
userLeftBalanceCount := balance_model.GetUserTotalBalance(wxUId)
|
|
userLeftBalanceCount := balance_model.GetUserTotalBalance(wxUId)
|
|
|
- if userLeftBalanceCount > int64(0) {
|
|
|
|
|
|
|
+ if userLeftBalanceCount > int64(0) && product.UseQuan {
|
|
|
disAmount = float64(0)
|
|
disAmount = float64(0)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -202,6 +202,7 @@ func (self *OrderController) MultipleCreate() {
|
|
|
totalPrice := int64(0)
|
|
totalPrice := int64(0)
|
|
|
totalPv := int64(0)
|
|
totalPv := int64(0)
|
|
|
totalSilver := int64(0)
|
|
totalSilver := int64(0)
|
|
|
|
|
+ totalQuan := int64(0)
|
|
|
c_arr := strings.Split(ids, ",")
|
|
c_arr := strings.Split(ids, ",")
|
|
|
c_nums := strings.Split(nums, ",")
|
|
c_nums := strings.Split(nums, ",")
|
|
|
|
|
|
|
@@ -248,6 +249,9 @@ func (self *OrderController) MultipleCreate() {
|
|
|
}
|
|
}
|
|
|
//统计总银豆
|
|
//统计总银豆
|
|
|
totalSilver += product.Silver * cNums
|
|
totalSilver += product.Silver * cNums
|
|
|
|
|
+ if product.UseQuan {
|
|
|
|
|
+ totalQuan += product.Price * cNums
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//统计实抵银豆
|
|
//统计实抵银豆
|
|
@@ -291,7 +295,7 @@ func (self *OrderController) MultipleCreate() {
|
|
|
dis := (float64(product.Price*cNums) - singleTSilver) * float64(product.Pv) / float64(100)
|
|
dis := (float64(product.Price*cNums) - singleTSilver) * float64(product.Pv) / float64(100)
|
|
|
disAmount := int64(math.Round(dis))
|
|
disAmount := int64(math.Round(dis))
|
|
|
|
|
|
|
|
- if userLeftBalanceCount > int64(0) {
|
|
|
|
|
|
|
+ if userLeftBalanceCount > int64(0) && totalQuan > 0 {
|
|
|
disAmount = int64(0)
|
|
disAmount = int64(0)
|
|
|
}
|
|
}
|
|
|
totalDisamout += disAmount
|
|
totalDisamout += disAmount
|