|
@@ -95,8 +95,8 @@ func (item *BindItem[I, O]) bind(routerGroup *gin.RouterGroup, middlewares ...mi
|
|
panic("需要指定响应函数")
|
|
panic("需要指定响应函数")
|
|
}
|
|
}
|
|
|
|
|
|
- var inputModel I
|
|
|
|
- inputType := reflect.TypeOf(inputModel)
|
|
|
|
|
|
+ var inputCheckModel I
|
|
|
|
+ inputType := reflect.TypeOf(inputCheckModel)
|
|
if inputType != nil {
|
|
if inputType != nil {
|
|
if inputType.Kind() == reflect.Pointer {
|
|
if inputType.Kind() == reflect.Pointer {
|
|
panic("输入对象不能使用指针类型")
|
|
panic("输入对象不能使用指针类型")
|
|
@@ -117,6 +117,7 @@ func (item *BindItem[I, O]) bind(routerGroup *gin.RouterGroup, middlewares ...mi
|
|
|
|
|
|
ginHandleFunctions = append(ginHandleFunctions, func(c *gin.Context) {
|
|
ginHandleFunctions = append(ginHandleFunctions, func(c *gin.Context) {
|
|
bindingContext := &binding_context.Context{Context: c}
|
|
bindingContext := &binding_context.Context{Context: c}
|
|
|
|
+ var inputModel I
|
|
|
|
|
|
if inputType != nil {
|
|
if inputType != nil {
|
|
if item.OptionalBindingFunc != nil {
|
|
if item.OptionalBindingFunc != nil {
|