|
@@ -61,6 +61,6 @@ func (unitHistoryService *UnitHistoryService) GetUnitHistoryInfoList(info autoCo
|
|
|
var unitHistorys []autocode.UnitHistory
|
|
|
// 如果有条件搜索 下方会自动创建搜索语句
|
|
|
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
|
|
|
}
|