xingzai 10 ay önce
ebeveyn
işleme
c0c181efd0
1 değiştirilmiş dosya ile 5 ekleme ve 1 silme
  1. 5 1
      models/report.go

+ 5 - 1
models/report.go

@@ -301,6 +301,8 @@ func IndustrialToArticleAndProductInteriorCategoryNew(industrialManagementId int
 	o := orm.NewOrm()
 	sql := `SELECT
 			map.match_type_name,
+			map.sort,
+			map.id,
 			map.id AS category_id 
 		FROM
 			cygx_report_mapping_cygx AS map
@@ -319,6 +321,8 @@ func IndustrialToArticleAndProductInteriorCategoryNew(industrialManagementId int
 			map.match_type_name UNION ALL
 		SELECT
 			map.match_type_name,
+			map.sort,
+			map.id,
 			map.id AS category_id 
 		FROM
 			cygx_report_mapping_cygx AS map
@@ -331,7 +335,7 @@ func IndustrialToArticleAndProductInteriorCategoryNew(industrialManagementId int
 			AND art.visible_range = 1 
 			AND man_g.industrial_management_id = ? 
 		GROUP BY
-			map.match_type_name`
+			map.match_type_name  	ORDER BY  id ASC ;  sort DESC   `
 	_, err = o.Raw(sql, industrialManagementId, industrialManagementId).QueryRows(&items)
 	return
 }