作者 yangfu

消息修改

@@ -21,6 +21,7 @@ type UserMsg struct { @@ -21,6 +21,7 @@ type UserMsg struct {
21 IsRead int8 `orm:"column(is_read)" description:"1:已读 0:未读"` 21 IsRead int8 `orm:"column(is_read)" description:"1:已读 0:未读"`
22 CreateAt time.Time `orm:"column(create_at);type(timestamp);auto_now" description:"创建时间"` 22 CreateAt time.Time `orm:"column(create_at);type(timestamp);auto_now" description:"创建时间"`
23 ChanceId int64 `orm:"column(chance_id)" description:"机会编号"` 23 ChanceId int64 `orm:"column(chance_id)" description:"机会编号"`
  24 + SenderUserId int64 `orm:"column(sender_user_id)" description:"发送人用户id"`
24 } 25 }
25 26
26 const ( 27 const (
@@ -206,7 +207,7 @@ func GetChanceCommentMsg(uid, lastId int64, pageSize int, msgType int, v interfa @@ -206,7 +207,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 ( 207 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 ( 208 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 ( 209 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,receive_user_id from user_msg 210 +select id,message content,source_type,source_id,is_read,create_at comment_time,chance_id,receive_user_id,sender_user_id from user_msg
210 where receive_user_id =? and (?=0 or id<?) and msg_type=? 211 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 212 )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 213 )a left outer join chance_data b on a.source_id = b.chance_id and source_type = 1
@@ -365,6 +365,7 @@ type ChanceCommentItemOrm struct { @@ -365,6 +365,7 @@ type ChanceCommentItemOrm struct {
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 ReceiveUserId int64 `orm:"column(receive_user_id)"`
  368 + SenderUserId int64 `orm:"column(sender_user_id)"`
368 } 369 }
369 370
370 /*ChanceDetail 机会详情*/ 371 /*ChanceDetail 机会详情*/