|
@@ -141,7 +141,7 @@ func GetNoContentExcelInfoAll(source, userId int) (items []*ExcelClassifyItems,
|
|
|
sql += ` AND sys_user_id = ? `
|
|
|
pars = append(pars, userId)
|
|
|
}
|
|
|
- sql += ` ORDER BY sort asc,create_time desc `
|
|
|
+ sql += ` ORDER BY sort asc,excel_info_id desc `
|
|
|
_, err = o.Raw(sql, pars...).QueryRows(&items)
|
|
|
return
|
|
|
}
|
|
@@ -239,7 +239,7 @@ func GetExcelInfoByUniqueCode(uniqueCode string) (item *ExcelInfo, err error) {
|
|
|
// GetFirstExcelInfoByClassifyId 获取当前分类下,且排序数相同 的排序第一条的数据
|
|
|
func GetFirstExcelInfoByClassifyId(classifyId int) (item *ExcelInfo, err error) {
|
|
|
o := orm.NewOrmUsingDB("data")
|
|
|
- sql := ` SELECT * FROM excel_info WHERE excel_classify_id=? AND is_delete=0 order by sort asc,excel_info_id asc limit 1`
|
|
|
+ sql := ` SELECT * FROM excel_info WHERE excel_classify_id=? AND is_delete=0 order by sort asc,excel_info_id desc limit 1`
|
|
|
err = o.Raw(sql, classifyId).QueryRow(&item)
|
|
|
return
|
|
|
}
|