新增分享码功能

This commit is contained in:
eafonyang
2026-06-12 15:50:01 +08:00
parent 46fd35b0df
commit 8010cbd32f
24 changed files with 2610 additions and 66 deletions
+13 -1
View File
@@ -21,7 +21,19 @@ func NewOTAHandler(repo *repository.OTARepository, log *zap.Logger) *OTAHandler
}
// GetOTA 获取 OTA 升级信息
// GET /audio/ota?model=xxx&hw=1&mac=xx:xx:xx&beta=0
//
// @Summary 获取 OTA 升级信息
// @Description 根据设备型号和硬件版本查询最新 OTA 记录,支持黑名单过滤和定向升级逻辑
// @Tags OTA
// @Produce json
// @Param model query string true "设备型号"
// @Param hw query int true "硬件版本"
// @Param mac query string false "设备 MAC 地址"
// @Param beta query int false "是否 beta 通道 (0=否,1=是)"
// @Success 200 {object} object "成功返回 OTA 信息"
// @Failure 400 {object} object
// @Failure 500 {object} object
// @Router /audio/ota [get]
func (h *OTAHandler) GetOTA(c *gin.Context) {
modelVal := strings.TrimSpace(c.Query("model"))
hwStr := strings.TrimSpace(c.Query("hw"))