|
@@ -82,7 +82,7 @@ func (l *PublishInfoLogic) PublishInfo(in *consumerinfo.PublishInfoReq) (*consum
|
|
|
}
|
|
|
if id < 1 {
|
|
|
res.ErrCode = -1
|
|
|
- res.ErrMsg = fmt.Sprintf("数据类型 %d 创建信息失败", in.MsgType)
|
|
|
+ res.ErrMsg = "信息发布失败"
|
|
|
return &res, nil
|
|
|
}
|
|
|
|
|
@@ -99,13 +99,16 @@ func (l *PublishInfoLogic) PublishInfo(in *consumerinfo.PublishInfoReq) (*consum
|
|
|
if in.Attach != "" && in.Attach != "{}" {
|
|
|
appendInfo["attach"] = mc.StringToMap(in.Attach)
|
|
|
}
|
|
|
+ log.Println("发送nsq敏感词信息", model.NsqConfig, appendInfo)
|
|
|
nsq, err := util.NewNsqInfo(model.NsqConfig.Ip, model.NsqConfig.Topic, mc.InterfaceToStr(id), "1", mc.InterfaceToStr(in.MsgType), false, appendInfo)
|
|
|
if err != nil || nsq.NsqPushInfo() != nil {
|
|
|
log.Println("信息发布失败nsq++++++++++++", model.NsqConfig, appendInfo)
|
|
|
res.ErrCode = -1
|
|
|
res.ErrMsg = fmt.Sprintf("信息发布失败")
|
|
|
}
|
|
|
- entNameKye := fmt.Sprintf("userEntName_%s_%d_%s", in.UserId, id, in.MsgType)
|
|
|
- redis.Put("other", entNameKye, in.EntName, 3*24*60*60)
|
|
|
+ if in.MsgType == 3 {
|
|
|
+ entNameKye := fmt.Sprintf("userEntName_%s_%d_%d", in.UserId, id, in.MsgType)
|
|
|
+ redis.Put("other", entNameKye, in.EntName, 3*24*60*60)
|
|
|
+ }
|
|
|
return &res, nil
|
|
|
}
|