shenjiachi před 1 týdnem
rodič
revize
9153e9a709
3 změnil soubory, kde provedl 10 přidání a 10 odebrání
  1. +6
    -6
      app/svc/im/svc_send_message.go
  2. +2
    -2
      app/task/svc/svc_egg_energy_deal_fund_data.go
  3. +2
    -2
      app/task/svc/svc_egg_energy_deal_platform_revenue_data.go

+ 6
- 6
app/svc/im/svc_send_message.go Zobrazit soubor

@@ -99,7 +99,7 @@ func DealGroupMessage(recordID int, req *md.BatchSendGroupMessageReq) {
Content: req.Content,
}
// 1.2 逐个推送到 mq
ch.Publish(md2.IMEggEnergyExchange, data, md2.IMEggEnergyRoutKeyForBatchSendMessageData)
ch.Publish(md2.IMEggEnergyExchange, utils.SerializeStr(data), md2.IMEggEnergyRoutKeyForBatchSendMessageData)
// 1.3 记录推送的群ID
groupIDs = append(groupIDs, utils.Int64ToStr(groupWithOwner.GroupID))
}
@@ -140,7 +140,7 @@ func DealGroupMessage(recordID int, req *md.BatchSendGroupMessageReq) {
Content: req.Content,
}
// 1.2 逐个推送到 mq
ch.Publish(md2.IMEggEnergyExchange, data, md2.IMEggEnergyRoutKeyForBatchSendMessageData)
ch.Publish(md2.IMEggEnergyExchange, utils.SerializeStr(data), md2.IMEggEnergyRoutKeyForBatchSendMessageData)
groupIDs = sendCondition
}
} else if len(notCondition) != 0 && len(sendCondition) == 0 {
@@ -163,7 +163,7 @@ func DealGroupMessage(recordID int, req *md.BatchSendGroupMessageReq) {
Content: req.Content,
}
// 1.2 逐个推送到 mq
ch.Publish(md2.IMEggEnergyExchange, data, md2.IMEggEnergyRoutKeyForBatchSendMessageData)
ch.Publish(md2.IMEggEnergyExchange, utils.SerializeStr(data), md2.IMEggEnergyRoutKeyForBatchSendMessageData)
// 1.3 记录推送的群ID
groupIDs = append(groupIDs, utils.Int64ToStr(groupUser.GroupId))
}
@@ -229,7 +229,7 @@ func DealUserMessage(recordID int, req *md.BatchSendUserMessageReq) {
Content: req.Content,
}
// 1.2 逐个推送到 mq
ch.Publish(md2.IMEggEnergyExchange, data, md2.IMEggEnergyRoutKeyForBatchSendMessageData)
ch.Publish(md2.IMEggEnergyExchange, utils.SerializeStr(data), md2.IMEggEnergyRoutKeyForBatchSendMessageData)
// 1.3 记录推送的用户IM ID
userIMIDs = append(userIMIDs, utils.Int64ToStr(customerServiceWithUser.UserIMID))
}
@@ -277,7 +277,7 @@ func DealUserMessage(recordID int, req *md.BatchSendUserMessageReq) {
Content: req.Content,
}
// 1.2 逐个推送到 mq
ch.Publish(md2.IMEggEnergyExchange, data, md2.IMEggEnergyRoutKeyForBatchSendMessageData)
ch.Publish(md2.IMEggEnergyExchange, utils.SerializeStr(data), md2.IMEggEnergyRoutKeyForBatchSendMessageData)
// 1.3 记录推送的群ID
userIMIDs = append(userIMIDs, utils.Int64ToStr(customerServiceWithUser.UserIMID))
}
@@ -335,7 +335,7 @@ func DealUserMessage(recordID int, req *md.BatchSendUserMessageReq) {
Content: req.Content,
}
// 1.2 逐个推送到 mq
ch.Publish(md2.IMEggEnergyExchange, data, md2.IMEggEnergyRoutKeyForBatchSendMessageData)
ch.Publish(md2.IMEggEnergyExchange, utils.SerializeStr(data), md2.IMEggEnergyRoutKeyForBatchSendMessageData)
// 1.3 记录推送的用户IM ID
userIMIDs = append(userIMIDs, utils.Int64ToStr(customerServiceWithUser.UserIMID))
}


+ 2
- 2
app/task/svc/svc_egg_energy_deal_fund_data.go Zobrazit soubor

@@ -79,9 +79,9 @@ func EggEnergyDealFundData(eg *xorm.Engine) {
amount := totalAmount.Div(times)

// 4、推入rabbitmq 异步处理
ch.Publish(md2.EggEnergyExchange, md2.EggEnergyStructForEggEnergyFundData{
ch.Publish(md2.EggEnergyExchange, utils.SerializeStr(md2.EggEnergyStructForEggEnergyFundData{
ID: data.Id,
Amount: amount.String(),
}, md2.EggEnergyRoutKeyForEggEnergyFundData)
}), md2.EggEnergyRoutKeyForEggEnergyFundData)
}
}

+ 2
- 2
app/task/svc/svc_egg_energy_deal_platform_revenue_data.go Zobrazit soubor

@@ -79,9 +79,9 @@ func EggEnergyDealPlatformRevenueData(eg *xorm.Engine) {
amount := totalAmount.Div(times)

// 4、推入rabbitmq 异步处理
ch.Publish(md2.EggEnergyExchange, md2.EggEnergyStructForPlatformRevenueData{
ch.Publish(md2.EggEnergyExchange, utils.SerializeStr(md2.EggEnergyStructForPlatformRevenueData{
ID: data.Id,
Amount: amount.String(),
}, md2.EggEnergyRoutKeyForPlatformRevenueData)
}), md2.EggEnergyRoutKeyForPlatformRevenueData)
}
}

Načítá se…
Zrušit
Uložit