...
|
...
|
@@ -21,6 +21,7 @@ type UserMsg struct { |
|
|
IsRead int8 `orm:"column(is_read)" description:"1:已读 0:未读"`
|
|
|
CreateAt time.Time `orm:"column(create_at);type(timestamp);auto_now" description:"创建时间"`
|
|
|
ChanceId int64 `orm:"column(chance_id)" description:"机会编号"`
|
|
|
SenderUserId int64 `orm:"column(sender_user_id)" description:"发送人用户id"`
|
|
|
}
|
|
|
|
|
|
const (
|
...
|
...
|
@@ -206,7 +207,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,receive_user_id from user_msg
|
|
|
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
|
|
|
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
|
...
|
...
|
|