소스 검색

fix:用户默认排序

zqbao 10 달 전
부모
커밋
48e8f3c12d
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      controllers/user.go

+ 4 - 0
controllers/user.go

@@ -517,6 +517,10 @@ func (this *UserController) List() {
 			sortCondition = ""
 		}
 	}
+	if sortCondition == "" {
+		sortCondition = " ORDER BY u.valid_end_time ASC"
+
+	}
 
 	if sellerIdStr != "" {
 		sellerIds := strings.Split(sellerIdStr, ",")