mapper
mapper copied to clipboard
MapperSlice
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标识的时候 数组无法转换成功
转换代码发出来看下
转换代码发出来看下 我往 属性旁边加了一个 mapper Name 大写的就匹配成功了