正在显示
3 个修改的文件
包含
12 行增加
和
4 行删除
@@ -206,7 +206,7 @@ func GetChanceCommentMsg(uid, lastId int64, pageSize int, msgType int, v interfa | @@ -206,7 +206,7 @@ func GetChanceCommentMsg(uid, lastId int64, pageSize int, msgType int, v interfa | ||
206 | sql := `select a.*,b.content commented_content,b.create_at commented_time,b.user_id commented_user_id from ( | 206 | sql := `select a.*,b.content commented_content,b.create_at commented_time,b.user_id commented_user_id from ( |
207 | select a.*,b.images,b.speechs,b.videos from ( | 207 | select a.*,b.images,b.speechs,b.videos from ( |
208 | select a.*,b.source_content,b.enable_status,b.user_id chance_user_id,b.create_at,b.review_status from ( | 208 | select a.*,b.source_content,b.enable_status,b.user_id chance_user_id,b.create_at,b.review_status from ( |
209 | -select id,message content,source_type,source_id,is_read,create_at comment_time,chance_id from user_msg | 209 | +select id,message content,source_type,source_id,is_read,create_at comment_time,chance_id,receive_user_id from user_msg |
210 | where receive_user_id =? and (?=0 or id<?) and msg_type=? | 210 | where receive_user_id =? and (?=0 or id<?) and msg_type=? |
211 | )a left outer join chance b on a.source_id = b.id and source_type=1 | 211 | )a left outer join chance b on a.source_id = b.id and source_type=1 |
212 | )a left outer join chance_data b on a.source_id = b.chance_id and source_type = 1 | 212 | )a left outer join chance_data b on a.source_id = b.chance_id and source_type = 1 |
@@ -364,6 +364,7 @@ type ChanceCommentItemOrm struct { | @@ -364,6 +364,7 @@ type ChanceCommentItemOrm struct { | ||
364 | SourceType int `orm:"column(source_type)"` | 364 | SourceType int `orm:"column(source_type)"` |
365 | SourceId int64 `orm:"column(source_id)"` | 365 | SourceId int64 `orm:"column(source_id)"` |
366 | IsRead int64 `orm:"column(is_read)"` | 366 | IsRead int64 `orm:"column(is_read)"` |
367 | + ReceiveUserId int64 `orm:"column(receive_user_id)"` | ||
367 | } | 368 | } |
368 | 369 | ||
369 | /*ChanceDetail 机会详情*/ | 370 | /*ChanceDetail 机会详情*/ |
@@ -598,7 +599,7 @@ type ThumbUpData struct { | @@ -598,7 +599,7 @@ type ThumbUpData struct { | ||
598 | Id int64 `json:"id"` | 599 | Id int64 `json:"id"` |
599 | Content string `json:"content"` //点赞内容 | 600 | Content string `json:"content"` //点赞内容 |
600 | ThumbUpTime int64 `json:"thumbUpTime"` //收藏时间 | 601 | ThumbUpTime int64 `json:"thumbUpTime"` //收藏时间 |
601 | - //IsRead bool `json:"is_read"` //是否已读 | 602 | + Provider interface{} `json:"provider,omitempty"` |
602 | } | 603 | } |
603 | 604 | ||
604 | //评论内容 | 605 | //评论内容 |
@@ -425,11 +425,13 @@ func MsgChanceComment(header *protocol.RequestHeader, request *protocol.MsgChanc | @@ -425,11 +425,13 @@ func MsgChanceComment(header *protocol.RequestHeader, request *protocol.MsgChanc | ||
425 | Provider: provider, | 425 | Provider: provider, |
426 | } | 426 | } |
427 | } | 427 | } |
428 | - commItem.CommentData = protocol.CommentData{ | 428 | + comment := protocol.CommentData{ |
429 | Id: chance.CommentId, | 429 | Id: chance.CommentId, |
430 | CommentTime: chance.CommentTime.Unix() * 1000, | 430 | CommentTime: chance.CommentTime.Unix() * 1000, |
431 | Content: chance.CommentContent, | 431 | Content: chance.CommentContent, |
432 | } | 432 | } |
433 | + comment.Provider, _ = agg.GetUserBaseInfo(chance.ReceiveUserId, header.CompanyId) | ||
434 | + commItem.CommentData = comment | ||
433 | commItem.IsRead = chance.IsRead == 1 | 435 | commItem.IsRead = chance.IsRead == 1 |
434 | commItem.SourceType = chance.SourceType | 436 | commItem.SourceType = chance.SourceType |
435 | commItem.MsgId = chance.CommentId | 437 | commItem.MsgId = chance.CommentId |
@@ -500,11 +502,16 @@ func MsgChanceThumbUp(header *protocol.RequestHeader, request *protocol.MsgChanc | @@ -500,11 +502,16 @@ func MsgChanceThumbUp(header *protocol.RequestHeader, request *protocol.MsgChanc | ||
500 | Provider: provider, | 502 | Provider: provider, |
501 | } | 503 | } |
502 | } | 504 | } |
503 | - commItem.ThumbUpData = protocol.ThumbUpData{ | 505 | + if provider, _ = agg.GetUserBaseInfo(chance.Uid, header.CompanyId); err != nil { |
506 | + | ||
507 | + } | ||
508 | + thumb := protocol.ThumbUpData{ | ||
504 | Id: chance.CommentId, | 509 | Id: chance.CommentId, |
505 | ThumbUpTime: chance.CommentTime.Unix() * 1000, | 510 | ThumbUpTime: chance.CommentTime.Unix() * 1000, |
506 | Content: chance.CommentContent, | 511 | Content: chance.CommentContent, |
507 | } | 512 | } |
513 | + thumb.Provider, _ = agg.GetUserBaseInfo(chance.ReceiveUserId, header.CompanyId) | ||
514 | + commItem.ThumbUpData = thumb | ||
508 | commItem.IsRead = chance.IsRead == 1 | 515 | commItem.IsRead = chance.IsRead == 1 |
509 | commItem.SourceType = chance.SourceType | 516 | commItem.SourceType = chance.SourceType |
510 | commItem.MsgId = chance.CommentId | 517 | commItem.MsgId = chance.CommentId |
-
请 注册 或 登录 后发表评论