作者 yangfu

点赞修改

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