Browse Source

update 一个圈圈

master
DengBiao 9 months ago
parent
commit
a22c0fb968
2 changed files with 9 additions and 3 deletions
  1. +5
    -0
      md/mq.go
  2. +4
    -3
      rule/one_circles/one_circles_star_level_dividends.go

+ 5
- 0
md/mq.go View File

@@ -19,3 +19,8 @@ type OneCirclesStructForAutoExchangeGreenEnergy struct {
MasterId string `json:"master_id"` MasterId string `json:"master_id"`
Uid int `json:"uid"` Uid int `json:"uid"`
} }
type OneCirclesStructForStarLevelDividends struct {
MasterId string `json:"master_id"`
Uid int `json:"uid"`
SignDividend float64 `json:"sign_dividend"`
}

+ 4
- 3
rule/one_circles/one_circles_star_level_dividends.go View File

@@ -352,9 +352,10 @@ func SettlementStarLevelDividends(engine *xorm.Engine, masterId string, ch *rabb
siginDividend, _ := siginDividendValue.Float64() siginDividend, _ := siginDividendValue.Float64()
if siginDividend > 0 { if siginDividend > 0 {
//TODO::推入rabbitmq 异步处理 //TODO::推入rabbitmq 异步处理
ch.Publish(md.OneCirclesExchange, md.OneCirclesStructForAutoExchangeGreenEnergy{
MasterId: masterId,
Uid: item.Uid,
ch.Publish(md.OneCirclesExchange, md.OneCirclesStructForStarLevelDividends{
MasterId: masterId,
Uid: item.Uid,
SignDividend: siginDividend,
}, md.OneCirclesRoutKeyForStarLevelDividend) }, md.OneCirclesRoutKeyForStarLevelDividend)


totalDividendValue = totalDividendValue.Add(siginDividendValue) totalDividendValue = totalDividendValue.Add(siginDividendValue)


Loading…
Cancel
Save