瀏覽代碼

加入公排mq

master
huangjiajun 1 周之前
父節點
當前提交
4bf1ffdb67
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      app/hdl/hdl_user.go

+ 2
- 2
app/hdl/hdl_user.go 查看文件

@@ -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…
取消
儲存