|
@@ -215,7 +215,7 @@ func MsgChanceApprove(header *protocol.RequestHeader, request *protocol.MsgChanc |
|
@@ -215,7 +215,7 @@ func MsgChanceApprove(header *protocol.RequestHeader, request *protocol.MsgChanc |
215
|
rsp = &protocol.MsgChanceApproveResponse{Total: total}
|
215
|
rsp = &protocol.MsgChanceApproveResponse{Total: total}
|
216
|
for i := 0; i < len(myChances); i++ {
|
216
|
for i := 0; i < len(myChances); i++ {
|
217
|
chance := myChances[i]
|
217
|
chance := myChances[i]
|
218
|
- commItem := protocol.CommonListItem{}
|
218
|
+ commItem := protocol.MsgCommonListItem{}
|
219
|
commItem.ReviewStatus = chance.ReviewStatus
|
219
|
commItem.ReviewStatus = chance.ReviewStatus
|
220
|
if len(chance.SourceContent) == 0 { //机会删除
|
220
|
if len(chance.SourceContent) == 0 { //机会删除
|
221
|
commItem.ChanceStatus = protocol.ChanceStatusDelete
|
221
|
commItem.ChanceStatus = protocol.ChanceStatusDelete
|
|
@@ -250,6 +250,7 @@ func MsgChanceApprove(header *protocol.RequestHeader, request *protocol.MsgChanc |
|
@@ -250,6 +250,7 @@ func MsgChanceApprove(header *protocol.RequestHeader, request *protocol.MsgChanc |
250
|
}
|
250
|
}
|
251
|
//审核完有审核数据
|
251
|
//审核完有审核数据
|
252
|
commItem.Message = chance.Message
|
252
|
commItem.Message = chance.Message
|
|
|
253
|
+ commItem.IsRead = chance.IsRead == 1
|
253
|
rsp.List = append(rsp.List, commItem)
|
254
|
rsp.List = append(rsp.List, commItem)
|
254
|
}
|
255
|
}
|
255
|
return
|
256
|
return
|
|
@@ -273,7 +274,7 @@ func MsgChanceSubmit(header *protocol.RequestHeader, request *protocol.MsgChance |
|
@@ -273,7 +274,7 @@ func MsgChanceSubmit(header *protocol.RequestHeader, request *protocol.MsgChance |
273
|
rsp = &protocol.MsgChanceSubmitResponse{Total: total}
|
274
|
rsp = &protocol.MsgChanceSubmitResponse{Total: total}
|
274
|
for i := 0; i < len(myChances); i++ {
|
275
|
for i := 0; i < len(myChances); i++ {
|
275
|
chance := myChances[i]
|
276
|
chance := myChances[i]
|
276
|
- commItem := protocol.CommonListItem{}
|
277
|
+ commItem := protocol.MsgCommonListItem{}
|
277
|
commItem.ReviewStatus = chance.ReviewStatus
|
278
|
commItem.ReviewStatus = chance.ReviewStatus
|
278
|
if len(chance.SourceContent) == 0 { //机会删除
|
279
|
if len(chance.SourceContent) == 0 { //机会删除
|
279
|
commItem.ChanceStatus = protocol.ChanceStatusDelete
|
280
|
commItem.ChanceStatus = protocol.ChanceStatusDelete
|
|
@@ -306,6 +307,7 @@ func MsgChanceSubmit(header *protocol.RequestHeader, request *protocol.MsgChance |
|
@@ -306,6 +307,7 @@ func MsgChanceSubmit(header *protocol.RequestHeader, request *protocol.MsgChance |
306
|
commItem.Score = approveData.Score
|
307
|
commItem.Score = approveData.Score
|
307
|
}
|
308
|
}
|
308
|
}
|
309
|
}
|
|
|
310
|
+ commItem.IsRead = chance.IsRead == 1
|
309
|
//审核完有审核数据
|
311
|
//审核完有审核数据
|
310
|
commItem.Message = chance.Message
|
312
|
commItem.Message = chance.Message
|
311
|
rsp.List = append(rsp.List, commItem)
|
313
|
rsp.List = append(rsp.List, commItem)
|
|
@@ -331,7 +333,7 @@ func MsgChanceComment(header *protocol.RequestHeader, request *protocol.MsgChanc |
|
@@ -331,7 +333,7 @@ func MsgChanceComment(header *protocol.RequestHeader, request *protocol.MsgChanc |
331
|
rsp = &protocol.MsgChanceCommentResponse{Total: total}
|
333
|
rsp = &protocol.MsgChanceCommentResponse{Total: total}
|
332
|
for i := 0; i < len(myChances); i++ {
|
334
|
for i := 0; i < len(myChances); i++ {
|
333
|
chance := myChances[i]
|
335
|
chance := myChances[i]
|
334
|
- commItem := protocol.CommonListItem{}
|
336
|
+ commItem := protocol.MsgCommonListItem{}
|
335
|
if chance.SourceType == protocol.SourceTypeChance {
|
337
|
if chance.SourceType == protocol.SourceTypeChance {
|
336
|
commItem.ReviewStatus = chance.ReviewStatus
|
338
|
commItem.ReviewStatus = chance.ReviewStatus
|
337
|
if len(chance.SourceContent) == 0 { //机会删除
|
339
|
if len(chance.SourceContent) == 0 { //机会删除
|
|
@@ -360,18 +362,24 @@ func MsgChanceComment(header *protocol.RequestHeader, request *protocol.MsgChanc |
|
@@ -360,18 +362,24 @@ func MsgChanceComment(header *protocol.RequestHeader, request *protocol.MsgChanc |
360
|
commItem.ReviewStatus = chance.ReviewStatus
|
362
|
commItem.ReviewStatus = chance.ReviewStatus
|
361
|
}
|
363
|
}
|
362
|
if chance.SourceType == protocol.SourceTypeComment {
|
364
|
if chance.SourceType == protocol.SourceTypeComment {
|
|
|
365
|
+ if provider, err = agg.GetUserBaseInfo(chance.CommentedUserId, header.CompanyId); err != nil {
|
|
|
366
|
+ commItem.ChanceStatus = protocol.ChanceStatusDelete
|
|
|
367
|
+ log.Error(err)
|
|
|
368
|
+ //return
|
|
|
369
|
+ }
|
363
|
commItem.CommentedData = protocol.CommentData{
|
370
|
commItem.CommentedData = protocol.CommentData{
|
364
|
Id: chance.SourceId,
|
371
|
Id: chance.SourceId,
|
365
|
Content: chance.CommentedContent,
|
372
|
Content: chance.CommentedContent,
|
366
|
CommentTime: chance.CommentedTime.Unix() * 1000,
|
373
|
CommentTime: chance.CommentedTime.Unix() * 1000,
|
|
|
374
|
+ Provider: provider,
|
367
|
}
|
375
|
}
|
368
|
}
|
376
|
}
|
369
|
commItem.CommentData = protocol.CommentData{
|
377
|
commItem.CommentData = protocol.CommentData{
|
370
|
Id: chance.CommentId,
|
378
|
Id: chance.CommentId,
|
371
|
CommentTime: chance.CommentTime.Unix() * 1000,
|
379
|
CommentTime: chance.CommentTime.Unix() * 1000,
|
372
|
Content: chance.CommentContent,
|
380
|
Content: chance.CommentContent,
|
373
|
- IsRead: chance.IsRead == 1,
|
|
|
374
|
}
|
381
|
}
|
|
|
382
|
+ commItem.IsRead = chance.IsRead == 1
|
375
|
commItem.SourceType = chance.SourceType
|
383
|
commItem.SourceType = chance.SourceType
|
376
|
rsp.List = append(rsp.List, commItem)
|
384
|
rsp.List = append(rsp.List, commItem)
|
377
|
}
|
385
|
}
|
|
@@ -396,7 +404,7 @@ func MsgChanceThumbUp(header *protocol.RequestHeader, request *protocol.MsgChanc |
|
@@ -396,7 +404,7 @@ func MsgChanceThumbUp(header *protocol.RequestHeader, request *protocol.MsgChanc |
396
|
rsp = &protocol.MsgChanceThumbUpResponse{Total: total}
|
404
|
rsp = &protocol.MsgChanceThumbUpResponse{Total: total}
|
397
|
for i := 0; i < len(myChances); i++ {
|
405
|
for i := 0; i < len(myChances); i++ {
|
398
|
chance := myChances[i]
|
406
|
chance := myChances[i]
|
399
|
- commItem := protocol.CommonListItem{}
|
407
|
+ commItem := protocol.MsgCommonListItem{}
|
400
|
if chance.SourceType == protocol.SourceTypeChance {
|
408
|
if chance.SourceType == protocol.SourceTypeChance {
|
401
|
commItem.ReviewStatus = chance.ReviewStatus
|
409
|
commItem.ReviewStatus = chance.ReviewStatus
|
402
|
if len(chance.SourceContent) == 0 { //机会删除
|
410
|
if len(chance.SourceContent) == 0 { //机会删除
|
|
@@ -425,18 +433,24 @@ func MsgChanceThumbUp(header *protocol.RequestHeader, request *protocol.MsgChanc |
|
@@ -425,18 +433,24 @@ func MsgChanceThumbUp(header *protocol.RequestHeader, request *protocol.MsgChanc |
425
|
commItem.ReviewStatus = chance.ReviewStatus
|
433
|
commItem.ReviewStatus = chance.ReviewStatus
|
426
|
}
|
434
|
}
|
427
|
if chance.SourceType == protocol.SourceTypeComment {
|
435
|
if chance.SourceType == protocol.SourceTypeComment {
|
|
|
436
|
+ if provider, err = agg.GetUserBaseInfo(chance.CommentedUserId, header.CompanyId); err != nil {
|
|
|
437
|
+ commItem.ChanceStatus = protocol.ChanceStatusDelete
|
|
|
438
|
+ log.Error(err)
|
|
|
439
|
+ //return
|
|
|
440
|
+ }
|
428
|
commItem.CommentedData = protocol.CommentData{
|
441
|
commItem.CommentedData = protocol.CommentData{
|
429
|
Id: chance.SourceId,
|
442
|
Id: chance.SourceId,
|
430
|
Content: chance.CommentedContent,
|
443
|
Content: chance.CommentedContent,
|
431
|
CommentTime: chance.CommentedTime.Unix() * 1000,
|
444
|
CommentTime: chance.CommentedTime.Unix() * 1000,
|
|
|
445
|
+ Provider: provider,
|
432
|
}
|
446
|
}
|
433
|
}
|
447
|
}
|
434
|
commItem.ThumbUpData = protocol.ThumbUpData{
|
448
|
commItem.ThumbUpData = protocol.ThumbUpData{
|
435
|
Id: chance.CommentId,
|
449
|
Id: chance.CommentId,
|
436
|
ThumbUpTime: chance.CommentTime.Unix() * 1000,
|
450
|
ThumbUpTime: chance.CommentTime.Unix() * 1000,
|
437
|
Content: chance.CommentContent,
|
451
|
Content: chance.CommentContent,
|
438
|
- IsRead: chance.IsRead == 1,
|
|
|
439
|
}
|
452
|
}
|
|
|
453
|
+ commItem.IsRead = chance.IsRead == 1
|
440
|
commItem.SourceType = chance.SourceType
|
454
|
commItem.SourceType = chance.SourceType
|
441
|
rsp.List = append(rsp.List, commItem)
|
455
|
rsp.List = append(rsp.List, commItem)
|
442
|
}
|
456
|
}
|