...
|
...
|
@@ -215,7 +215,7 @@ func MsgChanceApprove(header *protocol.RequestHeader, request *protocol.MsgChanc |
|
|
rsp = &protocol.MsgChanceApproveResponse{Total: total}
|
|
|
for i := 0; i < len(myChances); i++ {
|
|
|
chance := myChances[i]
|
|
|
commItem := protocol.CommonListItem{}
|
|
|
commItem := protocol.MsgCommonListItem{}
|
|
|
commItem.ReviewStatus = chance.ReviewStatus
|
|
|
if len(chance.SourceContent) == 0 { //机会删除
|
|
|
commItem.ChanceStatus = protocol.ChanceStatusDelete
|
...
|
...
|
@@ -250,6 +250,7 @@ func MsgChanceApprove(header *protocol.RequestHeader, request *protocol.MsgChanc |
|
|
}
|
|
|
//审核完有审核数据
|
|
|
commItem.Message = chance.Message
|
|
|
commItem.IsRead = chance.IsRead == 1
|
|
|
rsp.List = append(rsp.List, commItem)
|
|
|
}
|
|
|
return
|
...
|
...
|
@@ -273,7 +274,7 @@ func MsgChanceSubmit(header *protocol.RequestHeader, request *protocol.MsgChance |
|
|
rsp = &protocol.MsgChanceSubmitResponse{Total: total}
|
|
|
for i := 0; i < len(myChances); i++ {
|
|
|
chance := myChances[i]
|
|
|
commItem := protocol.CommonListItem{}
|
|
|
commItem := protocol.MsgCommonListItem{}
|
|
|
commItem.ReviewStatus = chance.ReviewStatus
|
|
|
if len(chance.SourceContent) == 0 { //机会删除
|
|
|
commItem.ChanceStatus = protocol.ChanceStatusDelete
|
...
|
...
|
@@ -306,6 +307,7 @@ func MsgChanceSubmit(header *protocol.RequestHeader, request *protocol.MsgChance |
|
|
commItem.Score = approveData.Score
|
|
|
}
|
|
|
}
|
|
|
commItem.IsRead = chance.IsRead == 1
|
|
|
//审核完有审核数据
|
|
|
commItem.Message = chance.Message
|
|
|
rsp.List = append(rsp.List, commItem)
|
...
|
...
|
@@ -331,7 +333,7 @@ func MsgChanceComment(header *protocol.RequestHeader, request *protocol.MsgChanc |
|
|
rsp = &protocol.MsgChanceCommentResponse{Total: total}
|
|
|
for i := 0; i < len(myChances); i++ {
|
|
|
chance := myChances[i]
|
|
|
commItem := protocol.CommonListItem{}
|
|
|
commItem := protocol.MsgCommonListItem{}
|
|
|
if chance.SourceType == protocol.SourceTypeChance {
|
|
|
commItem.ReviewStatus = chance.ReviewStatus
|
|
|
if len(chance.SourceContent) == 0 { //机会删除
|
...
|
...
|
@@ -360,18 +362,24 @@ func MsgChanceComment(header *protocol.RequestHeader, request *protocol.MsgChanc |
|
|
commItem.ReviewStatus = chance.ReviewStatus
|
|
|
}
|
|
|
if chance.SourceType == protocol.SourceTypeComment {
|
|
|
if provider, err = agg.GetUserBaseInfo(chance.CommentedUserId, header.CompanyId); err != nil {
|
|
|
commItem.ChanceStatus = protocol.ChanceStatusDelete
|
|
|
log.Error(err)
|
|
|
//return
|
|
|
}
|
|
|
commItem.CommentedData = protocol.CommentData{
|
|
|
Id: chance.SourceId,
|
|
|
Content: chance.CommentedContent,
|
|
|
CommentTime: chance.CommentedTime.Unix() * 1000,
|
|
|
Provider: provider,
|
|
|
}
|
|
|
}
|
|
|
commItem.CommentData = protocol.CommentData{
|
|
|
Id: chance.CommentId,
|
|
|
CommentTime: chance.CommentTime.Unix() * 1000,
|
|
|
Content: chance.CommentContent,
|
|
|
IsRead: chance.IsRead == 1,
|
|
|
}
|
|
|
commItem.IsRead = chance.IsRead == 1
|
|
|
commItem.SourceType = chance.SourceType
|
|
|
rsp.List = append(rsp.List, commItem)
|
|
|
}
|
...
|
...
|
@@ -396,7 +404,7 @@ func MsgChanceThumbUp(header *protocol.RequestHeader, request *protocol.MsgChanc |
|
|
rsp = &protocol.MsgChanceThumbUpResponse{Total: total}
|
|
|
for i := 0; i < len(myChances); i++ {
|
|
|
chance := myChances[i]
|
|
|
commItem := protocol.CommonListItem{}
|
|
|
commItem := protocol.MsgCommonListItem{}
|
|
|
if chance.SourceType == protocol.SourceTypeChance {
|
|
|
commItem.ReviewStatus = chance.ReviewStatus
|
|
|
if len(chance.SourceContent) == 0 { //机会删除
|
...
|
...
|
@@ -425,18 +433,24 @@ func MsgChanceThumbUp(header *protocol.RequestHeader, request *protocol.MsgChanc |
|
|
commItem.ReviewStatus = chance.ReviewStatus
|
|
|
}
|
|
|
if chance.SourceType == protocol.SourceTypeComment {
|
|
|
if provider, err = agg.GetUserBaseInfo(chance.CommentedUserId, header.CompanyId); err != nil {
|
|
|
commItem.ChanceStatus = protocol.ChanceStatusDelete
|
|
|
log.Error(err)
|
|
|
//return
|
|
|
}
|
|
|
commItem.CommentedData = protocol.CommentData{
|
|
|
Id: chance.SourceId,
|
|
|
Content: chance.CommentedContent,
|
|
|
CommentTime: chance.CommentedTime.Unix() * 1000,
|
|
|
Provider: provider,
|
|
|
}
|
|
|
}
|
|
|
commItem.ThumbUpData = protocol.ThumbUpData{
|
|
|
Id: chance.CommentId,
|
|
|
ThumbUpTime: chance.CommentTime.Unix() * 1000,
|
|
|
Content: chance.CommentContent,
|
|
|
IsRead: chance.IsRead == 1,
|
|
|
}
|
|
|
commItem.IsRead = chance.IsRead == 1
|
|
|
commItem.SourceType = chance.SourceType
|
|
|
rsp.List = append(rsp.List, commItem)
|
|
|
}
|
...
|
...
|
|