|
@@ -1442,7 +1442,7 @@ func CreateAerialDetection(detection *models.XtAerialDetection) error {
|
1442
|
1442
|
|
1443
|
1443
|
func GetAirList(limit int64, page int64, orgid int64) (airlist []*models.XtAerialDetection, total int64, err error) {
|
1444
|
1444
|
offset := (page - 1) * limit
|
1445
|
|
- err = XTReadDB().Model(&airlist).Where("user_org_id = ? and status =1", orgid).Count(&total).Limit(limit).Offset(offset).Order("created_time,ctime desc").Find(&airlist).Error
|
|
1445
|
+ err = XTReadDB().Model(&airlist).Where("user_org_id = ? and status =1", orgid).Count(&total).Limit(limit).Offset(offset).Order("created_time desc").Find(&airlist).Error
|
1446
|
1446
|
return airlist, total, err
|
1447
|
1447
|
}
|
1448
|
1448
|
|
|
@@ -1474,7 +1474,7 @@ func SaveBodyDetection(detection *models.XtBodyDetection) error {
|
1474
|
1474
|
func GetBodyList(limit int64, page int64, orgid int64) (body []*models.XtBodyDetection, total int64, err error) {
|
1475
|
1475
|
|
1476
|
1476
|
offset := (page - 1) * limit
|
1477
|
|
- err = XTReadDB().Model(&body).Where("user_org_id = ? and status =1", orgid).Count(&total).Limit(limit).Offset(offset).Order("created_time,ctime desc").Find(&body).Error
|
|
1477
|
+ err = XTReadDB().Model(&body).Where("user_org_id = ? and status =1", orgid).Count(&total).Limit(limit).Offset(offset).Order("created_time desc").Find(&body).Error
|
1478
|
1478
|
return body, total, err
|
1479
|
1479
|
|
1480
|
1480
|
}
|