新增分享码功能

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
+14
View File
@@ -28,6 +28,20 @@ func NewModelCSVHandler(s3 *storage.S3Storage, log *zap.Logger) *ModelCSVHandler
}
// GetModelCSV 从 S3 读取耳机 CSV 频响数据
//
// @Summary 获取耳机原始频响 CSV 数据
// @Description 从 S3 读取指定机型的测量 CSV 数据,返回 frequency 和 raw 数组
// @Tags Curve
// @Produce json
// @Param brand query string true "品牌名称"
// @Param model query string true "型号名称"
// @Param form query string true "耳机类型 (in-ear/over-ear)"
// @Param base64Resp query string false "是否返回 base64 编码响应"
// @Success 200 {object} map[string]any "成功返回 frequency 和 raw 数组"
// @Failure 400 {object} map[string]any "参数校验失败"
// @Failure 500 {object} object
// @Router /audio/getModelCSV [get]
//
// GET /audio/getModelCSV?brand=Abyss&model=Dinan DZ&form=over-ear&base64Resp=true
func (h *ModelCSVHandler) GetModelCSV(c *gin.Context) {
brand := strings.TrimSpace(queryParam(c, "brand"))