#Error #01: json: unsupported type: func() time.Time
如何解决这个问题?各位
代码
```go
func GetUserById(c *gin.Context) {
id:=c.Query("user_id")
fmt.Println(id)
if id =="" {
c.JSON(http.StatusBadRequest,gin.H{
"info":"你输入了啥啊,这是?"+id,
})
}
data:=utils.DB.First(&system.UserBasic{},id)
c.JSON(http.StatusOK,data)
}
type UserBasic struct {
gorm.Model
Name string
PassWord string
AvatarUrl string
Phone string
Email string
}
type Model struct {
ID uint `gorm:"primarykey"`
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt DeletedAt `gorm:"index"`
}
```