Browse Source

加入公排mq

master
huangjiajun 1 week ago
parent
commit
4bf1ffdb67
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      app/hdl/hdl_user.go

+ 2
- 2
app/hdl/hdl_user.go View File

@@ -188,7 +188,7 @@ func UserBindParent(c *gin.Context) {
// 插入多级关联
go svc.RoutineMultiRelate(ur.ParentUid, ur.Uid, initLV)
//TODO 绑定成功后 加群之类的怎么处理
if user.ParentUid > 0 {
if ownUser.ParentUid > 0 {
//TODO::推入mq异步处理
ch, err := rabbit.Cfg.Pool.GetChannel()
if err != nil {
@@ -196,7 +196,7 @@ func UserBindParent(c *gin.Context) {
return
}
defer ch.Release()
ch.Publish(md4.EggAppExchange, utils.SerializeStr(md4.AddPublicPlatoonUserRelationCommissionReq{RecommendUid: utils.Int64ToStr(user.ParentUid), Uid: utils.Int64ToStr(user.Id)}), md4.EggRoutKeyForAddPublicPlatoonUserRelationCommission)
ch.Publish(md4.EggAppExchange, utils.SerializeStr(md4.AddPublicPlatoonUserRelationCommissionReq{RecommendUid: utils.Int64ToStr(ownUser.ParentUid), Uid: utils.Int64ToStr(ownUser.Id)}), md4.EggRoutKeyForAddPublicPlatoonUserRelationCommission)
}
e.OutSuc(c, "success", nil)
return


Loading…
Cancel
Save