Browse Source

test

tags/v4.3.1
huangjiajun 1 year ago
parent
commit
c955869442
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      rule/self_buy_global.go

+ 7
- 1
rule/self_buy_global.go View File

@@ -7,6 +7,7 @@ import (
zhios_order_relate_utils "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/utils"
"errors"
"github.com/jinzhu/copier"
"strings"
"time"
"xorm.io/xorm"
)
@@ -229,7 +230,12 @@ func OneDoing(sess *xorm.Session, data model.MallOrdCapitalPoolTotal, oneMoney,
}
//剩余有钱 并且是普通商品的 还有普通商品的金额大于最小分配金额
if zhios_order_relate_utils.StrToFloat64(data.LeavePrice) > 0 && data.Type == 0 && zhios_order_relate_utils.StrToFloat64(data.OtherPrice) >= minMoney {
data.Num = int(zhios_order_relate_utils.StrToFloat64(data.LeavePrice) / minMoney)
Num := zhios_order_relate_utils.StrToFloat64(data.LeavePrice) / minMoney
if strings.Contains(zhios_order_relate_utils.Float64ToStr(Num), ".") {
data.Num = int(Num) + 1
} else {
data.Num = int(Num)
}
if data.Num == 0 {
data.Num = 1
}


Loading…
Cancel
Save