Skip to content

Commit

Permalink
第10次优化:451 ms
Browse files Browse the repository at this point in the history
  • Loading branch information
steden committed Feb 4, 2024
1 parent cd27699 commit 8d38851
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion context/httpRoute.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (receiver *HttpRoute) FormToParams(mapVal map[string]any) []reflect.Value {
if exists {
fieldVal := parse.ConvertValue(kv, dtoParamVal.Field(i).Type())
// dto中的字段赋值
dtoParamVal.FieldByName(field.Name).Set(fieldVal)
dtoParamVal.FieldByName(field.Name).Set(reflect.ValueOf(fieldVal))
}
}
returnVal := []reflect.Value{dtoParamVal}
Expand Down
2 changes: 1 addition & 1 deletion controller/handleMiddleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,6 @@ func (receiver HandleMiddleware) bindHeader(httpContext *context.HttpContext, co
continue
}
headerValue := parse.ConvertValue(headerVal, headerFieldType)
headerFieldVal.Set(headerValue)
headerFieldVal.Set(reflect.ValueOf(headerValue))
}
}

0 comments on commit 8d38851

Please sign in to comment.