Browse Source

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	go.mod
master
huangjiajun 1 week ago
parent
commit
42ee035f4e
2 changed files with 11 additions and 4 deletions
  1. +8
    -2
      consume/egg_energy_platform_revenue_data_consume.go
  2. +3
    -2
      consume/init.go

+ 8
- 2
consume/egg_energy_platform_revenue_data_consume.go View File

@@ -61,9 +61,15 @@ func EggEnergyDealPlatformRevenueDataConsume(queue md.MqQueue) {

func handleEggEnergyDealPlatformRevenueDataConsume(msgData []byte) error {
time.Sleep(time.Duration(100) * time.Millisecond) //休眠100毫秒
var msgStr string
err := json.Unmarshal(msgData, &msgStr)
if err != nil {
return err
}

// 1.解析mq中queue的数据结构体
var msg *md2.EggEnergyStructForPlatformRevenueData
err := json.Unmarshal(msgData, &msg)
err = json.Unmarshal([]byte(msgStr), &msg)
if err != nil {
return err
}
@@ -111,7 +117,7 @@ func handleEggEnergyDealPlatformRevenueDataConsume(msgData []byte) error {
BeforeEnergyTotalNums: calcPriceIncreaseFormulaResp.BeforeEnergyTotalNums,
AfterEnergyTotalNums: calcPriceIncreaseFormulaResp.AfterEnergyTotalNums,
}
err4 := egg_energy.DealAvailableEggEnergyCoin(session, int(enum.CapitalInjection), eggEnergyCoreData, dealAvailableEggEnergyCoinReq)
err4 := egg_energy.DealAvailableEggEnergyCoin(session, int(enum.PlatformProfitability), eggEnergyCoreData, dealAvailableEggEnergyCoinReq)
if err4 != nil {
fmt.Println("ActivityCoinAutoExchangeEggPersonEnergy:::::err111:::", err4)
_ = session.Rollback()


+ 3
- 2
consume/init.go View File

@@ -42,13 +42,14 @@ func initConsumes() {
jobs[consumeMd.EggEnergyDealFundDataFunName] = EggEnergyDealFundDataConsume // 资金数据
jobs[consumeMd.EggEnergyDealUserVirtualCoinDataFunName] = EggEnergyDealUserVirtualCoinDataConsume // 视频奖励给相应团队发放积分
jobs[consumeMd.EggRecordActiveDataFunName] = EggRecordActiveDataConsume // 用户签到后更新活跃数据
jobs[consumeMd.EggEnergyAutoScoreDataFunName] = EggEnergyAutoScoreConsume // 自动打分

jobs[consumeMd.PublicPlatoonUserRelationCommissionConsumeFunName] = AddPublicPlatoonUserRelationCommissionConsume
jobs[consumeMd.EggEnergyStartLevelDividendFunName] = EggEnergyStartLevelDividendConsume
jobs[consumeMd.EggEnergySettlementPublicGiveActivityCoinFunName] = EggEnergySettlementPublicGiveActivityCoinConsume
jobs[consumeMd.EggEnergyStartExchangeGreenEnergyFunName] = EggEnergyStartExchangeGreenEnergyConsume
jobs[consumeMd.EggEnergyAutoExchangeGreenEnergyFunName] = EggEnergyAutoExchangeGreenEnergyConsume
jobs[consumeMd.EggEnergyAutoScoreDataFunName] = EggEnergyAutoScoreConsume // 自动打分
jobs[consumeMd.PublicPlatoonUserRelationCommissionConsumeFunName] = AddPublicPlatoonUserRelationCommissionConsume // 公排
jobs[consumeMd.EggEnergyAutoScoreDataFunName] = EggEnergyAutoScoreConsume // 自动打分

}



Loading…
Cancel
Save