1
1
package plus.maa.backend.controller.request.copilot
2
2
3
- import com.fasterxml.jackson.annotation.JsonIgnore
4
3
import jakarta.validation.constraints.Max
5
4
6
5
/* *
@@ -11,43 +10,41 @@ data class CopilotQueriesRequest(
11
10
val page : Int = 0 ,
12
11
val limit : @Max(value = 50 , message = " 单页大小不得超过50" ) Int = 10 ,
13
12
var levelKeyword : String? = null ,
13
+ val level_keyword : String? = null ,
14
14
val operator : String? = null ,
15
15
val content : String? = null ,
16
16
val document : String? = null ,
17
17
var uploaderId : String? = null ,
18
+ val uploader_id : String? = null ,
18
19
val desc : Boolean = true ,
19
20
var orderBy : String? = null ,
21
+ val order_by : String? = null ,
20
22
val language : String? = null ,
21
- var copilotIds : List <Long >? = null
23
+ var copilotIds : List <Long >? = null ,
24
+ val copilot_ids : List <Long >? = null
22
25
) {
23
26
24
- /*
25
- * 这里为了正确接收前端的下划线风格,手动写了三个 setter 用于起别名
26
- * 因为 Get 请求传入的参数不是 JSON,所以没办法使用 Jackson 的注解直接实现别名
27
- * 添加 @JsonAlias 和 @JsonIgnore 注解只是为了保障 Swagger 的文档正确显示
28
- * (吐槽一下,同样是Get请求,怎么CommentsQueries是驼峰命名,到了CopilotQueries就成了下划线命名)
29
- */
30
- @JsonIgnore
31
- @Suppress(" unused" )
32
- fun setLevel_keyword (levelKeyword : String? ) {
33
- this .levelKeyword = levelKeyword
34
- }
35
-
36
- @JsonIgnore
37
- @Suppress(" unused" )
38
- fun setUploader_id (uploaderId : String? ) {
39
- this .uploaderId = uploaderId
40
- }
41
-
42
- @JsonIgnore
43
- @Suppress(" unused" )
44
- fun setOrder_by (orderBy : String? ) {
45
- this .orderBy = orderBy
46
- }
47
-
48
- @JsonIgnore
49
- @Suppress(" unused" )
50
- fun setCopilot_ids (copilotIds : List <Long >? ) {
51
- this .copilotIds = copilotIds
52
- }
27
+ // /*
28
+ // * 这里为了正确接收前端的下划线风格,手动写了三个 setter 用于起别名
29
+ // * 因为 Get 请求传入的参数不是 JSON,所以没办法使用 Jackson 的注解直接实现别名
30
+ // * 添加 @JsonAlias 和 @JsonIgnore 注解只是为了保障 Swagger 的文档正确显示
31
+ // * (吐槽一下,同样是Get请求,怎么CommentsQueries是驼峰命名,到了CopilotQueries就成了下划线命名)
32
+ // */
33
+ // @JsonIgnore
34
+ // @Suppress("unused")
35
+ // fun setLevel_keyword(levelKeyword: String?) {
36
+ // this.levelKeyword = levelKeyword
37
+ // }
38
+ //
39
+ // @JsonIgnore
40
+ // @Suppress("unused")
41
+ // fun setUploader_id(uploaderId: String?) {
42
+ // this.uploaderId = uploaderId
43
+ // }
44
+ //
45
+ // @JsonIgnore
46
+ // @Suppress("unused")
47
+ // fun setCopilot_ids(copilotIds: List<Long>?) {
48
+ // this.copilotIds = copilotIds
49
+ // }
53
50
}
0 commit comments