|
@@ -778,12 +778,9 @@ func CheckChanceDifferent(header *protocol.RequestHeader, chance *models.Chance, |
|
@@ -778,12 +778,9 @@ func CheckChanceDifferent(header *protocol.RequestHeader, chance *models.Chance, |
778
|
jsonUnmarshal(chanceData.Speechs, &speechs)
|
778
|
jsonUnmarshal(chanceData.Speechs, &speechs)
|
779
|
jsonUnmarshal(chanceData.Images, &pictures)
|
779
|
jsonUnmarshal(chanceData.Images, &pictures)
|
780
|
jsonUnmarshal(chanceData.Videos, &videos)
|
780
|
jsonUnmarshal(chanceData.Videos, &videos)
|
781
|
- if !reflect.DeepEqual(request.Videos, videos) {
|
781
|
+ if !reflect.DeepEqual(request.Videos, videos) || !reflect.DeepEqual(request.Pictures, pictures) {
|
782
|
checkIsSaveLog()
|
782
|
checkIsSaveLog()
|
783
|
modifyLog.Videos = request.Videos
|
783
|
modifyLog.Videos = request.Videos
|
784
|
- }
|
|
|
785
|
- if !reflect.DeepEqual(request.Pictures, pictures) {
|
|
|
786
|
- checkIsSaveLog()
|
|
|
787
|
modifyLog.Pictures = request.Pictures
|
784
|
modifyLog.Pictures = request.Pictures
|
788
|
}
|
785
|
}
|
789
|
if !reflect.DeepEqual(request.Speechs, speechs) {
|
786
|
if !reflect.DeepEqual(request.Speechs, speechs) {
|
|
@@ -794,13 +791,12 @@ func CheckChanceDifferent(header *protocol.RequestHeader, chance *models.Chance, |
|
@@ -794,13 +791,12 @@ func CheckChanceDifferent(header *protocol.RequestHeader, chance *models.Chance, |
794
|
if (len(videos) > 0 && len(request.Videos) == 0) && len(pictures) > 0 && len(request.Pictures) == 0 {
|
791
|
if (len(videos) > 0 && len(request.Videos) == 0) && len(pictures) > 0 && len(request.Pictures) == 0 {
|
795
|
modifyLog.RemoveAllPhotoVideo = true
|
792
|
modifyLog.RemoveAllPhotoVideo = true
|
796
|
}
|
793
|
}
|
797
|
- if (len(videos) > 0 && len(request.Videos) == 0) && len(pictures) == 0 && len(request.Pictures) == 0 {
|
794
|
+ if (len(videos) > 0 && len(request.Videos) == 0) && len(pictures) == len(request.Pictures) {
|
798
|
modifyLog.RemoveAllPhotoVideo = true
|
795
|
modifyLog.RemoveAllPhotoVideo = true
|
799
|
}
|
796
|
}
|
800
|
- if (len(videos) == 0 && len(request.Videos) == 0) && len(pictures) > 0 && len(request.Pictures) == 0 {
|
797
|
+ if (len(videos) == len(request.Videos)) && len(pictures) > 0 && len(request.Pictures) == 0 {
|
801
|
modifyLog.RemoveAllPhotoVideo = true
|
798
|
modifyLog.RemoveAllPhotoVideo = true
|
802
|
}
|
799
|
}
|
803
|
-
|
|
|
804
|
if len(speechs) > 0 && len(request.Speechs) == 0 {
|
800
|
if len(speechs) > 0 && len(request.Speechs) == 0 {
|
805
|
modifyLog.RemoveAllSpeech = true
|
801
|
modifyLog.RemoveAllSpeech = true
|
806
|
}
|
802
|
}
|