Explorar el Código

更改男女排序问题

liuyu hace 5 años
padre
commit
21562dff87
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      app/service/bedroom.js

+ 1 - 1
app/service/bedroom.js

@@ -86,7 +86,7 @@ class BedroomService extends CrudService {
   // 取得符合条件的学生列表
   async getstudents(termid, batchid) {
     // 根据期id查找所有当期学生列表
-    const studentList = await this.umodel.find({ termid, batchid }).sort({ gender: 1 });
+    const studentList = await this.umodel.find({ termid, batchid }).sort({ gender: -1 });
     return studentList;
   }