浏览代码

update

master
shenjiachi 1周前
父节点
当前提交
9153e9a709
共有 3 个文件被更改,包括 10 次插入10 次删除
  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 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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)
}
}

正在加载...
取消
保存