zk 2 years ago
parent
commit
bc7b45d151
1 changed files with 1 additions and 1 deletions
  1. 1 1
      server/service/autocode/unit_history.go

+ 1 - 1
server/service/autocode/unit_history.go

@@ -61,6 +61,6 @@ func (unitHistoryService *UnitHistoryService) GetUnitHistoryInfoList(info autoCo
 	var unitHistorys []autocode.UnitHistory
 	var unitHistorys []autocode.UnitHistory
 	// 如果有条件搜索 下方会自动创建搜索语句
 	// 如果有条件搜索 下方会自动创建搜索语句
 	err = db.Count(&total).Error
 	err = db.Count(&total).Error
-	err = db.Limit(limit).Offset(offset).Find(&unitHistorys).Error
+	err = db.Limit(limit).Offset(offset).Order("created_at desc").Find(&unitHistorys).Error
 	return err, unitHistorys, total
 	return err, unitHistorys, total
 }
 }