fix: 修复 OpenAPI 路径参数 path 标签缺失导致启动 panic 的问题
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 4m17s

- 为 enterprise_card_authorization_dto.go 中的 DTO 添加 path 标签
- 为 customer_account_dto.go 中的 DTO 添加 path 标签并重构结构
- 为 enterprise_dto.go 中的 DTO 添加 path 标签并重构结构
- 更新 handler 和 service 层使用正确的请求体类型
This commit is contained in:
2026-01-21 18:42:29 +08:00
parent 8677a54370
commit 23be0a7d3e
9 changed files with 69 additions and 16 deletions

View File

@@ -54,7 +54,7 @@ func (h *EnterpriseHandler) Update(c *fiber.Ctx) error {
return errors.New(errors.CodeInvalidParam, "无效的企业ID")
}
var req model.UpdateEnterpriseReq
var req model.UpdateEnterpriseBody
if err := c.BodyParser(&req); err != nil {
return errors.New(errors.CodeInvalidParam, "请求参数解析失败")
}
@@ -74,7 +74,7 @@ func (h *EnterpriseHandler) UpdateStatus(c *fiber.Ctx) error {
return errors.New(errors.CodeInvalidParam, "无效的企业ID")
}
var req model.UpdateEnterpriseStatusReq
var req model.UpdateEnterpriseStatusBody
if err := c.BodyParser(&req); err != nil {
return errors.New(errors.CodeInvalidParam, "请求参数解析失败")
}
@@ -93,7 +93,7 @@ func (h *EnterpriseHandler) UpdatePassword(c *fiber.Ctx) error {
return errors.New(errors.CodeInvalidParam, "无效的企业ID")
}
var req model.UpdateEnterprisePasswordReq
var req model.UpdateEnterprisePasswordBody
if err := c.BodyParser(&req); err != nil {
return errors.New(errors.CodeInvalidParam, "请求参数解析失败")
}