作者 yangfu

榜单周期排序修改

... ... @@ -93,7 +93,7 @@ func GetRankPeriods(companyId int, rankTypeId int, status []int) (v []*RankPerio
if len(status) > 0 {
sql.Where(fmt.Sprintf("status in (%v)", utils.JoinInts(status, ",")))
}
sql.Order("end_time")
sql.Order("end_time desc")
_, err = sql.Querys(&v)
return
}
... ...
... ... @@ -791,10 +791,10 @@ func CheckChanceDifferent(header *protocol.RequestHeader, chance *models.Chance,
if (len(videos) > 0 && len(request.Videos) == 0) && len(pictures) > 0 && len(request.Pictures) == 0 {
modifyLog.RemoveAllPhotoVideo = true
}
if (len(videos) > 0 && len(request.Videos) == 0) && len(pictures) == len(request.Pictures) {
if (len(videos) > 0 && len(request.Videos) == 0) && (len(pictures) == len(request.Pictures) && len(pictures) == 0) {
modifyLog.RemoveAllPhotoVideo = true
}
if (len(videos) == len(request.Videos)) && len(pictures) > 0 && len(request.Pictures) == 0 {
if (len(videos) == len(request.Videos) && len(videos) == 0) && len(pictures) > 0 && len(request.Pictures) == 0 {
modifyLog.RemoveAllPhotoVideo = true
}
if len(speechs) > 0 && len(request.Speechs) == 0 {
... ...