当前位置: 代码迷 >> 综合 >> Golang sql 丢失react丢失数据
  详细解决方案

Golang sql 丢失react丢失数据

热度:16   发布时间:2024-01-09 07:33:33.0
var info ProjectInfoResponse
sql := `SELECT 
tp.project_picfrom tb_project  tpwhere tp.status=0 and tp.project_id=?`
b, err := session.SQL(sql, request.ProjectId).Get(&info)

原因:

type ProjectInfoResponse struct {projectPic          string            `xorm:"project_pic" json:"project_pic"`                   // 项目图片Inshelves           project.InShelves `xorm:"inshelves" json:"inshelves"`                       // 0、下架,1、上架
}

projectPic 首字母需要大写。

  相关解决方案