duxin 3 жил өмнө
parent
commit
aad9fb0300

+ 5 - 3
rpc/consumer/internal/logic/publishinfologic.go

@@ -83,7 +83,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
 	}
 
@@ -107,7 +107,9 @@ func (l *PublishInfoLogic) PublishInfo(in *consumerinfo.PublishInfoReq) (*consum
 		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
 }