huangjiajun 2 kuukautta sitten
vanhempi
commit
39d8f9e04e
3 muutettua tiedostoa jossa 9 lisäystä ja 1 poistoa
  1. +1
    -1
      go.mod
  2. +2
    -0
      go.sum
  3. +6
    -0
      rule/service_award_dividend/return.go

+ 1
- 1
go.mod Näytä tiedosto

@@ -7,7 +7,7 @@ go 1.15

require (
code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5
code.fnuoos.com/go_rely_warehouse/zyos_model.git v0.0.4-0.20240830093306-94cbf0dfb7bd
code.fnuoos.com/go_rely_warehouse/zyos_model.git v0.0.4-0.20241010102102-5676d4b8436f
github.com/gin-gonic/gin v1.9.1
github.com/go-redis/redis v6.15.9+incompatible
github.com/gomodule/redigo v1.8.9


+ 2
- 0
go.sum Näytä tiedosto

@@ -12,6 +12,8 @@ code.fnuoos.com/go_rely_warehouse/zyos_model.git v0.0.4-0.20240816014008-a236ebf
code.fnuoos.com/go_rely_warehouse/zyos_model.git v0.0.4-0.20240816014008-a236ebf42395/go.mod h1:nT2x13YFgrS3tS1fDyUR6q/GNIK+hPw7bdzZXz99SM0=
code.fnuoos.com/go_rely_warehouse/zyos_model.git v0.0.4-0.20240830093306-94cbf0dfb7bd h1:dGyT+A2w9WXkThZdxZods3cYQQjGebqksKjBxuTAK74=
code.fnuoos.com/go_rely_warehouse/zyos_model.git v0.0.4-0.20240830093306-94cbf0dfb7bd/go.mod h1:nT2x13YFgrS3tS1fDyUR6q/GNIK+hPw7bdzZXz99SM0=
code.fnuoos.com/go_rely_warehouse/zyos_model.git v0.0.4-0.20241010102102-5676d4b8436f h1:hllCUup8mVTllbA9afbtdRLKy1rektV8mccWqfyTpJQ=
code.fnuoos.com/go_rely_warehouse/zyos_model.git v0.0.4-0.20241010102102-5676d4b8436f/go.mod h1:nT2x13YFgrS3tS1fDyUR6q/GNIK+hPw7bdzZXz99SM0=
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a h1:lSA0F4e9A2NcQSqGqTOXqu2aRi/XEQxDCBwM8yJtE6s=


+ 6
- 0
rule/service_award_dividend/return.go Näytä tiedosto

@@ -112,6 +112,7 @@ func AddPeriod(eg *xorm.Engine, sess *xorm.Session, req map[string]string) int {
return 3
}
}
data.Price = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(data.Price) + zhios_order_relate_utils.StrToFloat64(req["price"]))
data.Sum = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(data.Sum) + zhios_order_relate_utils.StrToFloat64(req["amount"]))
data.UpdateTime = time.Now()
update, err := sess.Where("id=?", data.Id).Cols("sum,update_time").Update(&data)
@@ -132,6 +133,7 @@ func AddPeriod(eg *xorm.Engine, sess *xorm.Session, req map[string]string) int {
period = base.MemberUplvPeriod
break
case "3":
req["price"] = "0"
period = base.NewMemberPeriod
break
}
@@ -145,6 +147,7 @@ func AddPeriod(eg *xorm.Engine, sess *xorm.Session, req map[string]string) int {
Sum: req["amount"],
HasReturnMoney: "0",
Period: period,
Price: req["price"],
EveryMoney: zhios_order_relate_utils.Float64ToStr(float64(int(zhios_order_relate_utils.StrToFloat64(req["amount"])/float64(period)*100)) / 100),
Pvd: zhios_order_relate_utils.StrToInt(req["pvd"]),
CoinId: base.CoinId,
@@ -188,6 +191,7 @@ func AddPeriodEg(eg *xorm.Engine, req map[string]string) int {
return 3
}
}
data.Price = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(data.Price) + zhios_order_relate_utils.StrToFloat64(req["price"]))
data.Sum = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(data.Sum) + zhios_order_relate_utils.StrToFloat64(req["amount"]))
data.UpdateTime = time.Now()
update, err := eg.Where("id=?", data.Id).Cols("sum,update_time").Update(&data)
@@ -208,6 +212,7 @@ func AddPeriodEg(eg *xorm.Engine, req map[string]string) int {
period = base.MemberUplvPeriod
break
case "3":
req["price"] = "0"
period = base.NewMemberPeriod
break
}
@@ -221,6 +226,7 @@ func AddPeriodEg(eg *xorm.Engine, req map[string]string) int {
UpdateTime: time.Now(),
Sum: req["amount"],
HasReturnMoney: "0",
Price: req["price"],
Period: period,
EveryMoney: zhios_order_relate_utils.Float64ToStr(float64(int(zhios_order_relate_utils.StrToFloat64(req["amount"])/float64(period)*100)) / 100),
Pvd: zhios_order_relate_utils.StrToInt(req["pvd"]),


Ladataan…
Peruuta
Tallenna