正在显示
3 个修改的文件
包含
6 行增加
和
1 行删除
| @@ -279,7 +279,8 @@ type MsgChanceApproveItemOrm struct { | @@ -279,7 +279,8 @@ type MsgChanceApproveItemOrm struct { | ||
| 279 | IsRead int64 `orm:"column(is_read)"` | 279 | IsRead int64 `orm:"column(is_read)"` |
| 280 | ChanceId int64 `orm:"column(chance_id)"` // 机会id | 280 | ChanceId int64 `orm:"column(chance_id)"` // 机会id |
| 281 | //EnableStatus int `orm:"column(enable_status)"` | 281 | //EnableStatus int `orm:"column(enable_status)"` |
| 282 | - Data string `orm:"column(data)"` | 282 | + SourceId int64 `orm:"column(source_id)"` // 机会id |
| 283 | + Data string `orm:"column(data)"` | ||
| 283 | } | 284 | } |
| 284 | 285 | ||
| 285 | /*Announcement H5公告详情*/ | 286 | /*Announcement H5公告详情*/ |
| @@ -145,6 +145,7 @@ func SendApproveMsgByFormat(header *protocol.RequestHeader, receiverId int64, ch | @@ -145,6 +145,7 @@ func SendApproveMsgByFormat(header *protocol.RequestHeader, receiverId int64, ch | ||
| 145 | CreateAt: time.Now(), | 145 | CreateAt: time.Now(), |
| 146 | Data: common.AssertJson(data), | 146 | Data: common.AssertJson(data), |
| 147 | SenderUserId: header.UserId, | 147 | SenderUserId: header.UserId, |
| 148 | + ChanceId: chanceId, | ||
| 148 | } | 149 | } |
| 149 | if _, err = models.AddUserMsg(userMsg); err != nil { | 150 | if _, err = models.AddUserMsg(userMsg); err != nil { |
| 150 | return | 151 | return |
| @@ -408,6 +408,9 @@ func MsgChanceSubmit(header *protocol.RequestHeader, request *protocol.MsgChance | @@ -408,6 +408,9 @@ func MsgChanceSubmit(header *protocol.RequestHeader, request *protocol.MsgChance | ||
| 408 | commItem.MsgTime = chance.MsgTime.Unix() * 1000 | 408 | commItem.MsgTime = chance.MsgTime.Unix() * 1000 |
| 409 | commItem.ChanceId = chance.ChanceId | 409 | commItem.ChanceId = chance.ChanceId |
| 410 | rsp.List = append(rsp.List, commItem) | 410 | rsp.List = append(rsp.List, commItem) |
| 411 | + if commItem.ChanceId == 0 && chance.SourceId > 0 { | ||
| 412 | + commItem.ChanceId = chance.SourceId | ||
| 413 | + } | ||
| 411 | } | 414 | } |
| 412 | return | 415 | return |
| 413 | } | 416 | } |
-
请 注册 或 登录 后发表评论