From 11117291279ffb6e504e96536870ee11b3f0f5ec Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Wed, 10 Jul 2024 09:22:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- o2o/add_store_commission.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/o2o/add_store_commission.go b/o2o/add_store_commission.go index 7d54311..9062aef 100644 --- a/o2o/add_store_commission.go +++ b/o2o/add_store_commission.go @@ -4,7 +4,6 @@ import ( "code.fnuoos.com/go_rely_warehouse/zyos_go_o2o_business.git/db" "code.fnuoos.com/go_rely_warehouse/zyos_go_o2o_business.git/db/model" zhios_o2o_business_utils "code.fnuoos.com/go_rely_warehouse/zyos_go_o2o_business.git/utils" - "strconv" "time" "xorm.io/xorm" ) @@ -46,7 +45,7 @@ func AddStoreCommission(eg *xorm.Engine, args map[string]string) { Pvd: args["pvd"], Oid: args["oid"], CreateTime: time.Now(), - Amount: zhios_o2o_business_utils.Float64ToStrByPrec(amount, 4), + Amount: zhios_o2o_business_utils.Float64ToStrByPrec(amount, 9), Rate: args["bili"], } eg.InsertOne(&ord) @@ -85,9 +84,9 @@ func SettleStoreCommission(eg *xorm.Engine, session *xorm.Session, args map[stri MerchantId: relate.Uid, StoreId: manager.Id, Type: 0, - Amount: strconv.FormatFloat(amount, 'f', 4, 64), - BeforeAmount: strconv.FormatFloat(mBeforeAmount, 'f', 4, 64), - AfterAmount: strconv.FormatFloat(mAfterAmount, 'f', 4, 64), + Amount: zhios_o2o_business_utils.Float64ToStrByPrec(amount, 9), + BeforeAmount: zhios_o2o_business_utils.Float64ToStrByPrec(mBeforeAmount, 9), + AfterAmount: zhios_o2o_business_utils.Float64ToStrByPrec(mAfterAmount, 9), OrdType: relate.Pvd, OrdId: relate.Oid, OrdTitle: args["title"], @@ -144,9 +143,9 @@ func DeductStoreCommission(eg *xorm.Engine, session *xorm.Session, args map[stri MerchantId: relate.Uid, StoreId: manager.Id, Type: 1, - Amount: strconv.FormatFloat(amount, 'f', 4, 64), - BeforeAmount: strconv.FormatFloat(mBeforeAmount, 'f', 4, 64), - AfterAmount: strconv.FormatFloat(mAfterAmount, 'f', 4, 64), + Amount: zhios_o2o_business_utils.Float64ToStrByPrec(amount, 9), + BeforeAmount: zhios_o2o_business_utils.Float64ToStrByPrec(mBeforeAmount, 9), + AfterAmount: zhios_o2o_business_utils.Float64ToStrByPrec(mAfterAmount, 9), OrdType: relate.Pvd, OrdId: relate.Oid, OrdTitle: args["title"],