Pārlūkot izejas kodu

加入公排mq

tmp
huangjiajun pirms 2 nedēļām
vecāks
revīzija
4bf1ffdb67
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. +2
    -2
      app/hdl/hdl_user.go

+ 2
- 2
app/hdl/hdl_user.go Parādīt failu

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


Notiek ielāde…
Atcelt
Saglabāt