Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MapperSlice #33

Closed
Ssummer520 opened this issue Apr 27, 2022 · 2 comments
Closed

MapperSlice #33

Ssummer520 opened this issue Apr 27, 2022 · 2 comments

Comments

@Ssummer520
Copy link

type UserInfo struct {
//Name string gorm:"name"
//Sex int gorm:"sex"
//Age int gorm:"age"
//Phone string gorm:"phone"

Name string
//Sex  int
Age      int
Phone    string
PassWord string

}

type UserListOutPutDto struct {
Name string
Age int
Phone string
}
当我给output加 json标识的时候
数组无法转换成功

@devfeel
Copy link
Owner

devfeel commented Apr 28, 2022

转换代码发出来看下

@Ssummer520
Copy link
Author

转换代码发出来看下
我往 属性旁边加了一个 mapper Name 大写的就匹配成功了

@devfeel devfeel closed this as completed Apr 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants