Thanks to visit codestin.com
Credit goes to github.com

Skip to content

在jsd如何支持字段为type类型 #7

@carolove

Description

@carolove

eg:

type ReportStatus int

type DotCrawlInfo struct {
	ReportStatus     entity.ReportStatus `jsd:"report_status"`
	WebsiteStatus    entity.ReportStatus `jsd:"website_status"`
}

在jsd中反射出来的时候提示错误

infos = []*model.DotCrawlInfo{}
db := gsd.MustOpen(_TABLE_SQL_SITE_RECORD)
err = db.Select( _ColReportStatus, _ColWebsiteStatus).From(_Table).
	Where(filter).
	Page(PI.PageIndex, PI.PageSize).Fill(&infos)
if err != nil {
	fmt.Println("Error:", err.Error())
}
return

提示类型无法反射无法从tinyiint(4) -> type ReportStatus int

这种如何解决~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions