...
|
...
|
@@ -913,6 +913,27 @@ func CheckChanceDifferent(header *protocol.RequestHeader, chance *models.Chance, |
|
|
jsonUnmarshal(chanceData.Speechs, &speechs)
|
|
|
jsonUnmarshal(chanceData.Images, &pictures)
|
|
|
jsonUnmarshal(chanceData.Videos, &videos)
|
|
|
|
|
|
if len(speechs) == 0 {
|
|
|
speechs = make([]protocol.Speech, 0)
|
|
|
}
|
|
|
if len(pictures) == 0 {
|
|
|
pictures = make([]protocol.Picture, 0)
|
|
|
}
|
|
|
if len(videos) == 0 {
|
|
|
videos = make([]protocol.Video, 0)
|
|
|
}
|
|
|
|
|
|
if len(request.Speechs) == 0 {
|
|
|
request.Speechs = make([]protocol.Speech, 0)
|
|
|
}
|
|
|
if len(request.Pictures) == 0 {
|
|
|
request.Pictures = make([]protocol.Picture, 0)
|
|
|
}
|
|
|
if len(request.Videos) == 0 {
|
|
|
request.Videos = make([]protocol.Video, 0)
|
|
|
}
|
|
|
|
|
|
if !reflect.DeepEqual(request.Videos, videos) || !reflect.DeepEqual(request.Pictures, pictures) {
|
|
|
funcCheckSave()
|
|
|
modifyLog.Videos = request.Videos
|
...
|
...
|
@@ -960,6 +981,12 @@ func CheckChanceDifferent(header *protocol.RequestHeader, chance *models.Chance, |
|
|
funcDiffForms(chance.SourceContent, request.FormList) //比对表单
|
|
|
funcDiffChanceData() //比对机会数据
|
|
|
funcFormatEmpty() //格式化变更日志
|
|
|
//TODO:版本1.3.0以后不需要判断视频/图片 下版本移除视频/图片比较
|
|
|
if utils.ValidVersion(header.Version, "1.3.0") {
|
|
|
modifyLog.Pictures = make([]protocol.Picture, 0)
|
|
|
modifyLog.Videos = make([]protocol.Video, 0)
|
|
|
modifyLog.RemoveAllPhotoVideo = false
|
|
|
}
|
|
|
if isSaveLog {
|
|
|
_ = SaveChanceReviseLog(header, chance, modifyLog)
|
|
|
}
|
...
|
...
|
|