作者 yangfu

点赞修改

... ... @@ -205,12 +205,12 @@ func GetChanceCommentMsg(uid, lastId int64, pageSize int, msgType int, v interfa
sql := `select a.*,b.content commented_content,b.create_at commented_time,b.user_id commented_user_id from (
select a.*,b.images,b.speechs,b.videos from (
select a.*,b.source_content,b.enable_status,b.user_id chance_user_id,b.create_at,b.review_status from (
select id,message content,source_type,source_id,create_at comment_time from user_msg
select id,message content,source_type,source_id,is_read,create_at comment_time from user_msg
where receive_user_id =? and (?=0 or id<?) and msg_type=?
)a left outer join chance b on a.source_id = b.id and source_type=1
)a left outer join chance_data b on a.source_id = b.chance_id and source_type = 1
)a left outer join comment b on a.source_id = b.id and a.source_type=2
order by create_at desc
order by a.create_at desc
LIMIT ?`
sqlCount := `select count(0)
... ...
... ... @@ -354,6 +354,7 @@ type ChanceCommentItemOrm struct {
//评论对象类型
SourceType int `orm:"column(source_type)"`
SourceId int64 `orm:"column(source_id)"`
IsRead int64 `orm:"column(is_read)"`
}
/*ChanceDetail 机会详情*/
... ...
... ... @@ -370,6 +370,7 @@ func MsgChanceComment(header *protocol.RequestHeader, request *protocol.MsgChanc
Id: chance.CommentId,
CommentTime: chance.CommentTime.Unix() * 1000,
Content: chance.CommentContent,
IsRead: chance.IsRead == 1,
}
commItem.SourceType = chance.SourceType
rsp.List = append(rsp.List, commItem)
... ... @@ -434,6 +435,7 @@ func MsgChanceThumbUp(header *protocol.RequestHeader, request *protocol.MsgChanc
Id: chance.CommentId,
ThumbUpTime: chance.CommentTime.Unix() * 1000,
Content: chance.CommentContent,
IsRead: chance.IsRead == 1,
}
commItem.SourceType = chance.SourceType
rsp.List = append(rsp.List, commItem)
... ...