|
@@ -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" |
|
|
"code.fnuoos.com/go_rely_warehouse/zyos_go_o2o_business.git/db/model" |
|
|
"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" |
|
|
zhios_o2o_business_utils "code.fnuoos.com/go_rely_warehouse/zyos_go_o2o_business.git/utils" |
|
|
"strconv" |
|
|
|
|
|
"time" |
|
|
"time" |
|
|
"xorm.io/xorm" |
|
|
"xorm.io/xorm" |
|
|
) |
|
|
) |
|
@@ -46,7 +45,7 @@ func AddStoreCommission(eg *xorm.Engine, args map[string]string) { |
|
|
Pvd: args["pvd"], |
|
|
Pvd: args["pvd"], |
|
|
Oid: args["oid"], |
|
|
Oid: args["oid"], |
|
|
CreateTime: time.Now(), |
|
|
CreateTime: time.Now(), |
|
|
Amount: zhios_o2o_business_utils.Float64ToStrByPrec(amount, 4), |
|
|
|
|
|
|
|
|
Amount: zhios_o2o_business_utils.Float64ToStrByPrec(amount, 9), |
|
|
Rate: args["bili"], |
|
|
Rate: args["bili"], |
|
|
} |
|
|
} |
|
|
eg.InsertOne(&ord) |
|
|
eg.InsertOne(&ord) |
|
@@ -85,9 +84,9 @@ func SettleStoreCommission(eg *xorm.Engine, session *xorm.Session, args map[stri |
|
|
MerchantId: relate.Uid, |
|
|
MerchantId: relate.Uid, |
|
|
StoreId: manager.Id, |
|
|
StoreId: manager.Id, |
|
|
Type: 0, |
|
|
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, |
|
|
OrdType: relate.Pvd, |
|
|
OrdId: relate.Oid, |
|
|
OrdId: relate.Oid, |
|
|
OrdTitle: args["title"], |
|
|
OrdTitle: args["title"], |
|
@@ -144,9 +143,9 @@ func DeductStoreCommission(eg *xorm.Engine, session *xorm.Session, args map[stri |
|
|
MerchantId: relate.Uid, |
|
|
MerchantId: relate.Uid, |
|
|
StoreId: manager.Id, |
|
|
StoreId: manager.Id, |
|
|
Type: 1, |
|
|
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, |
|
|
OrdType: relate.Pvd, |
|
|
OrdId: relate.Oid, |
|
|
OrdId: relate.Oid, |
|
|
OrdTitle: args["title"], |
|
|
OrdTitle: args["title"], |
|
|