作者 yangfu

消息修改

... ... @@ -206,7 +206,7 @@ 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,is_read,create_at comment_time,chance_id from user_msg
select id,message content,source_type,source_id,is_read,create_at comment_time,chance_id,receive_user_id 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
... ...
... ... @@ -361,9 +361,10 @@ type ChanceCommentItemOrm struct {
CommentedTime time.Time `orm:"column(commented_time)"` //收藏时间
//评论对象类型
SourceType int `orm:"column(source_type)"`
SourceId int64 `orm:"column(source_id)"`
IsRead int64 `orm:"column(is_read)"`
SourceType int `orm:"column(source_type)"`
SourceId int64 `orm:"column(source_id)"`
IsRead int64 `orm:"column(is_read)"`
ReceiveUserId int64 `orm:"column(receive_user_id)"`
}
/*ChanceDetail 机会详情*/
... ... @@ -595,10 +596,10 @@ type CollectData struct {
//点赞数据
type ThumbUpData struct {
Id int64 `json:"id"`
Content string `json:"content"` //点赞内容
ThumbUpTime int64 `json:"thumbUpTime"` //收藏时间
//IsRead bool `json:"is_read"` //是否已读
Id int64 `json:"id"`
Content string `json:"content"` //点赞内容
ThumbUpTime int64 `json:"thumbUpTime"` //收藏时间
Provider interface{} `json:"provider,omitempty"`
}
//评论内容
... ...
... ... @@ -425,11 +425,13 @@ func MsgChanceComment(header *protocol.RequestHeader, request *protocol.MsgChanc
Provider: provider,
}
}
commItem.CommentData = protocol.CommentData{
comment := protocol.CommentData{
Id: chance.CommentId,
CommentTime: chance.CommentTime.Unix() * 1000,
Content: chance.CommentContent,
}
comment.Provider, _ = agg.GetUserBaseInfo(chance.ReceiveUserId, header.CompanyId)
commItem.CommentData = comment
commItem.IsRead = chance.IsRead == 1
commItem.SourceType = chance.SourceType
commItem.MsgId = chance.CommentId
... ... @@ -500,11 +502,16 @@ func MsgChanceThumbUp(header *protocol.RequestHeader, request *protocol.MsgChanc
Provider: provider,
}
}
commItem.ThumbUpData = protocol.ThumbUpData{
if provider, _ = agg.GetUserBaseInfo(chance.Uid, header.CompanyId); err != nil {
}
thumb := protocol.ThumbUpData{
Id: chance.CommentId,
ThumbUpTime: chance.CommentTime.Unix() * 1000,
Content: chance.CommentContent,
}
thumb.Provider, _ = agg.GetUserBaseInfo(chance.ReceiveUserId, header.CompanyId)
commItem.ThumbUpData = thumb
commItem.IsRead = chance.IsRead == 1
commItem.SourceType = chance.SourceType
commItem.MsgId = chance.CommentId
... ...