diff --git a/backend/internal/router/app/info.go b/backend/internal/router/app/info.go index ce08cac..10f5d01 100644 --- a/backend/internal/router/app/info.go +++ b/backend/internal/router/app/info.go @@ -62,9 +62,9 @@ func handleAppCheckUpdate(c *gin.Context) { return } - // 查询该应用的所有版本,按ID降序(创建顺序) + // 查询该应用的所有已发布版本,按ID降序(创建顺序) var allVersions []model.Version - if err := database.DB.Where("application_id = ? AND status = ?", app.ID, "active"). + if err := database.DB.Where("application_id = ? AND publish_status = ?", app.ID, "published"). Order("id DESC"). Preload("Files"). Find(&allVersions).Error; err != nil { @@ -252,8 +252,8 @@ func handleAppCheckUpdate(c *gin.Context) { // 检查是否有适合客户端版本的增量更新 // 查找以客户端版本为基础版本的 patch 更新 var patchVersion model.Version - err := database.DB.Where("application_id = ? AND update_type = ? AND base_version_id = ? AND status = ?", - app.ID, "patch", clientVersionRecord.ID, "active"). + err := database.DB.Where("application_id = ? AND update_type = ? AND base_version_id = ? AND publish_status = ?", + app.ID, "patch", clientVersionRecord.ID, "published"). Order("id DESC"). Preload("Files"). First(&patchVersion).Error