...
|
...
|
@@ -169,7 +169,7 @@ func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageRequest, msgType doma |
|
|
CreatedAt: item.CreatedAt,
|
|
|
}
|
|
|
|
|
|
if v, ok := userIdMap[item.UserId]; ok {
|
|
|
if v, ok := userIdMap[item.UserId]; ok && v != nil {
|
|
|
to.User = &types.SimpleUser{
|
|
|
Id: v.Id,
|
|
|
CompanyId: v.CompanyId,
|
...
|
...
|
@@ -178,12 +178,12 @@ func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageRequest, msgType doma |
|
|
Avatar: v.Avatar,
|
|
|
}
|
|
|
|
|
|
if v, ok := companyIdMap[item.CompanyId]; ok {
|
|
|
if v, ok := companyIdMap[item.CompanyId]; ok && v != nil {
|
|
|
to.User.CompanyName = v.Name
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if v, ok := articleIdMap[item.ArticleId]; ok {
|
|
|
if v, ok := articleIdMap[item.ArticleId]; ok && v != nil {
|
|
|
to.Article = &types.SimpleArticle{
|
|
|
Id: v.Id,
|
|
|
Title: v.Title,
|
...
|
...
|
@@ -193,7 +193,7 @@ func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageRequest, msgType doma |
|
|
}
|
|
|
}
|
|
|
|
|
|
if v, ok := commentIdMap[item.CommentId]; ok {
|
|
|
if v, ok := commentIdMap[item.CommentId]; ok && v != nil {
|
|
|
to.Comment = &types.SimpleComment{
|
|
|
Id: v.Id,
|
|
|
Content: v.Content,
|
...
|
...
|
|