Skip to content

Commit

Permalink
chore:change input param compatible front
Browse files Browse the repository at this point in the history
  • Loading branch information
taolx0 committed Oct 9, 2023
1 parent 930a714 commit c8c5ed3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 21 deletions.
20 changes: 10 additions & 10 deletions sqle/api/controller/v1/sql_audit_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -479,14 +479,14 @@ func UpdateSQLAuditRecordV1(c echo.Context) error {
}

type GetSQLAuditRecordsReqV1 struct {
FuzzySearchTags string `json:"fuzzy_search_tags" query:"fuzzy_search_tags"` // todo issue1811
FilterSQLAuditStatus string `json:"filter_sql_audit_status" query:"filter_sql_audit_status" enums:"auditing,successfully,"`
FilterInstanceName string `json:"filter_instance_name" query:"filter_instance_name"`
FilterCreateTimeFrom string `json:"filter_create_time_from" query:"filter_create_time_from"`
FilterCreateTimeTo string `json:"filter_create_time_to" query:"filter_create_time_to"`
FilterSqlAuditRecordIDs []string `json:"filter_sql_audit_record_ids" query:"filter_sql_audit_record_ids"`
PageIndex uint32 `json:"page_index" query:"page_index" valid:"required"`
PageSize uint32 `json:"page_size" query:"page_size" valid:"required"`
FuzzySearchTags string `json:"fuzzy_search_tags" query:"fuzzy_search_tags"` // todo issue1811
FilterSQLAuditStatus string `json:"filter_sql_audit_status" query:"filter_sql_audit_status" enums:"auditing,successfully,"`
FilterInstanceName string `json:"filter_instance_name" query:"filter_instance_name"`
FilterCreateTimeFrom string `json:"filter_create_time_from" query:"filter_create_time_from"`
FilterCreateTimeTo string `json:"filter_create_time_to" query:"filter_create_time_to"`
FilterSqlAuditRecordIDs string `json:"filter_sql_audit_record_ids" query:"filter_sql_audit_record_ids" example:"1711247438821462016,1711246967037759488"`
PageIndex uint32 `json:"page_index" query:"page_index" valid:"required"`
PageSize uint32 `json:"page_size" query:"page_size" valid:"required"`
}

type SQLAuditRecord struct {
Expand Down Expand Up @@ -526,7 +526,7 @@ const (
// @Param filter_instance_name query string false "filter instance name"
// @Param filter_create_time_from query string false "filter create time from"
// @Param filter_create_time_to query string false "filter create time to"
// @Param filter_sql_audit_record_ids query []string false "filter sql audit record ids"
// @Param filter_sql_audit_record_ids query string false "filter sql audit record ids"
// @Param page_index query uint32 true "page index"
// @Param page_size query uint32 true "size of per page"
// @Param project_name path string true "project name"
Expand Down Expand Up @@ -570,7 +570,7 @@ func GetSQLAuditRecordsV1(c echo.Context) error {
"filter_create_time_from": req.FilterCreateTimeFrom,
"filter_create_time_to": req.FilterCreateTimeTo,
"check_user_can_access": !isManager,
"filter_audit_record_ids": strings.Join(req.FilterSqlAuditRecordIDs, ","),
"filter_audit_record_ids": req.FilterSqlAuditRecordIDs,
"limit": req.PageSize,
"offset": offset,
}
Expand Down
5 changes: 1 addition & 4 deletions sqle/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -4407,10 +4407,7 @@ var doc = `{
"in": "query"
},
{
"type": "array",
"items": {
"type": "string"
},
"type": "string",
"description": "filter sql audit record ids",
"name": "filter_sql_audit_record_ids",
"in": "query"
Expand Down
5 changes: 1 addition & 4 deletions sqle/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -4391,10 +4391,7 @@
"in": "query"
},
{
"type": "array",
"items": {
"type": "string"
},
"type": "string",
"description": "filter sql audit record ids",
"name": "filter_sql_audit_record_ids",
"in": "query"
Expand Down
4 changes: 1 addition & 3 deletions sqle/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7746,10 +7746,8 @@ paths:
type: string
- description: filter sql audit record ids
in: query
items:
type: string
name: filter_sql_audit_record_ids
type: array
type: string
- description: page index
in: query
name: page_index
Expand Down

0 comments on commit c8c5ed3

Please sign in to comment.