作者 yangfu

榜单周期排序修改

@@ -93,7 +93,7 @@ func GetRankPeriods(companyId int, rankTypeId int, status []int) (v []*RankPerio @@ -93,7 +93,7 @@ func GetRankPeriods(companyId int, rankTypeId int, status []int) (v []*RankPerio
93 if len(status) > 0 { 93 if len(status) > 0 {
94 sql.Where(fmt.Sprintf("status in (%v)", utils.JoinInts(status, ","))) 94 sql.Where(fmt.Sprintf("status in (%v)", utils.JoinInts(status, ",")))
95 } 95 }
96 - sql.Order("end_time") 96 + sql.Order("end_time desc")
97 _, err = sql.Querys(&v) 97 _, err = sql.Querys(&v)
98 return 98 return
99 } 99 }
@@ -791,10 +791,10 @@ func CheckChanceDifferent(header *protocol.RequestHeader, chance *models.Chance, @@ -791,10 +791,10 @@ func CheckChanceDifferent(header *protocol.RequestHeader, chance *models.Chance,
791 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 {
792 modifyLog.RemoveAllPhotoVideo = true 792 modifyLog.RemoveAllPhotoVideo = true
793 } 793 }
794 - if (len(videos) > 0 && len(request.Videos) == 0) && len(pictures) == len(request.Pictures) { 794 + if (len(videos) > 0 && len(request.Videos) == 0) && (len(pictures) == len(request.Pictures) && len(pictures) == 0) {
795 modifyLog.RemoveAllPhotoVideo = true 795 modifyLog.RemoveAllPhotoVideo = true
796 } 796 }
797 - if (len(videos) == len(request.Videos)) && len(pictures) > 0 && len(request.Pictures) == 0 { 797 + if (len(videos) == len(request.Videos) && len(videos) == 0) && len(pictures) > 0 && len(request.Pictures) == 0 {
798 modifyLog.RemoveAllPhotoVideo = true 798 modifyLog.RemoveAllPhotoVideo = true
799 } 799 }
800 if len(speechs) > 0 && len(request.Speechs) == 0 { 800 if len(speechs) > 0 && len(request.Speechs) == 0 {