Selaa lähdekoodia

睿姿得分类排序

gmy 5 kuukautta sitten
vanhempi
commit
b46b512758
1 muutettua tiedostoa jossa 6 lisäystä ja 0 poistoa
  1. 6 0
      services/data/base_from_rzd_classify_service.go

+ 6 - 0
services/data/base_from_rzd_classify_service.go

@@ -73,6 +73,12 @@ func RzdClassifyList() ([]*data_manage.BaseFromRzdClassifyResponse, error) {
 		return rzdClassifyAndIndexInfos[i].Sort < rzdClassifyAndIndexInfos[j].Sort
 	})
 
+	for _, info := range rzdClassifyAndIndexInfos {
+		sort.Slice(info.Child, func(i, j int) bool {
+			return info.Child[i].Sort < info.Child[j].Sort
+		})
+	}
+
 	return rzdClassifyAndIndexInfos, nil
 }